answersLogoWhite

0

There are many different optional codes. Here are brought three of them.



1st - 2:4 decoder using "enable" :

entity DECODER is
port (A, B, Enable : in std_logic ;
Out : out std_logic_vector(3 downto 0)
);
end DECODER;


architecture ARC.DECODER of DECODER is
begin
Out(0) <= Enable or (not A nand not B);
Out(1) <= Enable or (A nand not B);
Out(2) <= Enable or (not A nand B);
Out(3) <= Enable or (A nand B);
end ARC.DECODER;



2nd - 2:4 decoder using "select" and "with" (case) :

entity DECODER is
port ( SEL : in std_logic_vector(1 downto 0);
outlet : out std_logic_vector(3 downto 0)
);
end DECODER;


architecture ARC.DECODER of DECODER is
begin
with SEL select
outlet <= "0001" when "00",
"0010" when "01",
"0100" when "10",
"1000" when "11",
"0000" when others;
end ARC.DECODER;



3rd - 2:4 decoder using "signal", "component" and "map" :

entity DECODER is
Port (A,B : in STD_LOGIC ;
F0,F1,F2,F3 : out STD_LOGIC );
end entity DECODER;


architecture ARC.DECODER of DECODER is


signal A_sig, B_sig : STD_LOGIC;


component INV
port (In1 : in STD_LOGIC ;
Out1 : out STD_LOGIC );
end component;


component AND_2
port (In1, In2 : in STD_LOGIC ;
Out1 : out STD_LOGIC );
end component;
begin
U1 : INV port map (A, A_sig);
U2 : INV port map (B, B_sig);
U3 : AND2 port map (A_sig, B_sig, F0);
U4 : AND2 port map (A, B_sig, F1);
U5 : AND2 port map (A_sig, B, F2);
U6 : AND2 port map (A, B, F3);


end architecture ARC.DECODER;
User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is VHDL program for 64 to 1 multiplexer using four 4 to 1 multiplexers?

Personally describing VHDL code for multiplexer can be quite difficult without prior knowledge. It takes many VHDLs to be a multiplexer.


4 Difference between c program and vhdl program?

There are 4 main differences between C programming and VHDL programming. C is a mid-level language, while VHDL is a hardware description language. C can handle one type of instruction, while VHDL can handle two. C does not require as much resource usage as VHDL. C can be written only with logical thinking, but a VHDL programmer must understand hardware circuits.


Impliment 8 into 256 decoder using decoder circuit?

8:256 decoder circuit can be implemented by using 4:16 decoder circuit


How many outputs are possible for 4 input decoder?

A 4-input decoder can produce (2^n) outputs, where (n) is the number of inputs. For a 4-input decoder, (n = 4), so the number of possible outputs is (2^4 = 16). Therefore, a 4-input decoder can generate 16 distinct output lines based on the 4 input combinations.


How do you make 6 to 64 decoder using four 4 to 16 and one 2 to 4 decoder?

To create a 6 to 64 decoder using four 4 to 16 decoders and one 2 to 4 decoder, first, separate the 6 input bits into two groups: the upper 2 bits (let's call them A5 and A4) and the lower 4 bits (A3 to A0). Use the 2 to 4 decoder to decode the upper 2 bits, which will select one of the four 4 to 16 decoders. Then, connect the lower 4 bits to all four 4 to 16 decoders. The selected 4 to 16 decoder will activate one of its 16 outputs based on the lower 4 bits, resulting in a total of 64 outputs from the combination of the decoders.


Number of control lines for a 16 output decoder?

4


How can one make 6-to-64 decoder with the help of 4-to-16 decoders?

Oh, dude, making a 6-to-64 decoder with 4-to-16 decoders is like building a tower of Legos with some missing pieces. You just gotta cascade the 4-to-16 decoders in a way that each output of the 6-to-64 decoder corresponds to a unique combination of inputs from the 4-to-16 decoders. It's kinda like solving a puzzle, but with electronic components.


Why does your LCD not isplay the full picture from your decoder It is zoomed by default and I cant reset it?

Oh I had to change the settings on the decoder to send the signal as 4:3 instead of 16:9


How do you do the decoder on Poptropica?

Click on the decoder 4 times the type in 130928:):):):):) I hope this helped:):):)


How can you design 4-to-16 decoder with five 2-to-4 decoder?

It turned out to be very easy))) But I was thinking for a while to solve the problem... )))Ok. Lets say we have inputs S3..S0. Let S3 and S2 go to inputs of each of FOUR of decoders; and S1 with S0 go to the inputs of the FIFTH decoder. The four outputs of the FIFTH decoder go to enable lines of the four decoders. Voila! It might be confusing, but just draw the whole thing and you'll see. Now you just need to enable the fifth decoder... HA-HA!


How do you make a decoder with symbols?

To create a decoder with symbols, you need to assign a unique symbol to each input combination of the decoder. For example, in a 2-to-4 decoder, you could use symbols like A, B, C, and D to represent the output signals corresponding to the input combinations. By using symbols that are easy to understand and differentiate, you can effectively represent the decoder's logic and functionality.


How do you make 3 8 decoder?

Use two 2-4 decoders.