0% found this document useful (0 votes)
91 views2 pages

3x8 Decoder

This document describes a 3x8 decoder. The decoder takes in a 3-bit input and outputs an 8-bit signal where only one bit is high based on the input value. It uses a case statement to determine which output bit is high for each of the 8 possible 3-bit input combinations.

Uploaded by

princeram123
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views2 pages

3x8 Decoder

This document describes a 3x8 decoder. The decoder takes in a 3-bit input and outputs an 8-bit signal where only one bit is high based on the input value. It uses a case statement to determine which output bit is high for each of the 8 possible 3-bit input combinations.

Uploaded by

princeram123
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

3x8 decoder

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 decoder is Port ( i : in STD_LOGIC_VECTOR (2 downto 0); y : out STD_LOGIC_VECTOR (7 downto 0)); end decoder;

architecture Behavioral of decoder is

begin process(i) begin case i is when "111" => y<="00000001";

when "110" => y<="00000010"; when "101" => y<="00000100"; when "100" => y<="00001000"; when "011" => y<="00010000"; when "010" => y<="00100000"; when "001" => y<="01000000"; when "000" => y<="10000000"; when others => null; end case; end process; end Behavioral;

You might also like