2. • Two classes of logic circuits:
• Combinational Circuits
• Sequential Circuits
• A Combinational circuit consists of logic
gates
• Output depends only on input
• A Sequential circuit consists of logic gates
and memory
• Output depends on current inputs and previous
ones (stored in memory)
• Memory defines the state of the circuit.
3. Output is function of input only
i.e. no feedback
When input changes, output may change (after a delay)
•
•
•
•
•
•
n inputs m outputs
Combinational
Circuits
5. Analysis
Given a circuit, find out its function
Function may be expressed as:
Boolean function
Truth table
Design
Given a desired function, determine its circuit
Function may be expressed as:
Boolean function
Truth table
C
B
A
C
B
A
B
A
C
A
C
B
F1
F2
?
?
?
6. Boolean Expression Approach
C
B
A
C
B
A
B
A
C
A
C
B
F1
F2
T2=ABC
T1=A+B+C
F2=AB+AC+BC
F’2=(A’+B’)(A’+C’)(B’+C’)
T3=AB'C'+A'BC'+A'B'C
F1=AB'C'+A'BC'+A'B'C+ABC
F2=AB+AC+BC
11. C
B
A
C
B
A
B
A
C
A
C
B
F1
F2
Truth Table Approach
= 1
= 0
= 0
= 1
= 0
= 0
= 1
= 0
= 1
= 0
= 0
= 0
0
1
0
0
0
0
1
1
1
A B C F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
12. C
B
A
C
B
A
B
A
C
A
C
B
F1
F2
Truth Table Approach
= 1
= 0
= 1
= 1
= 0
= 1
= 1
= 0
= 1
= 1
= 0
= 1
0
1
0
1
0
1
0
0
0
A B C F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
13. C
B
A
C
B
A
B
A
C
A
C
B
F1
F2
Truth Table Approach
= 1
= 1
= 0
= 1
= 1
= 0
= 1
= 1
= 1
= 0
= 1
= 0
0
1
1
0
0
1
0
0
0
A B C F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
14. C
B
A
C
B
A
B
A
C
A
C
B
F1
F2
Truth Table Approach
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 1
1
1
1
1
1
1
0
0
1
A B C F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
B
0 1 0 1
A 1 0 1 0
C
B
0 0 1 0
A 0 1 1 1
C
F1=AB'C'+A'BC'+A'B'C+ABC F2=AB+AC+BC
15. Given a problem statement:
Determine the number of inputs and outputs
Derive the truth table
Simplify the Boolean expression for each output
Produce the required circuit
Example:
Design a circuit to convert a “BCD” code to “Excess 3”
code
4-bits
0-9 values
4-bits
Value+3
?
16. Excess 3 code It is a basically a binary code which is
made by adding 3 with the equivalent decimal of a
binary number and again converting it into binary
number. So if we consider any binary number we have to
first convert it into decimal number then add 3 with it
and then convert it into binary and we will get the
excess 3 equivalent of that number.
17. BCD-to-Excess 3 Converter
A B C D w x y z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
1 0 1 0 x x x x
1 0 1 1 x x x x
1 1 0 0 x x x x
1 1 0 1 x x x x
1 1 1 0 x x x x
1 1 1 1 x x x x
C
1 1 1
B
A
x x x x
1 1 x x
D
C
1 1 1
1
B
A
x x x x
1 x x
D
C
1 1
1 1
B
A
x x x x
1 x x
D
C
1 1
1 1
B
A
x x x x
1 x x
D
w = A+BC+BD x = B’C+B’D+BC’D’
y = C’D’+CD z = D’
18. BCD-to-Excess 3 Converter
A B C D w x y z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
1 0 1 0 x x x x
1 0 1 1 x x x x
1 1 0 0 x x x x
1 1 0 1 x x x x
1 1 1 0 x x x x
1 1 1 1 x x x x
w
x
D
C
z
y
B
A
w = A + B(C+D)
x = B’(C+D) + B(C+D)’
y = (C+D)’ + CD
z = D’
19. Seven-Segment Display
• A seven-segment display is digital readout
found in electronic devices like clocks, TVs,
etc.
• Made of seven light-emitting diodes (LED)
segments; each segment is controlled separately.
20. a
b
c
g
e
d
f
?
w
x
y
z
a
b
c
d
e
f
g
w x y z a b c d e f g
0 0 0 0 1 1 1 1 1 1 0
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 1 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 1 0 1 1
1 0 1 0 x x x x x x x
1 0 1 1 x x x x x x x
1 1 0 0 x x x x x x x
1 1 0 1 x x x x x x x
1 1 1 0 x x x x x x x
1 1 1 1 x x x x x x x
y
1 1 1
1 1 1
x
w
x x x x
1 1 x x
z
BCD code
a = w + y + xz + x’z’ b = . . .
c = . . .
d = . . .
21. Design Problem:01
Write the Boolean logic Equation and draw
the logic circuit that represents the following
statement:
“A bank burglar alarm (A) is to activate if it
is after bank hours (H) and the front door (F)
is opened or if it is after banking hours (H)
and the vault door is opened (V)”.
23. Design Problem:03
Design a system called a parallel binary
comparator, that compares the 4 – bit binary
string A to the 4 – bit binary string B. if the
strings are exactly equal, provide a HIGH –
level output to drive a warning buzzer.
24. Half Adder
The half adder adds two one-bit binary numbers
(AB). The output is the sum of the two bits (S)
and the carry (C)
Adds 1-bit plus 1-bit
Produces Sum and Carry
HA
x
y
S
C
x y C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
x
+ y
───
C S
x
y
S
C
25. Full Adder
The full-adder circuit adds three one-bit binary
numbers and outputs two one-bit binary
numbers, a sum (S) and a carry (C1)
Adds 1-bit plus 1-bit plus 1-bit
Produces Sum and Carry
x y z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
x
+ y
+ z
───
C S
FA
x
y
z
S
C
y
0 1 0 1
x 1 0 1 0
z
y
0 0 1 0
x 0 1 1 1
z
S = xy'z'+x'yz'+x'y'z+xyz = x y z
C = xy + xz + yz
30. A digital circuit that produces the arithmetic
sum of two binary numbers
• How to build an adder for n-bit numbers?
• Example: 4-Bit Adder
• Inputs ?
• Outputs ?
• What is the size of the truth table?
• How many functions to optimize?
31. • How to build an adder for n-bit numbers?
• Example: 4-Bit Adder
• Inputs ? 9 inputs
• Outputs ? 5 outputs
• What is the size of the truth table? 512 rows!
• How many functions to optimize? 5 functions
32. 1 0 0 0
0 1 0 1
+ 0 1 1 0
1 0 1 1
To add n-bit numbers:
• Use n Full-Adders in Cascade.
• The carries propagates as in addition by hand.
Carry in
This adder is called ripple carry adder
34. Half Subtractor
A logic circuit which is used for subtracting one
single bit binary number from another single
bit binary number is called half subtractor.