CH 6 Functions of Combinational Logic 2
CH 6 Functions of Combinational Logic 2
Eleventh Edition
Floyd
Functions of Combinational
Logic-II
Chapter 6
Decoders
A decoder is a logic circuit that detects the presence of a
specific combination of bits at its input. Two simple
decoders that detect the presence of the binary code 0011
are shown. The first has an active HIGH output; the
second has an active LOW output.
A0 A0
A1 X A1 X
A2 A2
A3 A3
Active HIGH decoder for 0011 Active LOW decoder for 0011
Decoders
A0 = 0
A1 = 1
1
A2 = 0
A3 = 1
Decoders
IC decoders have multiple outputs to decode any
combination of inputs. For example the binary-to-decimal
decoder shown here has 16 outputs – one for each
combination of binary inputs.
Question
Bin/Dec
0 1
For the input shown, 1 1
1
2
what is the output? 3
4
1
1
1 A0 5 1
6 1
4-bit binary 1 A1 7 1 Decimal
input 0 A2 8 1 outputs
9 1
1 A3 10 1
11 0
12 1
13 1
14 1
15 1
Decoders
Decoders
X/Y
0
A specific integrated circuit decoder is 1
2
the 74HC154 (shown as a 4-to-16 3
4
decoder). It includes two active LOW A0
5
1 6
A1
chip select lines which must be at the A2
2
4
7
8
A3 8 9
active level to enable the outputs. 10
11
These lines can be used to expand the 12
13
(16)
The a-g outputs are BCD/7-seg
(4)
designed for much higher BI/RBO
(13)
BI/RBO
(7) a
current than most devices (1)
1
b
(12)
(hence the word driver in BCD
inputs
(2)
2
4
c
(11)
Outputs
(10) to seven
the name). (6)
8
d
(9) segment
e
(3) (15) device
LT LT f
(5) (14)
RBI RBI g
74LS47 (8)
GND
BCD Decoder/Driver
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0
Blanked Blanked
Depending on the display type, current
limiting resistors may be required.
BCD Decoder/Driver
Trailing zero suppression blanks unnecessary trailing zeros
to the right of the decimal point as illustrated here. The RBI
input is connected to the BI/RBO output of the following
decoder.
0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0
1 0 0
Blanked Blanked
Decimal
point
Encoders
An encoder accepts an active logic level on one of its
inputs and converts it to a coded output, such as BCD
or binary.
The decimal to BCD is an
A0
encoder with an input for each
of the ten decimal digits and
four outputs that represent the A1
BCD code for the active digit.
The basic logic diagram is A2
shown. There is no zero input
because the outputs are all A3
LOW when the input is zero.
Encoders
1
3 1
A1 = 2+3+6+7
0
4 0 0
5
6 0 A2 = 4+5+6+7
0
7
0
8 0
A3 = 8+9
9 0
Encoders
A3 = 8+9 A0 = 1+3+5+7+9
A1 = 2+3+6+7
A2 = 4+5+6+7
Encoders
The 74HC147 is an example of an IC encoder. It is has ten
active-LOW inputs and converts the active input to an
active-LOW BCD output.
R7 R8 R9
Keyboard
encoder
7 8 9
1
R4 R5 R6 2
3
1
4
5
2 BCD complement of
4
6 8 key press
4 5 6 7
8
9
R1 R2 R3
1 2 3
R0
0
The zero line is not needed by the
encoder, but may be used by other
circuits to detect a key press.
Code converters
There are various code converters that change one code to
another. Two examples are the four bit binary-to-Gray converter
and the Gray-to-binary converter.
Solution 0 1 LSB
1 0
LSB
0 1
1 0
1 1 1 1
0 0
0 MSB 0 MSB
Binary-to-Gray Gray-to-Binary
Multiplexers
A multiplexer (MUX) selects one data line from two or more
input lines and routes data from the selected line to the output.
The particular data line that is selected is determined by the
select inputs.
MUX
Two select lines are 0
Data
shown here to choose any select
1
Question
Which data line is selected
if S1S0 = 10?
MUX
Solution D2 0
Data
1
select
0 Data
1 output
Data
2
inputs
3
Multiplexers
Question
Solution
Demultiplexers
A demultiplexer (DEMUX) performs the opposite function
from a MUX. It switches data from one input line to two or
more data lines depending on the select inputs.
inputs Y
select variables. Note that the G2B 6
Y
outputs are active-LOW as 7
Look-ahead
A method of binary addition whereby carries from
carry
the preceding adder stages are anticipated, thus
eliminating carry propagation delays.
Selected Key Terms
Demultiplexer A circuit that switches digital data from one input line
(DEMUX) onto a several output lines in a specified time
sequence.