aboutsummaryrefslogtreecommitdiff
path: root/computer-organization-experiment/full_adder_1.vhdl
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-11-09 17:44:15 +0800
committercrupest <crupest@outlook.com>2021-11-09 17:44:15 +0800
commit18d160e7575374a73b4fd22ec5cc98690105aa69 (patch)
tree4c82112f0c4908895901330ea0199976e87ec90a /computer-organization-experiment/full_adder_1.vhdl
parent4474947842a39dc2497cb0156a76fadd39443d88 (diff)
downloadlife-18d160e7575374a73b4fd22ec5cc98690105aa69.tar.gz
life-18d160e7575374a73b4fd22ec5cc98690105aa69.tar.bz2
life-18d160e7575374a73b4fd22ec5cc98690105aa69.zip
...
Diffstat (limited to 'computer-organization-experiment/full_adder_1.vhdl')
-rw-r--r--computer-organization-experiment/full_adder_1.vhdl13
1 files changed, 13 insertions, 0 deletions
diff --git a/computer-organization-experiment/full_adder_1.vhdl b/computer-organization-experiment/full_adder_1.vhdl
new file mode 100644
index 0000000..9b269bf
--- /dev/null
+++ b/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;