fa.vhd


--
-- full adder
--
library ieee;
use ieee.std_logic_1164.all;

entity fa is
     port( a : in std_logic;
         b : in std_logic;
         ci : in std_logic;
         co : out std_logic;
         s : out std_logic);
end fa;

architecture rtl of fa is
begin

     co <= (a and b) or ( (a or b) and ci);
     s <= a xor b xor ci;

end rtl;