Encoder-Decoder-Multiplexers-and-Demultiplexers.ppt

KritiArora55 10 views 40 slides Mar 11, 2025
Slide 1
Slide 1 of 40
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40

About This Presentation

jgjhg


Slide Content

ECB2212-Digital Electronics
Numbering Systems
Ms.K.Indra Gandhi
Asst Prof (Sr.Gr) /ECE

Digital System Design
Multiplexers and Demultiplexers,
and
Encoders and Decoders

3
Multiplexers

4
Multiplexers

A multiplexer has
N control inputs
2
N
data inputs
1 output

A multiplexer routes (or connects) the selected
data input to the output.
The value of the control inputs determines the
data input that is selected.

5
Multiplexers
Z = A′.I
0
+ A.I
1
Data
inputs
Control
input

6
Multiplexers
Z = A′.B'.I
0
+ A'.B.I
1
+ A.B'.I
2
+ A.B.I
3

A B F
0 0 I
0
0 1 I
1
1 0 I
2
1 1 I
3
MSB LSB

7
Multiplexers
Z = A′.B'.C'.I
0
+ A'.B'.C.I
1
+ A'.B.C'.I
2
+ A'.B.C.I
3
+
A.B'.C'.I
0 + A.B'.C.I
1 + A'.B.C'.I
2 + A.B.C.I
3
MSB LSB
A B C F
0 0 0 I
0
0 0 1 I
1
0 1 0 I
2
0 1 1 I
3
1 0 0 I
4
1 0 1 I
5
1 1 0 I
6
1 1 1 I
7

Fall 2010 ECE 331 - Digital System Design 8
Multiplexers

9
Multiplexers
Exercise:
Design an 8-to-1 multiplexer using
4-to-1 and 2-to-1 multiplexers only.

10
Multiplexers
Exercise:
Design a 16-to-1 multiplexer using
4-to-1 multiplexers only.

Fall 2010 ECE 331 - Digital System Design 11
Multiplexer (Bus)

12
Demultiplexers

13
Demultiplexers

A demultiplexer has
N control inputs
1 data input
2
N
outputs

A demultiplexer routes (or connects) the data input to
the selected output.
The value of the control inputs determines the output
that is selected.

A demultiplexer performs the opposite function of a
multiplexer.

14
Demultiplexers
A B W X Y Z
0 0 I 0 0 0
0 1 0 I 0 0
1 0 0 0 I 0
1 1 0 0 0 I
W = A'.B'.I
X = A.B'.I
Y = A'.B.I
Z = A.B.I
Out
0
In
S
1S
0
I
W
X
Y
Z
AB
Out
1
Out
2
Out
3

15
Decoders

16
Decoders

A decoder has
N inputs
2
N
outputs

A decoder selects one of 2
N
outputs by
decoding the binary value on the N inputs.

The decoder generates all of the minterms of
the N input variables.
Exactly one output will be active for each
combination of the inputs.
What does “active” mean?

17
Decoders
A B W X Y Z
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Active-high outputs
B
W
X
Y
Z
I
0
I
1A
Out
0
Out
1
Out
2
Out
3
W = A'.B'
X = A.B'
Y = A'.B
Z = A.Bmsb

