Professional Documents
Culture Documents
04 Adder MUX DMUX 2019
04 Adder MUX DMUX 2019
04 Adder MUX DMUX 2019
Bonomali Khuntia
Berhampur University
October 2019
Digital Circuits
Combinational Logic
Output depends only on current input
Sequential Logic
Output depends not only on current input but also on past
input values
Need some type of memory to remember the past input
values
Eg. Traffic light, counter
Adder
• Combinational logic circuits
give us many useful devices.
• One of the simplest is the
half adder, which finds the
sum of two bits.
• We can gain some insight as
to the construction of a half
adder by looking at its truth
table, shown at the right.
Sum
AB AB Carry
00 01 11 10
Cin
Cin
00 01 11 10
0 1 1 0 1
1 1 1 1 1 1 1
S A B C Co AB BC CA
Draw the logic diagrams for both.
Assignment
Design Full-adder using two half adders and an OR gate.
Difference A B
Borrow A B
Full Subtractor
Inputs Outputs
Difference A B Bin
Borrow A B BC CA
Binary Adder
The carry bit “ripples” from one adder to the next; hence,
this configuration is called a ripple-carry adder.
n Binary 2n outputs
inputs Decoder
2-to-4 Binary Decoder
Truth Table:
X Y F0 F1 F2 F3 F0
0 0 1 0 0 0
X 2-to-4 F1
0 1 0 1 0 0 Y Decoder F2
F3
1 0 0 0 1 0
1 1 0 0 0 1
F0 = X'Y'
From truth table, circuit for
2x4 decoder is:
F1 = X'Y
Note: Each output is a 2-
variable minterm (X'Y', X'Y, F2 = XY'
XY' or XY)
F3 = XY
X Y
3-to-8 Binary Decoder
Truth Table:
F0 = x'y'z'
x y z F0 F1 F2 F3 F4 F5 F6 F7 F1 = x'y'z
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0 F2 = x'yz'
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0 F3 = x'yz
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0 F4 = xy'z'
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1 F5 = xy'z
F6 = xyz'
F0
F1 F7 = xyz
X
F2
Y
3-to-8
F3
Z
Decoder F4
F5
F6
x y z
F7
Implementing Functions Using Decoders
3-to-8 0
Decoder 1 S
2
x S2 3
y S1 4
5 C
z S0 6
7
Use two 3 to 8 decoders to make 4 to 16
decoder
Enable can also be active high
In this example, only one decoder can be active at
a time.
x, y, z effectively select output line for w
Encoders
If the a decoder's output code has fewer bits than the input
code, the device is usually called an encoder.
e.g. 2n-to-n
The simplest encoder is a 2n-to-n binary encoder
One of 2n inputs = 1
Output is an n-bit binary number
Binary
2n encoder n
. .
inputs . . outputs
. .
8-to-3 Binary Encoder
At any one time, only one input line has a value of 1.
Inputs Outputs
I0 I1 I2 I3 I4 I5 I6 I7 y2 y1 y0
1 0 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 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
I0
I1 y2 = I4 + I5 + I6 + I7
I2
I3 y1 = I2 + I3 + I6 + I7
I4
I5
I6
I7 y0 = I1 + I3 + I5 + I7
MULTIPLEXERS (Data Selectors)
A multiplexers (MUX) is a device that allows digital
information from several sources to be routed onto a single
line for transmission over that line to a common
destination.
MP3 Player
Docking Station
D0
Laptop
MUX
D1
Sound Card Y
D2
D3
23
Two-input multiplexer
4-to-1 Multiplexer (MUX)
Select Output
S1 S0 Y Y I 0 S0 S1 I1S0 S1 I 2 S0 S1 I 3 S0 S1
0 0 I0
0 1 I1
1 0 I2 I0
1 1 I3
I1
Y
I2
I3
S0
S1
25
4-to-1 MUX 8-to-1 MUX 16-to-1 MUX
Select
Enable
DEMULTIPLEXERS
B/W Laser
Printer
Fax
Machine
D0
DEMUX
X D1
D2 Color Inkjet
Printer
D3
B A Selected Destination
0 0 B/W Laser Printer Pen
0 1 Fax Machine Plotter
28
A 1-line-to-4-line demultiplexer
A 1-line-to-8-line demultiplexer
THANK YOU