3 Logic Circuits
3 Logic Circuits
Logic Circuits
Logic circuit (digital circuit)
● Propositional logic can be applied to the design of
computer hardware. This was first observed in
1938 by Claude Shannon in his MIT master’s thesis.
12
Inverter (Not Gate)
Input Output
0 1
1 0
13
OR Gate Input
1
1 Output
0
0 1
1
1
1
0
0
1
0 14
AND Gate Input
1
1 Output
0
0 1
0
0
1
0
0
1
0 15
Combinatorial Circuit
● combinational circuit is a type of digital circuit
where the output depends only on the current
inputs and not on any past inputs (i.e., there is
no memory element). These circuits are built
using logic gates such as AND, OR, and NOT to
perform various logical operations.
● A combinatorial circuit is a generalized gate. In
general, such a circuit has m inputs and n
outputs.
16
Find the output of this combinatorial
circuit. Given: p=1, q=1, r=0.
17
Solution:
18
Given: p=1, q=1, r=0.
0
1
1
1
0
0
1
19
20
- (p ˄ (q ˅ -r))
q ˅ -r p ˄ (q ˅ -r)
-r
21
Given: p=0, q=1, r=1.
1
1 0
1
0 1 1
22
-p
-p˄-q
(- p ˄ - q)˅ (p ˄ r)
-q
p˄r
23
Given: p=0, q=0, r=1.
1 1
0
0 1
1
0
1
0
24
Your Turn
p=0 ; q =1
p=1 ; q =0 25
Answers:
-p
-p˅-q
-q
p v (- p ˄ q)
-p
-(p v (- p ˄ q))
-p˄q
26
1
0 1
1
0
1
1
0 0
1
0
0
27
Exercise 1 (Show on the
board)
Build a digital circuit that produces the output
(p ∨ ¬r) ∧ (¬p ∨ (q ∨ ¬r)) when given input
bits p, q, and r.
28
Solution to Exercise 1
(p ∨ ¬r) ∧ (¬p ∨ (q ∨ ¬r))
29
-p
-p ˅ -r
(-p ˅ -r) ˄ -q
-r
-q
-p
-p ˄ (q ˅ r)
q˅r
30
Your Turn
31