Com Logic Circui
Com Logic Circui
Subscribe CIRCUITS
to DeepL ProCOURSE - PF3documents.
to translate larger
Visit www.DeepL.com/pro for more information.
CHAPTER 4: COMBINATORIAL
LOGIC CIRCUITS
Target skills :
By the end of this lesson, learners should be able to :
INTRODUCTION
A combinatorial logic function is any function defined from input variables only, whatever the time
of observation.
Combinatorial circuit: a circuit whose outputs depend solely on the combination of input states at
the moment of observation.
A combinational logic circuit is any circuit whose output state depends solely on the combination
of its inputs. The logic elements (logic gates) used up to now belonged to the SSI (Small Scale
Integration) category, simply because of their simplicity.
The evolution of electronics has led to the design of MSI (Medium Scale Integration) circuits,
which are a little more complex, integrating more gates (12 to 99 gates) and enabling the realization of
all combinatorial logic functions, including arithmetic circuits (adder, subtractor, comparator),
decoders, encoders, multiplexers and demultiplexers.
A B S R 𝑆 = 𝐴̅𝐵 + 𝐴𝐵̅
A S 0 0 0 0 𝑆=𝐴𝐵
½ ADD 0 1 1 0
B R 1 0 1 0
𝑅 = 𝐴𝐵
1 1 0 1
i) Logigramj ) Limits
A B To add two multi-bit numbers, you need to t a k e i n t o
a c c o u n t any carry over from the previous stage.
A B Rn-1 S Rn
0 0 0 0 0
0 0 1 1 0
A A S
S 0 1 0 1 0
0 1 1 0 1
ADD 1 0 0 1 0
s
Output
B
Inputs
B 1 0 1 0 1
Complete
Cin Rn
1 1 0 0 1
Rn-1 1 1 1 1 1
Cost
c) Equations
𝑆= 𝐴̅𝐵̅𝑅 𝑛 −1 + 𝐴̅𝐵 𝑅̅𝑛 -1 + 𝐴𝐵̅𝑅̅𝑛 -1 + 𝐴𝐵𝑅𝑛−1
X X
𝑆 = 𝑅𝑛−1 𝐴 𝐵
Or
𝑛 𝑅= 𝐴𝐵( 𝑅̅𝑛 -1 + 𝑅𝑛−1 ) + 𝑅𝑛−1 (𝐴̅𝐵 + 𝐴𝐵̅)
𝑛 𝑅= 𝐴𝐵 + 𝑅𝑛−1 (𝐴 𝐵)
d) Flow chart
AB Rn-1
Rn
R' = AB
A Rn
½ ADD
S' = A B
B
R'' = Rn-1(A B)
½ ADD
Rn-1 S=A B Rn-1
With 𝑅𝑛 = 𝐴𝐵 + 𝑅𝑛−1 (𝐴 𝐵)
II. Subtractor
II.1 Half-subtractor
It is a logic circuit capable of subtracting one bit from another, and generates at its output a
difference D and the carry R
a) Symbolb ) Truth tablec ) Equations
A S A B D R 𝐷 = 𝐴̅𝐵 + 𝐴𝐵̅
½
0 0 0 0 𝐷=𝐴𝐵
Subtractor
0 1 1 1
B R
1 0 1 0 𝑅 = 𝐴̅𝐵
1 1 0 0
d) Flow chart e) Limits
AB
Just like a half-adder, a subtractor cannot subtract the
difference between two bits, taking into account the previous
D
carry.
A B Rn-1 D Rn
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
A A S
D 0 1 1 0 1
1 0 0 1 0
Subtractor 1 0 1 0 0
s
Output
B
Inputs
B 1 1 0 0 0
complet
e 1 1 1 1 1
Rn-1
Rn
Cin Cost
c) Equations
𝐷= 𝐴̅𝐵 ̅𝑅 𝑛 −1 + 𝐴̅𝐵 𝑅̅𝑛 -1 + 𝐴𝐵̅𝑅 ̅𝑛 -1 + 𝐴𝐵𝑅𝑛−1
d) Flow chart
A B Rn-1
Rn
III. Comparators
A comparator is a combinatorial logic circuit that compares the magnitudes of two binary
quantities to determine the relationship between them (equality, superiority or inferiority).
Consider the following logic comparator with two inputs A and B and three outputs S, E and I:
a) Symbolsb ) Truth table
A B S E I
A S S: Superiority
0 0 0 1 0
s
Output
Inputs
E E: Equality
0 1 0 0 1
1 0 1 0 0
B I I: Inferiority
1 1 0 1 0
d) Flow chart
c) Equation
A B
𝑆 = 𝐴𝐵̅
𝐸 = 𝐴̅𝐵̅ + 𝐴𝐵 = ̅ ̅𝐴
𝐵̅
̅̅ S
𝐼 = 𝐴̅𝐵 E
Note: Most decoders h a v e one or more enable inputs to control their operation.
I.1. Decoders 1 of 2𝑛
For each input combination, only one output line is enabled, i.e. only one of the available M=2𝑛
outputs is activated at a time according to the input binary value.
S0
A0 S1
A1 S2
S3 Outputs
Address
entries Decoder
1 of N
An-1
SN-1
E
A0 is the LSB
S0 A1 A0 S3 S2 S1 S0
A0
S1 0 0 0 0 0 1
Decoder
S2 0 1 0 0 1 0
A1 1 of 4
S3
1 0 0 1 0 0
1 1 1 0 0 0
c) Equation
d) Flow chart
S3 S2 S1 S0
A0 S1 0 0 0 0 0 0 0 0 0 0 1
S2
0 0 1 0 0 0 0 0 0 1 0
S3
A1 Decoder S4
0 1 0 0 0 0 0 0 1 0 0
1 of 8 S5 0 1 1 0 0 0 0 1 0 0 0
A2 S6 1 0 0 0 0 0 1 0 0 0 0
S7 1 0 1 0 0 1 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0 0 0
c) Output equations
S6 = A2A1A̅0 S4 = A 2 A ̅1 A ̅0 S2 = A ̅2 A 1 A ̅0 S0 = A ̅2 A ̅1 A ̅0
d) Flow chart
Notes : Some decoders are equipped with one or more enable inputs that can be activated at either high
or low level to control operation.
✓ When this (these) input(s) at level (x) is (are) active, the decoder operates normally and the state
of the outputs depends on the combination of inputs.
✓ When not active, all outputs are deactivated.
E2 74138 S6
1 X X All outputs in
E3 S7
x 1 X high state Blocking
x X 0
Cascading decoders
StructureTruth table
Inputs DECO 2 outputs DECO 1 outputs
e2 e1 e0 S7 S6 S5 S4 S3 S2 S1 S0
0 0 0 0 0 0 1
0
0
0
0
1
1
1
0
1
0 0
0
1
0
1
0
1
0
0
0
0
0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
e0 S0
1 1 0 0 1 0 0
S1
e1
Decoder 1 S2
1 1 1 1 0 0 0
of 4
S3
V
S4
e0 S5
e1
Decoder S6
e2 1 of 4 S7
V
TAF: 1) Create a 16-output decoder using the 4-output decoders.
This decoder has no validation or validity input. One of the outputs of this circuit goes to
"0" when an address corresponding to the DCB number is applied as input.
Truth table
D C B A Active output
D C B A
0 0 0 0 ̅𝑆0
0 0 0 1 ̅𝑆1
0 0 1 0 ̅𝑆2
0 0 1 1 ̅𝑆3
0 1 0 0 ̅𝑆4
0 1 0 1
74 42
̅𝑆5
0 1 1 0 ̅𝑆6
0 1 1 1 ̅𝑆7
1 0 0 0 ̅𝑆8
1 0 0 1 ̅𝑆9
1 0 1 0
1 0 1 1
1 1 0 0
Blocking
S9 S8 S7 S6 S5 S4 S3 S2 S1 S0 1 1 0 1
1 1 1 0
1 1 1
Task: What logical state will the logic outputs be in when the following numbers are applied to the
input:
Answer:
For DCBA = 0010 = 2, ̅ 𝑆 2 = 0 and the other outputs are set to "1"; the decoder operates normally.
For DCBA = 1100 = 12 ; 12 𝑛′ 𝑎𝑝𝑝𝑎𝑟𝑡𝑖𝑒𝑛𝑡 𝑝𝑎𝑠 at [0 ; 9] so the decoder is blocked
✓ Memory addressing
✓ Function generation
A S0
0 S1
A1 n outputs
M entries CODEUR
A2
Sn-1
V
AM-1
Validation input
II.2. Octal
encoder
This is an eight-channel input circuit which outputs a binary number represented on three (3) bits.
S0 = A1 + A3 + A5 + A7 ; S1 = A2 + A3 + A6 + A7 ; S2 = A4 + A5 + A6 + A7
1 1 1 1 1 1 1 1 1 1 1 1 1
X X X X X X X X 0 0 1 1 0
X X X X X X X 0 1 0 1 1 1
CODEUR
X X X X X X 0 1 1 1 0 0 0
74LS147
X X X X X 0 1 1 1 1 0 0 1
X X X 0 1 1 1 1 1 0 1 0
X X X 0 1 1 1 1 1 1 0 1 1
S1 S2 S1 S0 X X 0 1 1 1 1 1 1 1 1 0 0
X 0 1 1 1 1 1 1 1 1 1 0 1
0 1 1 1 1 1 1 1 1 1 1 1 0
Application: keypad encoder
III. Transcoders
A transcoder is a logic circuit capable of translating information written in any code to another
code.
Commonly referred to as "7-segment BCD decoders", 7-segment DCB transcoders are designed
to control the 7-segment displays widely used in electronic display systems (calculators; digital
multimeters; watches (digital clocks); ...).
They have four inputs and seven outputs. Their operating logic is different from that of the
decoders studied above, since this is not a 1-of-7 decoder, as several outputs can be active for the same
input combination. 7-segment displays show digits (from 0 to 9) by switching on or off 7segments (7
light-emitting diodes) labelled A to G, as shown in the following figures.
a) General arrangement of figures
0 0 0 1 0 1 1 0 0 0 0
0 0 1 0 1 1 0 1 1 0 1
0 0 1 1 1 1 1 1 0 0 1
0 1 0 0 0 1 1 0 0 1 1
0 1 0 1 1 0 1 1 0 1 1
0 1 1 0 0 0 1 1 1 1 1
0 1 1 1 1 1 1 0 0 0 0
1 0 0 0 1 1 1 1 1 1 1
1 0 0 1 1 1 1 0 0 1 1
The outputs of the 7447 are active in the low state, which requires the use of 7-segment displays with
common anodes (all segment anodes are connected to 5V), since grounding the cathode of an LED
causes the corresponding segment to light up.
If the display is common-cathode, use an active high-state transcoder such as the C.I 7448.
The three most common BCD / 7-segment transcoders are the 7447, the 7448 and the 4511 (CMOS
decoder that can be powered from 3V to 18V).
Also known as a data selector, the multiplexer is a data connector logic circuit with 2𝑛 data or
information inputs, n address inputs and a single output that communicates this data. It acts as a multi-
position switch that routes information from any input to the output. Data selection is controlled by n
address inputs, also known as "SELECT" inputs.
I Other representation
N = 2
0 I1 I2 IN-1 information or I0 I1 I2
IN-1
data input
n address
entries or A0 MUX
A0 A1
SELECT A1
MUX
An-1
An-1
S S
Output
Note: The MUX functions as a multi-position switch whose position is given by the numerical code
applied to the address inputs.
Like other logic circuits, the MUX can also have an enable input to control its operation (to eliminate
noise in the MUX).
A 𝐼0 𝐼1 S
MUX 0 𝐼0
A
2 to 1
1 𝐼1 S
S = A̅I 0 + 𝐴I1
S
𝐴1 𝐴0 S
0 0 𝐼0
0 1 𝐼1
1 0 𝐼2
1 1 𝐼3
I0
I1
S
I2
I3
A1 A0
S𝐴2 𝐴1 𝐴0
V S
1 X X X 0
0 0 0 𝐼0
A
0 0 0 1 𝐼1
A1 MUX 0 1 0 𝐼2
0
A2
8 vers 1 0 1 1 𝐼3
V E 1 0 0 𝐼4
1 0 1 𝐼5
1 1 0 𝐼6
By ZEUMO Stève Marius, PLET F2 - LT BANGANG - School year 2019/2020
1 1 1 𝐼7Page 50
DIGITAL CIRCUITS COURSE - PF3
I5 I6 I7
a) output equation
✓ Parallel-serial conversion
✓ Logic function generator
✓ Communication
Application exercises
Exercise 1: Consider the following circuit
I0 I1 I2 I3 I4 I5 I6 I7
Z
SOLUTION :
𝐙= 𝑨̅𝑩 𝑪
̅ 𝑰 𝟏 + 𝑨̅𝑩𝑪𝑰𝟑 + 𝑨𝑩̅𝑪 𝑰̅ 𝟒 + 𝑨𝑩𝑪̅𝑰𝟔 + 𝑨𝑩𝑪𝑰
𝟕
0 0 1 1 𝑰𝟏
0 1 0 0 𝑰𝟐
0 0
1
1
1
0
0
1
0
1
1
1
0
𝑰𝟑
𝑰𝟒
𝑰𝟓
1 1 0 1 𝑰𝟔
1 1 1 1 𝑰𝟕
II.1) Structure
Other representation
Data input
E
E
n address
entries or A0
SELECT A1 DEMUX A0
A1
An-1
An-1 DEMUX
SN-1 S2 S1 S0 N = 2 n
SN-1 S2 S1 S0
Data output information or
data outputs
✓ Serial-to-parallel conversion
✓ Communication
EXERCISE 2: ADDER
A- 1-bit adder
We wish to add two binary numbers A and B, each with a single bit and possibly taking into account the
previous carryover Cn-1 (the outputs are: sum "S" and carryover "C").
1) What's the difference between a half adder and a full adder?
a) Give the structure o f a half-adder and establish its truth table, then construct the logigram of this
circuit.
2) Design of a complete adder
b) Give the structure, then using two half-adders
c) Setting up your truth table
d) Construct chronograms of outputs S and Cn as a function of inputs A, B and Cn-1
e) Establish the equations of S and R, then simplify them
f) Create your own logic diagram using the logic gates of your choice
B- 4-bit adder
We would now like to add two binary numbers A and B, each with 4 bits, possibly taking into
account the previous carryover Cn-1 (the outputs are: sum "Si " and carryover.
"Ci "). The numbers are : A= A A A3210 Aand B= B B B B3210
Wiring this circuit using full adders
EXERCISE 3: Subtractor
1) Give the structure of a half-subtracter that performs the difference of two bits A and B as input
and provides as output the difference bit D=A-B and the carry R. Establish its truth table and
then construct the output logic diagrams using the appropriate logic gates.
2) Complete subtractor
a) Give the structure of a complete subtractor, then starting with two half-adders
b) Setting up your truth table
c) Construct chronograms of outputs S and Cn as a function of inputs A, B and Cn-1
d) Establish the equations of S and R, then simplify them
e) Create your own logic diagram using the logic gates of your choice
EXERCISE 4: Transcoder
A transcoder is a logic circuit capable of translating information from one circuit to another. In
this exercise, we'll be working on a logic circuit capable of encoding a four-bit pure binary number a, b,
c, d to its four-bit reflected binary equivalent (A, B, C, D) (NB: a is the least significant bit and d the
most significant bit).
1) Establish the truth table of this transcoder
2) Establish equations A, B, C and D, then simplify them using the method of your choice.
3) Produce the logic diagram for A using two-input NOR gates only.
EXERCISE 5: We give the truth table and the 74151 circuit below:
A B C X
0 0 0 1
0 0 1 0 A
E0 E1 E2 E3 E4 E5 E6 E7
A0
0 1 0 1 B A1
0 1 1 1 C
A2
MUX 74151
V
1 0 0 0 S
1 0 1 0
1 1 0 0
X
1 1 1 1
A B C D
+Vcc
A1 E0 E E E1 2 E4 E5 E E6 7
3
A2
A3 74151
V
F
2) Let be the function 𝑍 = 𝐴𝐵𝐶 + 𝐴̅𝐵 + 𝐶̅
2.1) Give the truth table of the multiplexer used to achieve this, considering ABC as the address
inputs and Z as the output; A being the least significant bit.
2.2) Give the wiring diagram of this MUX, showing how to establish the interconnections of its
information inputs.
EXERCISE 7:
Design a circuit to implement the logic function
3.
specified in the following table using an 8-input multiplexer,
4.
EXERCISE 8:
5.
Consider the diagram opposite:
B and C) and three enable inputs (E1 , E2 and E3 ) and eight outputs, A
Y1
U1
7 13
A QA
1 12
B QB
2 11
C QC
6 10
D QD
4 9
BI/RBO QE
5 15
RBI QF
3 14
LT QG
74LS48
By searching for so long without finding, you end up finding without searching.
"He who finds without seeking is he who has long sought without finding". Gaston Bachelard
"Thinking signifie to go beyond." Ernst BLOCH (1885-1977)
This is a digital integrated circuit, since the "S" series represents digital
integrated circuits ("T" for analog circuits and "U" for analog-digital circuits).
2) Give the designation of each code characterizing this circuit
SN: manufacturer's code
74: TTL series
LS: TTL subfamily (Low power Schottky type) 138:
Serial number
N: Housing type
0 X X X X X 1 1 1 1 1 1 1 1
X 1 X X X X 1 1 1 1 1 1 1 1 Blocking
X X 1 X X X 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 1 0 1
0 1 0 1 1 1 1 1 0 1 1
100 0
1
1
0
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
Normal operation
1 0 1 1 1 0 1 1 1 1 1
1 1 0 1 0 1 1 1 1 1 1
1 1 1 0 1 1 1 1 1 1 1
5) Write the equations for the outputs Y̅0 , Y̅5 and Y̅7 and then produce their logigrams
using two-input NAND gates.
𝑌̅0 = ̅𝐶̅𝐵̅𝐴̅ = 𝐶 + 𝐵 + 𝐴
𝑌̅5 = ̅𝐶̅𝐵̅𝐴̅ = 𝐶̅ + 𝐵 + 𝐴̅
𝑌̅5 = ̅𝐶̅𝐵̅𝐴̅ = 𝐶̅ + 𝐵̅ + 𝐴̅
C B A
Y0
Y5
Y7
INTRODUCTION
A logic circuit takes the form of an integrated circuit, in which a maximum number of electronic
components (resistors, diodes and transistors) are grouped together in a single package. Integrated
circuits make digital systems more reliable, since they reduce the number of interconnections between
their various components. The widespread use of integrated circuits makes it essential to know and
understand the technological, physical and electrical characteristics of most families of integrated logic
circuits.
Logic integrated circuits are designated by the complexity of the circuits they carry. This
complexity defines the number of gates on the chip. This is referred to as an integration class.
V- Integration classes
There are five classes of integration:
• SSI (Small Scale Integration): 12 doors maximum.
• MSI (Medium Scale Integration): 12 to 99 doors
• LSI (Large Scale Integration): 100 to 999 doors
• VLSI (Very Large Scale Integration): 10000 to 99999 gates
• ULSI (Ultra Large Scale Integration): over 100,000 doors
Depending on their manufacturing technology, logic ICs are classified into several logic
families.
Definition
A logic family is a homogeneous set of components capable of performing basic logic
operations. There are a multitude of logic families. The oldest are :
•The RTL (Resistor Transistor Logic) family: These are integrated circuits consisting o f
input resistors and output transistors.
• The DTL (Diode Transistor Logic) family: It uses diodes as inputs and transistors as
outputs.
These first two families appeared in 1964 and have now completely disappeared. In this chapter,
we'll look at the two most recent and currently popular families, namely :
• The TTL (Transistor Transistor Logic) family: uses bipolar transistor technology;
• The CMOS (Complementary Metal Oxide Semiconductor) family: uses MOS transistor
technology.
Each logic family is characterized by electrical parameters such as power supply and
consumption, and dynamic performances such as propagation delay.
1- Supply voltage :
- TTL logic family: The power supply must be fixed and equal to 5V with a tolerance of ± 5%.
- CMOS logic family: wider choice of supply voltage, from 3V to 18V.
2- Logic levels :
For a given family, the logic levels "0" or "L" (Low) and "1" or "H" (High) do not correspond to a
precise voltage (or current), but to a certain voltage (or current) "range".
Definition of common terminology
ICC : supply current
IIH : High Input current IIL : Low Input current IOH :
High Output current IOL : Low Output current IOS :
Short-circuit current (output to ground)
3- Power consumption
This is the power required by its housing from the supply circuit.
All ICs, when in operation, consume a certain amount of electrical energy. This energy is
supplied by one or more supply voltages connected to the supply pins on the package. This voltage is
called VCC for TTL or VDD for CMOS.
4- Propagation time
In an integrated logic circuit, quantities are transmitted with a delay characteristic of the gate:
this is the propagation time of the information in the gate. A distinction is then made between a high-low
transition (falling edge) and a low-high transition (rising edge):
The propagation time tpd is the time it takes for the circuit to modify its output following a change in input
level. Tpd = TpHL+ TpLH
2
5- Quality factor :
This is the product of propagation time and power consumption.
6- Load factor :
A logic gate cannot accept an unlimited number of gates
connected to its output. For each logic IC, it is therefore possible
to interconnect other ICs within the limits specified by the
manufacturer. The load factor is defined by the circuit's input and
output.
a) Fan out
The maximum number of loads (of other integrated circuits) that it is capable of driving from a
single output is called its output.
• Low-level output : • High-level output :
𝐼𝑂𝐿 𝑚𝑎𝑥 𝐼𝑂𝐻 𝑚𝑎𝑥
𝑆𝐿= (in logical units) 𝑆𝐿= (in logical units)
𝐼𝐼𝐿 𝑚𝑎𝑥 𝐼𝐼𝐻 𝑚𝑎𝑥
b) Entrance
It corresponds to the value of the input control current of a logic circuit expressed in number of
loads.
To simplify calculations, the manufacturers have decided to use a unit load corresponding to 40
µA in the high state and 1.6 mA in the low state. These values correspond to the input current for the
standard TTL series. In the high state, IIH (max) = 40 µA represents the maximum current flowing
through a standard TTL input. Similarly, in the low state, IIL (max) = 1.6 mA represents the maximum
current in the input in the low state.
• High-level output :
7- Noise immunity :
Noise is a parasitic signal induced in the circuit and superimposed on the transmitted signal.
Noise immunity is the amplitude tolerance that the circuit can withstand to identify signals correctly.
9- Type of housing
This is the shell in which the chip is encapsulated, and which also carries the integrated circuit
pins. It can be made of plastic or ceramic.
We distinguish :
• Round cases (which have almost disappeared)
• Flat packages
The flat housings are very thin and a r e soldered on the
component side.
Work to be done:
Draw up the truth table for
each circuit, indicating the
state of each transistor for
each input combination.
NOTES: In the European PRO-ELECTRON code, the first letter identifies the type of
integrated circuit. Thus :
✓ S: digital circuit
✓ T: analog circuit
✓ U: mixed digital/analog circuits
Application exercises
From the 74LS00 manufacturer's documentation, which you will download from the Internet, determine
the following characteristic values (Temperature: 25°C):
- Supply voltage Vcc ; VILmax ; VIHmin ; VOLmax ; VOHmin ; PCmax ; Sortance (high) ; Sortance (low) and
Maximum propagation time tpd
RC2
RC1
R2
R1
D1 T2 D3
5V
R2 VCC R3
T1 5V T
D2 D4 M
e1 e1
R1
M
e2 e2
Figure 2
Figure 1
1) Describe the operation of an ideal diode
2) Describe the operation of a transistor in saturation mode
3) Analyze the circuits, establishing the truth table for each figure.
4) Deduce the function performed by each circuit.