diff options
Diffstat (limited to 'full-adder/full-adder.srcs/sources_1/half_add.vhd')
| -rw-r--r-- | full-adder/full-adder.srcs/sources_1/half_add.vhd | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/full-adder/full-adder.srcs/sources_1/half_add.vhd b/full-adder/full-adder.srcs/sources_1/half_add.vhd new file mode 100644 index 0000000..d2d340a --- /dev/null +++ b/full-adder/full-adder.srcs/sources_1/half_add.vhd @@ -0,0 +1,18 @@ +LIBRARY ieee; +USE ieee.std_logic_1164.ALL; +USE ieee.numeric_std.ALL; + +-- half adder entity +entity half_add is +  port ( +    A: in std_logic; +    B: in std_logic; +    X: out std_logic; +    Cout: out std_logic); +end half_add; + +architecture Behavioral of half_add is +begin +  Cout <= (A AND B); +  X <= (A XOR B); +end Behavioral; |