Lecture4 Abusubaih
Lecture4 Abusubaih
2
LECTURE OUTLINE
• C om bi n at i on al Lo g i c C i r cui t s
• Steps of Combinational Logic Design
• The XOR Function
• Half Adder
• Full Adder
• Binary Adder/Subtractor
• Binary Multiplier
3
COMBINATIONAL LOGIC
•Combinational logic
circuits can have any
number of inputs and
outputs.
•The logic states of the
inputs at any given instant
determine the state of the
output.
•Sequential circuits, which we will discuss later in this
course, will feature circuits in which the outputs are not
determined solely by the inputs at the same time
4
HOW TO DESIGN A
COMBINATIONAL LOGIC
CIRCUIT?
1. From the specifications of the circuit,
determine the required number of inputs and
outputs and assign a letter (symbol) to each
2. Derive the truth table that defines the
required relationship between the inputs
and outputs
3. Obtain the simplified Boolean functions for
each output as a function of the input variables
(using a K- map)
4. Sketch the logic diagram
5
DESIGN PROBLEM
Design a digital system whose output is defined as
logically low if the 4-bit input binary number is a
multiple of 3; Otherwise, the output will be logically
high. The output is defined if and only if the input
binary number is greater than 2
6
INPUT/OUTPUT RELATIONSHIP
AND TRUTH TABLE
7
BOOLEANFUNCTION
SIMPLIFICATION USINGAK-MAP
8
BOOLEAN FUNCTION SIMPLIFICATION
USING A K-MAP
SOP POS
′ ′ ′ ′ ′ ′
𝑆𝑂𝑃
′ ′ ′ ′ ′
𝑃𝑂𝑆
9
SKETCHING THE
LOGIC DIAGRAM
10
XOR
THE XOR
FUNCTION
X Y Z
The XOR symbol is denoted as 0 0 0
Its Boolean operation is ′ ′ 0 1 1
1 0 1
The XNOR symbol is denoted as 1 1 0
X Y Z
0 0 1
Commutative and associative: 0 1 0
1 0 0
1 1 1
11
THE XOR
IMPLEMENTATION
• The output analysis for the first
circuit is very easy!
• At L1: ′
L2
L1 L4
L3
12
THE XOR
IMPLEMENTATION
• The output analysis for the first
circuit is very easy!
• At L1: ′
𝒙 L2
𝒙 ′ + 𝒚′ 𝒙′ + 𝒚
• At L2: L4
′ ′ ′ ′ ′ ′
L1
𝒙 ′ + 𝒚′ 𝒙 + 𝒚′
• At L3: 𝒚 L3
′ ′ ′ ′ ′
13
THE XOR IMPLEMENTATION
• The output analysis for the first
circuit is very easy!
• At L1: ′
L2
• At L2: L4
′ ′ ′ ′ ′ ′ L1
• At L3: L3
′ ′ ′ ′ ′
• At L4:
′ ′ ′ ′
14
ARITHMETIC CIRCUITS
15
ARITHMETIC CIRCUITS
• An arithmetic circuit is a
combinational circuit that outputs one digit
performs arithmetic operations
such as: outputs two digits!
• Addition
• Subtraction carry sum
• Multiplication
• Division
16
HALF ADDER
It is required to design a combinational circuit that adds
two binary numbers and produces the output in the form
of two bits, sum and carry
Solution:
1. We need to determine the inputs and output of the
system and give letters for all of them: Our system
has two inputs (x, y) and two outputs (S, C)
x S
y Half Adder C
17
HALF ADDER
2. Derive the truth table Inputs Outputs
according to the given
relation between inputs and x y C S
outputs 0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
18
HALF ADDER
3. Obtain the simplified Boolean functions for each output as a
function of the input variables using a K-map
′ ′
19
HALF ADDER
4. Sketch the logic diagram
20
FULL ADDER
It is required to design a combinational circuit that
adds three binary numbers and produces the
output in the form of two bits, sum and carry
Solution:
1. We need to determine the inputs and outputs of
the system and give letters for all of them: Our
system has three inputs (x, y, z) and two outputs
(S, C)
x
S
y Full Adder
C
z
21
FULL ADDER
2. Derive the truth Inputs Outputs Decimal
table according Equivalent
to the given
relation between x y z C S
the inputs and 0 0 0 0 0 0
outputs 0 0 1 0 1 1
0 1 0 0 1 1
0 1 1 1 0 2
1 0 0 0 1 1
1 0 1 1 0 2
1 1 0 1 0 2
1 1 1 1 1 3
22
FULL ADDER
3. Obtain the simplified Boolean functions for each output as
a function of the input variables using a K-map
′ ′ ′ ′ ′ ′
Remember that:
, ′ ′ , ′ ′
23
FULL ADDER
3. Obtain the simplified Boolean functions for each output as a
function of the input variables using a K-map
′ ′ ′ ′ ′ ′
′ ′ ′ ′ ′
′ ′ ′ ′
Remember that:
, ′ ′ , ′ ′
24
FULL ADDER
3. Obtain the simplified Boolean functions for each output as a
function of the input variables using a K-map
Remember that:
, ′ ′ , ′ ′
25
FULL ADDER
3. Obtain the simplified Boolean functions for each output as a
function of the input variables using a K-map
Remember that:
, ′ ′ , ′ ′
26
FULL ADDER
3. Obtain the simplified Boolean functions for each output
as a function of the input variables using a K-map
27
FULL ADDER
4. Sketch the logic diagram
′ ′ ′ ′ ′ ′
28
FULL ADDER
• The logic circuit for the full adder could also be sketched
using two half adders and a single OR gate
Half adder Half adder
′ ′
29
FULL ADDER
• The logic circuit for the full adder could also be sketched
using two half adders and a single OR gate
Half adder Half adder
′ ′
′ ′
30
33
4-BIT BINARY RIPPLE CARRY
ADDER
𝟑 𝟑 𝟐 𝟐 𝟏 𝟏 𝟎 𝟎
𝟒 𝟑 𝟐 𝟏 𝟎
35
SUBTRACTION EXAMPLE
36
BINARY MULTIPLIER
2 bits × 2 bits = max 4 bits
2 2 2
10 10 10
2 3 1 0
3 2 1 0
38