library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity adder is port(a,b,ci:in std_logic; co,sum:out std_logic); end adder; architecture Behavioral of adder is begin sum<=(a xor b) xor ci; co<=((a xor b) and ci)or(a and b); end Behavioral;
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity adder is port(a,b,ci:in std_logic; co,sum:out std_logic); end adder; architecture Behavioral of adder is begin sum<=(a xor b) xor ci; co<=((a xor b) and ci)or(a and b); end Behavioral;