0% found this document useful (0 votes)
50 views11 pages

3BSCB - Decoder and Encoder

This document discusses encoders and decoders using logic gates. It explains that encoders convert 2N input lines into an N-bit code, while decoders perform the reverse operation of decoding an N-bit code into 2N output lines. It then provides details on a 2-to-4 line binary decoder and a 4-to-2 line binary encoder, describing their components, functionality, and how they operate to decode input bits or encode active input lines, respectively. The document concludes with steps for simulating an encoder and decoder using logic gates.

Uploaded by

Sunil Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views11 pages

3BSCB - Decoder and Encoder

This document discusses encoders and decoders using logic gates. It explains that encoders convert 2N input lines into an N-bit code, while decoders perform the reverse operation of decoding an N-bit code into 2N output lines. It then provides details on a 2-to-4 line binary decoder and a 4-to-2 line binary encoder, describing their components, functionality, and how they operate to decode input bits or encode active input lines, respectively. The document concludes with steps for simulating an encoder and decoder using logic gates.

Uploaded by

Sunil Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Decoder and Encoder

(Using Logic Gates)


III B. Sc. ‘A’
Department of Computer Science,
School of Computing Sciences,
St. Joseph’s College, Trichy- 2
Introduction
• Binary code of N digits can be used to store 2N distinct elements of coded

information.

• This is what encoders and decoders are used for.

• Encoders convert 2N lines of input into a code of N bits and Decoders

decode the N bits into 2N lines.


Decoder
• The name “Decoder” means to translate or decode coded information from
one format into another

• A digital decoder transforms a set of digital input signals into an equivalent


decimal code at its output

• It is a combinational circuit that converts binary information from n input


lines to a maximum of m=2^n unique output lines.
Decoder
• The 2-to-4 line binary decoder depicted above consists of

an array of four AND gates.

• The 2 binary inputs labelled A and B are decoded into one

of 4 outputs, hence the description of 2-to-4 binary decoder.

• Each output represents one of the minterms of the 2 input

variables, (each output = a minterm).


Decoder
• The 2-to-4 line binary decoder depicted above consists of an array of four
AND gates.

• The 2 binary inputs labelled A and B are decoded into one of 4 outputs, hence
the description of 2-to-4 binary decoder.

• Each output represents one of the minterms of the 2 input variables, (each
output = a minterm).

• The binary inputs A and B determine which output line from Q0 to Q3 is


“HIGH” at logic level “1” while the remaining outputs are held “LOW” at
logic “0” so only one output can be active (HIGH) at any one time.

• Therefore, whichever output line is “HIGH” identifies the binary code present
at the input, in other words it “decodes” the binary input.
Decoder
• Some binary decoders have an additional input pin labelled “Enable” that controls the
outputs from the device.
• This extra input allows the decoders outputs to be turned “ON” or “OFF” as required.
• Output is only generated when the Enable input has value 1; otherwise, all outputs are
0.
• Only a small change in the implementation is required: the Enable input is fed into the
AND gates which produce the outputs.
• If Enable is 0, all AND gates are supplied with one of the inputs as 0 and hence no
output is produced.
• When Enable is 1, the AND gates get one of the inputs as 1, and now the output
depends upon the remaining inputs.
• Hence the output of the decoder is dependent on whether the Enable is high or low.
Procedure
Step-1) Connect the supply(+5V) to the circuit.

Step-2) First press "ADD" button to add basic state of your output in the given table.

Step-3) Press the switches to select the required inputs named "A" and "B". Also check
their corresponding outputs named "Q0" and "Q1" and "Q2" and "Q3".

Step-4) Press "ADD" button to add your inputs and outputs in the given table.

Step-5) Repeat step 3 & step 4 for next state of inputs and their corresponding outputs.

Step-6) Press the "PRINT" button after completing your simulation to get your results.
Encoder
• An Encoder is a combinational circuit that performs the

reverse operation of Decoder.

• It has maximum of 2n input lines and ‘n’ output lines, hence

it encodes the information from 2n inputs into an n-bit code.

• It will produce a binary code equivalent to the input, which

is active High.

• Therefore, the encoder encodes 2n input lines with ‘n’ bits.


Encoder
• The 4 to 2 Encoder

• Four Inputs Y3, Y2, Y1 & Y0

• Two Outputs A1 & A0.

• At any time, only one of these 4 inputs can be ‘1’ in order

to get the respective binary code at the output.


Procedure
Step-1) Connect the supply(+5V) to the circuit.

Step-2) First press "ADD" button to add basic state of your output in the given table.

Step-3) Press the switches to select the required inputs "D0" and "D1" and "D2" and "D3".
Also check their corresponding ouyputs named "Q1" and "Q0".

Step-4) Press "ADD" button to add your inputs and outputs in the given table.

Step-5) Repeat step 3 & step 4 for next state of inputs and their corresponding outputs.

Step-6) Press the "PRINT" button after completing your simulation to get your results.
Thank You
Mail: [email protected]

You might also like