BIM203 - 06 - Combinational Functions
BIM203 - 06 - Combinational Functions
Combinational Functions
Overview
▪ Combinational Functions
• Functions and functional blocks
• Rudimentary logic functions
• Decoding using Decoders
▪ Implementing Combinational Functions
with Decoders
• Encoding using Encoders
• Selecting using Multiplexers
▪ Implementing Combinational Functions
with Multiplexers
BIM203 Logic Design Combinational Functions 2
Functions and Functional Blocks
▪ The functions considered are those found to be
very useful in design
▪ Corresponding to each of the functions is a
combinational circuit implementation called a
functional block.
▪ In the past, functional blocks were packaged as
small-scale-integrated (SSI), medium-scale
integrated (MSI), and large-scale-integrated
(LSI) circuits.
▪ Today, they are often simply implemented within
a very-large-scale-integrated (VLSI) circuit.
BIM203 Logic Design Combinational Functions 3
Rudimentary Logic Functions
▪ Functions of a single variable X
TABLE 4-1
▪ Can be used on the
Functions of One Variable
inputs to functional
blocks to implement X F=0 F=X F= X F=1
1 F5 1 F5 1 X F5 X
(c)
0 F5 0 F5 0
X F5 X
▪ Multi-bit Examples:
A F3 A
3 2
1 F2 1 2 4 4 2:1 F(2:1)
F F
0 F1 0 1
0 (c)
A F0 A
(a) (b) 3
4 3,1:0 F(3), F(1:0)
▪ A wide line is used to represent F
a bus which is a vector signal (d)
▪ In (b) of the example, F = (F3, F2, F1, F0) is a bus.
▪ The bus can be split into individual bits as shown in (b)
▪ Sets of bits can be split from the bus as shown in (c)
for bits 2 and 1 of F.
▪ The sets of bits need not be continuous as shown in (d) for bits 3, 1, and
0 of F.
BIM203 Logic Design Combinational Functions 5
Enabling Function
▪ Enabling permits an input signal to pass
through to an output
▪ Disabling blocks an input signal from passing
through to an output, replacing it with a fixed
value
▪ The value on the output when it is disable can
be Hi-Z (as for three-state buffers and
transmission gates), 0 , or 1 ENX F
(a)
D2 A1A0
▪ Note that the 2-4-line
made up of 2 1-to-2- D3 A1A0
line decoders and 4 AND gates.
(b)
BIM203 Logic Design Combinational Functions 8
Decoder Expansion
▪ General procedure given in book for any decoder with
n inputs and 2n outputs.
▪ This procedure builds a decoder backward from the
outputs.
▪ The output AND gates are driven by two decoders with
their numbers of inputs either equal or differing by 1.
▪ These decoders are then designed using the same
procedure until 2-to-1-line decoders are reached.
▪ The procedure can be modified to apply to decoders
with the number of outputs ≠ 2n
EN A 1 A 0 D0 D1 D2 D3 D1
0 X X 0 0 0 0
1 0 0 1 0 0 0 D2
1 0 1 0 1 0 0
1 1 0 0 0 1 0
D3
1 1 1 0 0 0 1
(a) (b)
BIM203 Logic Design Combinational Functions 13
Combinational Logic Implementation
- Decoder and OR Gates
▪ Implement m functions of n variables with:
• Sum-of-minterms expressions
• One n-to-2n-line decoder
• m OR gates, one for each output
▪ Approach 1:
• Find the truth table for the functions
• Make a connection to the corresponding OR from
the corresponding decoder output wherever a 1
appears in the truth table
▪ Approach 2
• Find the minterms for each output function
• OR the minterms together 14
BIM203 Logic Design Combinational Functions
Decoder and OR Gates Example
▪ Implement the following set of odd parity functions of
(A7, A6, A5, A4)
P1 = A7 + A5 + A4 A7 0 P1
P2 = A7 + A6 + A4 A6 1
2
+
P4 = A7 A6 A5 + A5 3
A 4
▪ Finding sum of 4 5 P2
6
minterms expressions 7
8
P1 = Sm(1,2,5,6,8,11,12,15) 9
P2 = Sm(1,3,4,6,8,10,13,15)
10
11
P4
P4 = Sm(2,3,4,5,8,9,14,15) 12
13
▪ Find circuit 14
15
▪ Is this a good idea?
BIM203 Logic Design Combinational Functions 15
Encoding
▪ Encoding - the opposite of decoding - the conversion
of an m-bit input code to a n-bit output code with n
m 2n such that each valid code word produces a
unique output code
▪ Circuits that perform encoding are called encoders
▪ An encoder has 2n (or fewer) input lines and n output
lines which generate the binary code corresponding
to the input values
▪ Typically, an encoder converts a code containing
exactly one bit that is 1 to a binary code corres-
ponding to the position in which the 1 appears.
BIM203 Logic Design Combinational Functions 16
Encoder Example
▪ A decimal-to-BCD encoder
• Inputs: 10 bits corresponding to decimal
digits 0 through 9, (D0, …, D9)
• Outputs: 4 bits with BCD codes
• Function: If input bit Di is a 1, then the
output (A3, A2, A1, A0) is the BCD code for i,
▪ The truth table could be formed, but
alternatively, the equations for each of the
four outputs can be obtained directly.
I0
Y
S
I1
4 3 2 AND-OR
S0
Decoder
S1
S0
I0
Y
I1
Y
I2
I3
I1
S1
Y
I2
I3
(b)
A S1 8-to-1 A S1 8-to-1
B S0 MUX B S0 MUX
▪ Note that this approach (Approach 2) reduces the cost by
almost half compared to Approach 1.
▪ This result is no longer ROM-like
▪ Extending, a function of more than n variables is decomposed
into several sub-functions defined on a subset of the variables.
The multiplexer then selects among these sub-functions.
BIM203 Logic Design Combinational Functions 36
Terms of Use
▪ All (or portions) of this material © 2008 by Pearson
Education, Inc.
▪ Permission is given to incorporate this material or
adaptations thereof into classroom presentations and
handouts to instructors in courses adopting the latest
edition of Logic and Computer Design Fundamentals as
the course textbook.
▪ These materials or adaptations thereof are not to be
sold or otherwise offered for consideration.
▪ This Terms of Use slide or page is to be included within
the original materials or any adaptations thereof.