0% found this document useful (0 votes)
14 views

Lecture # 06

Uploaded by

70148553
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Lecture # 06

Uploaded by

70148553
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

APPLICATION OF LOGIC

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.

 He note down the Analogy between the operation of


switching devices and the operation of logical connectives. He
identify that how to simply a circuit and the problems occurs
in the circuit, how to solve them by using laws of logic.

 He identify a method through which we simplify a circuit


through logic.
Basic components of circuits

Switches “in series”


Switches “in parallel”

 Notations:
a battery,
2 switches P & Q
Light bulb

 If switches are open then current can not pass through


them.
SWITCHES IN SERIES
Switches Light Bulb
P Q State
Closed Closed On
Closed Open Off
Open Closed Off
Open Open Off
SWITCHES IN PARALLEL
Switches Light Bulb
P Q State
Closed Closed On
Closed Open On
Open Closed On
Open Open Off
SWITCHES IN SERIES

Switches Light Bulb


P Q State P Q PQ
Closed Closed On T T T
Closed Open Off T F F
Open Closed Off F T F
Open Open Off F F F
SWITCHES IN PARALLEL
Switches Light Bulb
P Q State P Q PQ
Closed Closed On T T T
Closed Open On T F T
Open Closed On F T T
F F F
Open Open Off
Vocabulary
BULB Output
ON 1 True
OFF 0 False

 Electronic engineer name these switches logical gates.


NOT GATE or INVERTOR
 A NOT-gate (or inverter) is a circuit with one input and
one output signal. If the input signal is 1, the output signal
is 0. Conversely, if the input signal is 0, then the output
signal is 1.

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.

 We can split input and use it for different gates.

 The output of one gate can be use for input for other
gates.

 The output of one gate CANNOT be used for input for


the same gate. (this rule is specific to combinational
circuit, not implemented to other circuits)
DETERMINING OUTPUT FOR A GIVEN
INPUT
 Indicate the output of the circuit below when the input
signals are P = 1, Q = 0 and R = 0
OUTPUT FOR A GIVEN INPUT
P = 1, Q = 0 and R = 0

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

 LABELING INTERMEDIATE OUTPUTS


P X Y
AND NOT
Q
S
OR
R
TRUTH TABLE FOR CIRCUIT
P Q R X Y S
TRUTH TABLE FOR CIRCUIT
P Q R X Y S
1 1 1 1 0 1
1 1 0 1 0 0
1 0 1 0 1 1
1 0 0 0 1 1
0 1 1 0 1 1
0 1 0 0 1 1
0 0 1 0 1 1
0 0 0 0 1 1
BOOLEAN VARIABLE & BOOLEAN
EXPRESSION
 The variable that have only two possible values, that
variable is called Boolean Variable.

 When we connect Boolean variables with different AND,


OR and NOT connective, the resultant expression is
called Boolean Expression.
FINDING A BOOLEAN EXPRESSION FOR
A CIRCUIT
 Find a Boolean expression for a circuit?

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
PQ

Q OR (P  Q)
(PQ)  (P
(PR)  R)
PR AND
PR

R OR

Hence (P  Q)  (P  R) is the Boolean expression for this circuit.


Methods to describe a digital circuit
 There are three methods to describe a digital circuit.

 Draw it with the help of gates.


 Describe any digital circuit with the help of truth table.
 Write a Boolean expression for any digital circuit.
EXERCISE
 Construct circuit for the Boolean expression
(PQ)  ~R

 SOLUTION
P PQ

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:

Step1: Draw a table


Step 2: In output we have 1 only when we have same
values of P and Q and opposite values of Q and R, both
the conditions should be fulfilled.
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 0
0 1 0 0
0 0 1 1 ~P~QR
0 0 0 0
 S ≡ (p ∧ q ∧ ~r) ∨ (~p ∧ ~q ∧ r) Boolean Expression
EXERCISE:
 Find the Boolean expression for this circuit and simplify
by using laws of logic.

P
Q AND

NOT
OR
AND

AND
NOT

You might also like