

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


library ieee; use ieee.std_logic_1164.all;
entity decoder3x8 is port( x,y,z: in std_logic; d: out std_logic_vector(7 downto 0)); end decoder3x8;
architecture behavior of decoder3x8 is begin process (x,y,z) begin if (x='0'and y='0' and z='0') then d <= "00000001"; elsif (x='0'and y='0' and z='1') then d <= "00000010"; elsif (x='0'and y='1' and z='0') then d <= "00000100"; elsif (x='0'and y='1' and z='1') then d <= "00001000"; elsif (x='1'and y='0' and z='0') then d <= "00010000"; elsif (x='1'and y='0' and z='1') then d <= "00100000"; elsif (x='1'and y='1' and z='0') then d <= "01000000"; elsif (x='1'and y='1' and z='1') then d <= "10000000"; end if; end process;
end behavior;