Lecture # 06
Lecture # 06
Lecture # 06
Application of logic in Digital Logic
Circuits.
Logic have application in many diverse fields. But we study
the application of logic that have relevance in computer
science.
We will see how logic will use to simplify the circuits. This
idea is given by an American scientist, when he was not actually
a scientist, he was just a student.
Notations:
a battery,
2 switches P & Q
Light bulb
P R
Input Output
P R
1 0
0 1
AND-GATE
An AND-gate is a circuit with two input signals and one
output signal.
If both input signals are 1, the output signal is 1.
Otherwise the output signal is 0.
Input Output
P P Q R
AND R
1 1 1
Q
1 0 0
0 1 0
0 0 0
OR-GATE
An OR-gate is a circuit with two input signals and one
output signal.
If both input signals are 0, then the output signal is 0.
Otherwise, the output signal is 1.
Input Output
P
OR
R P Q R
Q
1 1 1
1 0 1
0 1 1
0 0 0
COMBINATIONAL CIRCUIT
A Combinational Circuit is a compound circuit consisting
of the basic logic gates such as NOT, AND, OR.
Example:
P
Q AND
OR s
R
NOT
Rules to form a COMBINATIONAL
CIRCUIT
To combine two inputs we will MUST use any gate.
The output of one gate can be use for input for other
gates.
1 1
0
0
0 1
Output S = 1
INPUT/OUTPUT Table for a Circuit
Construct the input/output table for the following circuit.
P
AND NOT
Q
S
OR
R
P
OR
Q
AND
R OR
FINDING A BOOLEAN EXPRESSION FOR
A CIRCUIT
Find a Boolean expression for a circuit?
P
OR
Q
AND
R OR
Solution:
Trace through the circuit from left to right, writing down
the output of each logic gate.
P
P Q
PQ
Q OR (P Q)
(PQ) (P
(PR) R)
PR AND
PR
R OR
SOLUTION
P PQ
Q AND (P Q) ~R
OR
~R
R NOT
Exercise: Draw a circuit for a following
Input/output Table
INPUTS OUTPUT
P Q R S
1 1 1 0
1 1 0 1
1 0 1 0
1 0 0 0
0 1 1 1
0 1 0 0
0 0 1 0
0 0 0 0
SOLUTION:
INPUTS OUTPUT
P Q R S
1 1 1 0
1 1 0 1 P Q ~R
1 0 1 0
1 0 0 0
0 1 1 1 ~P Q R
0 1 0 0
0 0 1 0
0 0 0 0
CIRCUIT DIAGRAM: HOMEWORK
Draw the circuit diagram of the Boolean expression:
(P Q ~R) (~P Q R) = S
Exercise:
Design a circuit to take input signals P, Q and R and
output is 1 if, and only if, P and Q have the same value
and Q and R have opposite values.
Solution:
P
Q AND
NOT
OR
AND
AND
NOT