0% found this document useful (0 votes)
66 views

Encoders and Decoders in Digital Logic

A half adder adds two binary digits and produces a sum and carry output. It uses one XOR and one AND gate. A full adder adds three binary digits (two inputs and a carry input) and produces a sum and carry output. It uses two XOR gates, two AND gates, and one OR gate. An encoder converts binary inputs into a coded output using fewer lines. A decoder performs the opposite conversion from a coded input to binary outputs. For example, an octal-to-binary encoder takes 3-bit octal inputs and produces a 3-bit binary coded output. A 3-to-8 decoder takes a 3-bit coded input and produces an 8-bit binary output with one line

Uploaded by

ashleymathew7777
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Encoders and Decoders in Digital Logic

A half adder adds two binary digits and produces a sum and carry output. It uses one XOR and one AND gate. A full adder adds three binary digits (two inputs and a carry input) and produces a sum and carry output. It uses two XOR gates, two AND gates, and one OR gate. An encoder converts binary inputs into a coded output using fewer lines. A decoder performs the opposite conversion from a coded input to binary outputs. For example, an octal-to-binary encoder takes 3-bit octal inputs and produces a 3-bit binary coded output. A 3-to-8 decoder takes a 3-bit coded input and produces an 8-bit binary output with one line

Uploaded by

ashleymathew7777
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Difference between Half adder and full

adder
. Half Adder : Half Adder is a combinational logic circuit which is designed
by connecting one EX-OR gate and one AND gate. The half adder circuit has
two inputs: A and B, which add two input digits and generates a carry and a

sum.
The output obtained from the EX-OR gate is the sum of the two numbers
while that obtained by AND gate is the carry. There will be no forwarding of
carry addition because there is no logic gate to process that. Thus, this is
called the Half Adder circuit.
Logical Expression :
Sum = A XOR B
Carry = A AND B
Truth Table :

Full Adder: Full Adder is the circuit that consists of two EX-OR gates, two
AND gates, and one OR gate. Full Adder is the adder that adds three inputs
and produces two outputs which consist of two EX-OR gates, two AND
gates, and one OR gate. The first two inputs are A and B and the third input
is an input carry as C-IN. The output carry is designated as C-OUT and the
normal output is designated as S which is SUM.

The equation obtained by the EX-OR gate is the sum of the binary digits.
While the output obtained by AND gate is the carry obtained by addition.
Truth Table:

Logical Expression :
SUM = (A XOR B) XOR Cin = (A ⊕ B) ⊕ Cin
CARRY-OUT = A AND B OR Cin(A XOR B) = A.B + Cin(A ⊕ B)
Encoders and Decoders in Digital
Logic
1. Encoders –
An encoder is a combinational circuit that converts binary information in the
form of a 2N input lines into N output lines, which represent N bit code for the
input. For simple encoders, it is assumed that only one input line is active at
a time.
As an example, let’s consider Octal to Binary encoder. As shown in the
following figure, an octal-to-binary encoder takes 8 input lines and generates
3 output lines.

Truth Table –
D7 D6 D5 D4 D3 D2 D1 D0 X Y Z

0 0 0 0 0 0 0 1 0 0 0

0 0 0 0 0 0 1 0 0 0 1

0 0 0 0 0 1 0 0 0 1 0

0 0 0 0 1 0 0 0 0 1 1

0 0 0 1 0 0 0 0 1 0 0

0 0 1 0 0 0 0 0 1 0 1

0 1 0 0 0 0 0 0 1 1 0

1 0 0 0 0 0 0 0 1 1 1
As seen from the truth table, the output is 000 when D0 is active; 001 when
D1 is active; 010 when D2 is active and so on.
Implementation –
From the truth table, the output line Z is active when the input octal digit is 1,
3, 5 or 7. Similarly, Y is 1 when input octal digit is 2, 3, 6 or 7 and X is 1 for
input octal digits 4, 5, 6 or 7. Hence, the Boolean functions would be:
X = D4 + D5 + D6 + D7
Y = D2 +D3 + D6 + D7
Z = D1 + D3 + D5 + D7
Hence, the encoder can be realised with OR gates as follows:

Decoders –
A decoder does the opposite job of an encoder. It is a combinational circuit
that converts n lines of input into 2n lines of output.
Let’s take an example of 3-to-8 line decoder.
Truth Table –
X Y Z D0 D1 D2 D3 D4 D5 D6 D7

0 0 0 1 0 0 0 0 0 0 0

0 0 1 0 1 0 0 0 0 0 0

0 1 0 0 0 1 0 0 0 0 0

0 1 1 0 0 0 1 0 0 0 0

1 0 0 0 0 0 0 1 0 0 0
X Y Z D0 D1 D2 D3 D4 D5 D6 D7

1 0 1 0 0 0 0 0 1 0 0

1 1 0 0 0 0 0 0 0 1 0

1 1 1 0 0 0 0 0 0 0 1

Implementation –
D0 is high when X = 0, Y = 0 and Z = 0. Hence,
D0 = X’ Y’ Z’
Similarly,
D1 = X’ Y’ Z
D2 = X’ Y Z’
D3 = X’ Y Z
D4 = X Y’ Z’
D5 = X Y’ Z
D6 = X Y Z’
D7 = X Y Z
Hence,
Difference between Multiplexer and
Demultiplexer
Multiplexer :
Multiplexer is a data selector which takes several inputs and gives a single
output.In multiplexer we have 2n input lines and 1 output lines where n is the
number of selection lines.
2. Demultiplexer :
Demultiplexer is a data distributor which takes a single input and gives
several outputs.In demultiplexer we have 1 input and 2 n output lines where n
is the selection line.

Difference between of Multiplexer and Demultiplexer :


Multiplexer Demultiplexer

Multiplexer processes the digital


Demultiplexer receives digital information from a
information from various sources into a
single source and converts it into several sources
single source.

It is known as Data Selector It is known as Data Distributor

Multiplexer is a digital switch Demultiplexer is a digital circuit


Multiplexer Demultiplexer

It follows combinational logic type It also follows combinational logic type

It has 2n input data lines It has single input line

It has a single output data line It has 2n output data lines

It works on many to one operational


It works on one to many operational principle
principle

In time division Multiplexing, multiplexer is In time division Multiplexing, demultiplexer is


used at the transmitter end used at the receiver end

You might also like