---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 17:19:31 01/26/2009 -- Design Name: -- Module Name: FullAdder - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity FullAdder is Port ( a : in STD_LOGIC; b : in STD_LOGIC; cin : in STD_LOGIC; cout : out STD_LOGIC; sum : out STD_LOGIC); end FullAdder; architecture Behavioral of FullAdder is begin sum <= (a xor b) xor cin; cout <= (a and b) or (a and cin) or (b and cin); end Behavioral;