Lecture # 9

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Applications of Logic

Lecture 9
EXERCISE

• An interesting teacher keeps me


awake. I stay awake in Discrete
Mathematics class. Therefore, my
Discrete Mathematics teacher is
interesting.

2
EXERCISE
Solution:
t: my teacher is interesting
a: I stay awake
m: I am in Discrete Mathematics class
the argument to be tested is
t  a,
am
Therefore
mt 3
EXERCISE

4
SWITCHES IN SERIES

P Q
Switches Light Bulb
Light bulb P Q State

Closed Closed On

Closed Open Off


open
Open Closed Off

Open Open Off


closed

5
SWITCHES IN PARALLEL

P Switches Light Bulb

P Q State
Q Closed Closed On
Light bulb
Closed Open On

Open Closed On

Open Open Off

6
SWITCHES IN SERIES

SWITCHES IN SERIES:
Switches Light Bulb P Q P Q

P Q State T T T
Closed Closed On
T F F
Closed Open Off
F T F
Open Closed Off
Open Open Off F F F

7
SWITCHES IN PARALLEL

SWITCHES IN PARALLEL:
Switches Light Bulb P Q PQ

P Q State T T T
Closed Closed On
T F T
Closed Open On
F T T
Open Closed On

Open Open Off F F F

8
NOT-gate
• 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.

9
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.

10
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.

11
COMBINATIONAL CIRCUIT
• A Combinational Circuit is a
compound circuit consisting
of the basic logic gates such
as NOT,AND, OR.
• Rules for Combinational
Circuit
– Inputs can be combined only
with some gate
– Inputs can be split and can be
used for different gates
– Output of one gate can be used
as input for another gate
– Output of same gate can not be
used as an input for the same
gate. 12
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

13
DETERMINING OUTPUT FOR
A GIVEN INPUT

14
CONSTRUCTING THE
INPUT/OUTPUT TABLE FOR A
CIRCUIT
• Construct the input/output
table for the following
circuit.

15
LABELING INTERMEDIATE
OUTPUTS
P X Y
AND NOT
Q
S
OR
R

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
16
0 0 0 0 1 1
FINDING A BOOLEAN
EXPRESSION FOR A CIRCUIT

P
OR
Q
AND

R OR

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

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

R OR

18
CIRCUIT FOR 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

19
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

20
SOLUTION

• Circuit Diagram

P
Q AND S
R
OR
P
~P  Q  R
Q AND
R

21
EXERCISE
• Construct circuit and table for the Boolean expression
(PQ)  ~R
• Find the Boolean expressions for below circuit.

P
Q AND

NOT
OR
AND

AND
22
NOT
EXERCISE
• Design a circuit to take input signals P, Q and R and
output a 1 if, and only if, P and Q have the same value
and Q and R have opposite values.

23

You might also like