entity full_adder_2bit is
Port ( A : in STD_LOGIC_VECTOR (1 downto 0);
B : in STD_LOGIC_VECTOR (1 downto 0);
Cin : in STD_LOGIC;
S : out STD_LOGIC_VECTOR (1 downto 0);
Cout : out STD_LOGIC);
end full_adder_2bit;
architecture Behavioral of full_adder_2bit is
Component full_adder
port(A : in STD_LOGIC;
B : in STD_LOGIC;
Cin : in STD_LOGIC;
S : out STD_LOGIC;
Cout : out STD_LOGIC);
end component;
signal C:STD_LOGIC;
begin
Bit_adder0: full_adder port map(A=>A(0),
B=>B(0),
Cin=>Cin,
S=>S(0),
Cout=>C);
Bit_adder1:full_adder port map(A=>A(1),
B=>B(1),
Cin=>C,
S=>S(1),
Cout=>Cout);
end Behavioral;