diff options
Diffstat (limited to 'works/life/computer-organization-experiment/full_adder_1.vhdl')
-rw-r--r-- | works/life/computer-organization-experiment/full_adder_1.vhdl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/works/life/computer-organization-experiment/full_adder_1.vhdl b/works/life/computer-organization-experiment/full_adder_1.vhdl new file mode 100644 index 0000000..9b269bf --- /dev/null +++ b/works/life/computer-organization-experiment/full_adder_1.vhdl @@ -0,0 +1,13 @@ +LIBRARY IEEE; +USE IEEE.STD_LOGIC_1164.ALL; +USE IEEE.STD_LOGIC_UNSIGNED.ALL; + +entity full_adder_1 is + port (A, B, CI:in std_logic; S, CO: out std_logic); +end full_adder_1; + +architecture behavior of full_adder_1 is +begin + S <= (A XOR B) XOR CI; + CO <= (A AND B) OR (B AND CI) OR (CI AND A); +end architecture; |