Download presentation
Presentation is loading. Please wait.
1
Application: Digital Logic Circuits
Lecture 4 Section 1.4 Mon, Jan 17, 2005
2
Logic Gates Three basic logic gates Two other gates AND-gate OR-gate
NOT-gate Two other gates NAND-gate (NOT-AND) NOR-gate (NOT-OR)
3
AND-Gate Output is 1 if both inputs are 1.
Output is 0 if either input is 0. p q Output 1
4
OR-Gate Output is 1 if either input is 1.
Output is 0 if both inputs are 0. p q Output 1
5
NOT-Gate Output is 1 if input is 0. Output is 0 if input is 1. p
6
NAND-Gate Output is 1 if either input is 0.
Output is 0 if both inputs are 1. p q Output 1
7
NOR-Gate Output is 1 if both inputs are 0.
Output is 0 if either input is 1. p q Output 1
8
Disjunctive Normal Form
A logical expression is in disjunctive normal form if It is a disjunction of clauses. Each clause is a conjunction of variables and their negations. Each variable or its negation appears in each clause exactly once.
9
Examples: Disjunctive Normal Form
p q (p q) (p q) (p q). p q (p q) (p q). p | q (p q) (p q) (p q). p q p q.
10
Conjunctive Normal Form
A logical expression is in conjunctive normal form if It is a conjunction of clauses. Each clause is a disjunction of variables and their negations. Each variable or its negation appears in each clause exactly once.
11
Examples: Conjunctive Normal Form
p q p q. p q (p q) (p q). p | q p q. p q (p q) (p q) (p q).
12
Output Tables An output table shows the output of the circuit for every possible combination of inputs. Inputs Output 1
13
Designing a Circuit Write an output table for the circuit.
Write the expression in disjunctive normal form. Simplify the expression as much as possible. Write the circuit using AND-, OR-, and NOT-gates.
14
Example: Designing a Circuit
Design a circuit for (p q). Inputs Output p q 1
15
Example: Designing a Circuit
(p q) is equivalent to p q. Draw the circuit using an AND-gate and a NOT-gate.
16
Example: Designing a Circuit
Design a circuit for (p q) (q r). Inputs Output p q r 1
17
Example: Designing a Circuit
(p q) (q r) is equivalent to (p q r) (p q r) (p q r). Does this simplify? In any case, we can draw a circuit, although it may not be optimal.
18
Puzzle Three men apply for a job.
They are equally well qualified, so the employer needs a way to choose one. He tells them “On the forehead of each of you I will put either a red dot or a blue dot.” “At least one of you will have a red dot.” “The first one who can tell me the color of the dot on his forehead gets the job.”
19
Puzzle The employer proceeds to put a red dot on each man’s forehead.
After a few moments, one of them says, “I have a red dot.” How did he know?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.