Professional Documents
Culture Documents
ALU VHD
ALU VHD
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_arith.ALL;
use IEEE.STD_LOGIC_unsigned.ALL;
entity alu_4bit is
Port ( n1 : in STD_LOGIC_VECTOR (3 downto 0);
n2 : in STD_LOGIC_VECTOR (3 downto 0);
op : in STD_LOGIC_VECTOR (2 downto 0);
result : out STD_LOGIC_VECTOR (3 downto 0);
flag : out STD_LOGIC);
end alu_4bit;