Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The vhdl code for a 3x8 decoder design using the ieee standard logic. The decoder has three input lines (x, y, z) and an output vector (d) of length 8.
What you will learn
Typology: Exams
1 / 2
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;