Menu
A decoder is a combinational circuit constructed with logic gates. It is the reverse of the encoder. A decoder circuit is used to transform a set of digital input signals into an equivalent decimal code of its output. For ‘n’ inputs a decoder gives 2^n outputs. In this article, we will discuss on 4 to 16 decoder circuit design using 3 to 8 decoder.
Write VHDL code for 3:8 decoder with active low truth table. Follow via messages. Architecture behavioral of decoder is signal Y 1: stdlogicvector (7 down to 0. Question: Write A VHDL Code For 3 To 8 Decoder With Inputs A, B, C, Outputs D0, D1, D2, D3, D4, D5, D6, D7 And An Active Low Enable Signal OE. Simulate Your VHDL Code Using Behavioral Architecture And Test Bench. Hand In Your VHDL Code And Appropriate Results. When OE=1 Then All Outputs Are 0 When OE=0 Then Outputs Will Be Enabled. This decoder can be used for decoding any 3-bit code to provide eight outputs, corresponding to eight different combinations of the input code. This is also called a 1 of 8 decoder, since only one of eight output lines is HIGH for a particular input combination. Fig (1): Logic diagram of 3 to 8 decoder. 8×3 encoder and 3×8 decoder in VHDL. Code: library ieee; use ieee.stdlogic1164.all; entity encoder8x3 is port (d: in stdlogicvector (7 downto 0.
An encoder is a combinational circuit that changes a set of signals into a code. For ‘2^n’ inputs an encoder circuit gives ‘n’ outputs.
The following figure shows the block diagram of a decoder.
3 to 8 Decoder
This decoder circuit gives 8 logic outputs for 3 inputs. The circuit is designed with AND and NAND combinations. It takes 3 binary inputs and activates one of the eight outputs.
Circuit Diagram
The decoder circuit works only when the Enable pin is high.
Vhdl Code For 3 To 8 Decoder Download
Truth Table
When the Enable (E) pin is low, all the output pins are low.
S0 | S1 | S2 | E | D0 | D1 | D2 | D3 | D4 | D5 | D6 | D7 |
x | x | x | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Circuit Design of 4 to 16 Decoder Using 3 to 8 Decoder
A decoder circuit of the higher combination is obtained by adding two or more lower combinational circuits. 4 to 16 decoder circuit is obtained from two 3 to 8 decoder circuits or three 2 to 4 decoder circuits.
When two 3 to 8 Decoder circuits are combined the enable pin acts as the input for both the decoders. When enable pin is high at one 3 to 8 decoder circuits then it is low at another 3 to 8 decoder circuit.
Truth Table
The Enable (E) pin acts as one of the input pins for both 3 to 8 decoder circuits.
E | A | B | C | Y0 | Y1 | Y2 | Y3 | Y4 | Y5 | Y6 | Y7 | Y8 | Y9 | Y10 | Y11 | Y12 | Y13 | Y14 | Y15 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Circuit Diagram of 4 to 16 Decoder
8 To 1 Multiplexer Vhdl
Applications of Decoders
- In every wireless communication, data security is the main concern. The decoders are mainly designed to provide security for data communication by designing standard encryption and decryption algorithms.
- Decoders are used in audio systems to convert analogue audio into digital data.
- Used as a decompressor to convert compressed data like images and videos into decompressed form.
- Decoders use electronic circuits which convert computer instructions into CPU control signals.
Therefore, this is all about the 4 to 16 decoder circuit design using a 3 to 8 decoder circuit. Furthermore, any queries regarding this article or electronics projects you can comment us in the comment section below. here is a question for you, what is the use of Enable pin encoder/ decoder?
Related Content
8 to 3 Encoder VHDL source code
This page of VHDL source code covers 8 to 3 encoder vhdl code.
VHDL Code
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity encoder8to3 is
port(
din : in STD_LOGIC_VECTOR(7 downto 0);
dout : out STD_LOGIC_VECTOR(2 downto 0)
);
end encoder8to3;
architecture encoder8to3_arc of encoder8to3 is
begin
dout <= '000' when (din='10000000') else
'001' when (din='01000000') else
'010' when (din='00100000') else
'011' when (din='00010000') else
'100' when (din='00001000') else
'101' when (din='00000100') else
'110' when (din='00000010') else
'111';
end encoder8to3_arc;
use IEEE.STD_LOGIC_1164.all;
entity encoder8to3 is
port(
din : in STD_LOGIC_VECTOR(7 downto 0);
dout : out STD_LOGIC_VECTOR(2 downto 0)
);
end encoder8to3;
architecture encoder8to3_arc of encoder8to3 is
begin
dout <= '000' when (din='10000000') else
'001' when (din='01000000') else
'010' when (din='00100000') else
'011' when (din='00010000') else
'100' when (din='00001000') else
'101' when (din='00000100') else
'110' when (din='00000010') else
'111';
end encoder8to3_arc;
USEFUL LINKS to VHDL CODES
Refer following as well as links mentioned on left side panel for useful VHDL codes.
D Flipflop
T Flipflop
Read Write RAM
4X1 MUX
4 bit binary counter
Radix4 Butterfly
16QAM Modulation
2bit Parallel to serial
D Flipflop
T Flipflop
Read Write RAM
4X1 MUX
4 bit binary counter
Radix4 Butterfly
16QAM Modulation
2bit Parallel to serial
RF and Wireless tutorials
Share this page
![Code Code](/uploads/1/1/9/3/119320000/160446776.png)