Fall 2010 ECE 331 - Digital System Design 18
Decoders
A B W X Y Z
0 0 0 1 1 1
0 1 1 0 1 1
1 0 1 1 0 1
1 1 1 1 1 0
Active-low outputs
W = (A'.B')'
X = (A.B')'
Y = (A'.B)'
Z = (A.B)'msb
B
W
X
Y
Z
I
0
I
1A
Out
0
Out
1
Out
2
Out
3

19
Decoders
msb

20
Decoder with Enable
En A B W X Y Z
1 0 0 1 0 0 0
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
0 x x 0 0 0 0
enabled
disabled
high-level
enable
Enable
B
W
X
Y
Z
I
0
I
1A
Out
0
Out
1
Out
2
Out
3
En

21
Decoder with Enable
En A B W X Y Z
0 0 0 1 0 0 0
0 0 1 0 1 0 0
0 1 0 0 0 1 0
0 1 1 0 0 0 1
1 x x 0 0 0 0
enabled
disabled
Enable
B
W
X
Y
Z
I
0
I
1A
Out
0
Out
1
Out
2
Out
3
En
low-level
enable

22
Decoders
Exercise:
Design a 4-to-16 decoder using
2-to-4 decoders only.

23
Encoders

24
Encoders

An encoder has
2
N
inputs
N outputs

An encoder outputs the binary value of the selected
(or active) input.

An encoder performs the inverse operation of a
decoder.

Issues
What if more than one input is active?
What if no inputs are active?

25
Encoders
A B C D Y Z
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
D
Z
Y
I
0
I
1C
B I
2
I
3A
Out
0
Out
1

26
Priority Encoders

If more than one input is active, the higher-order input
has priority over the lower-order input.
The higher value is encoded on the output

A valid indicator, d, is included to indicate whether or
not the output is valid.
Output is invalid when no inputs are active

d = 0
Output is valid when at least one input is active

d = 1
Why is the valid indicator needed?

27
Priority Encoders
Valid bit
msb

28
Designing logic circuits using multiplexers

29
Using an n-input Multiplexer

Use an n-input multiplexer to realize a logic circuit for
a function with n minterms.
m = 2
n
, where m = # of variables in the function

Each minterm of the function can be mapped to an
input of the multiplexer.

For each row in the truth table, for the function, where
the output is 1, set the corresponding input of the
multiplexer to 1.
That is, for each minterm in the minterm expansion of the
function, set the corresponding input of the multiplexer to 1.

Set the remaining inputs of the multiplexer to 0.

30
Using an n-input Mux
Example:
Using an 8-to-1 multiplexer, design a logic circuit
to realize the following Boolean function
F(A,B,C) = m(2, 3, 5, 6, 7)

31
Using an n-input Mux
Example:
Using an 8-to-1 multiplexer, design a logic circuit
to realize the following Boolean function
F(A,B,C) = m(1, 2, 4)

32
Using an (n / 2)-input Multiplexer

Use an (n / 2)-input multiplexer to realize a logic
circuit for a function with n minterms.
m = 2
n
, where m = # of variables in the function

Group the rows of the truth table, for the function, into
(n / 2) pairs of rows.
Each pair of rows represents a product term of (m – 1)
variables.
Each pair of rows can be mapped to a multiplexer input.

Determine the logical function of each pair of rows in
terms of the m
th
variable.
If the m
th
variable, for example, is x, then the possible
values are x, x', 0, and 1.

33
Using an (n / 2)-input Mux
Example: F(x,y,z) = m(1, 2, 6, 7)

34
Using an (n / 2)-input Mux
Example: F(A,B,C,D) = m(1,3,4,11,12–15)

35
Using an (n / 4)-input Mux
The design of a logic circuit using an (n / 2)-input
multiplexer can be easily extended to the use of
an (n / 4)-input multiplexer.

36
Designing logic circuits using decoders

37
Using an n-output Decoder

Use an n-output decoder to realize a logic circuit for a
function with n minterms.

Each minterm of the function can be mapped to an
output of the decoder.

For each row in the truth table, for the function, where
the output is 1, sum (or “OR”) the corresponding
outputs of the decoder.
That is, for each minterm in the minterm expansion of the
function, OR the corresponding outputs of the decoder.

Leave remaining outputs of the decoder unconnected.

38
Using an n-output Decoder
Example:
Using a 3-to-8 decoder, design a logic circuit to
realize the following Boolean function
F(A,B,C) = m(2, 3, 5, 6, 7)

39
Using an n-output Decoder
Example:
Using two 2-to-4 decoders, design a logic circuit
to realize the following Boolean function
F(A,B,C) = m(0, 1, 4, 6, 7)

40
Questions?
Tags