Você está na página 1de 25

1

Basic Digital Logic


(Lab Session)
Ferdinand M. Fernando
Asst. Professor I

2
Basic Digital Logic
Review
Logic Circuit F. M. Fernando URSM-College of Engineering
2
3
Review
Digital Electronics makes use of 2
states:
Logic High, or 1
Logic Low, or 0
Logic Circuit F. M. Fernando URSM-College of Engineering
4
Review
There are 3 basic digital gates:

AND

OR

NOT
Logic Circuit F. M. Fernando URSM-College of Engineering
3
5
Review
AND, where ALL inputs must be 1
for the output to be 1
OR, where ANY of the inputs can be 1
for the output to be 1
NOT (or the Inverter) where the
output is the opposite
(compliment) of the input.
Logic Circuit F. M. Fernando URSM-College of Engineering
6
Review Questions
What is the outcome of the following:
1
1
0
1
0
1
1
Logic Circuit F. M. Fernando URSM-College of Engineering
1
1
0
0
4
7
Standard Logic Symbols Based
on ANSI/IEEE Std. 91-1984
Logic Circuit F. M. Fernando URSM-College of Engineering
The Inverter
The inverter (NOT circuit) performs
the operation called inversion or
complementation.
Standard logic symbols:
1


1


input output input output
Logic Circuit F. M. Fernando URSM-College of Engineering 8
5
Inverter Truth Table & Logic
Expression
Input Output
LOW (0) HIGH (1)
HIGH (1) LOW (0)
A X = A
0 1
1 0
Logic Circuit F. M. Fernando URSM-College of Engineering
9
The AND Gate & Its
Operation
The AND gate is composed of two or
more inputs and a single output.



For a 2-input AND gate:
Output X is HIGH only when inputs A
and B are HIGH
X is LOW when either A or B is LOW, or
when both A and B are LOW.
&


A
B
X
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering 10
6
AND Gate Truth Table
The total number of possible combinations of
binary inputs to a gate is determined by:
N = 2
n

Therefore:
2 bits (n=2) = 4 combinations
3 bits = 8 combinations
4 bits = 16 combinations
INPUTS OUTPUT
A B X
0 0 0
0 1 0
1 0 0
1 1 1
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering 11
AND Gate Logic
Expressions
Use either:
X = A B ,or
X = AB
If there are more than 2 inputs, do as
below:

A
B
X
X= ABC
X= ABCD
A
B
C
A
B
C
D
Logic Circuit F. M. Fernando URSM-College of Engineering
12
7
The OR Gate
Like AND gate, an OR gate has two
or more inputs and one output.



For a 2-input OR gate:
output X is HIGH when either input A or
input B is HIGH, or when both A and B
are HIGH.
X is LOW only when both A and B are
LOW.
A
B
X
1



A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
13
OR Gate Truth Table
INPUTS OUTPUT
A B X
0 0 0
0 1 1
1 0 1
1 1 1
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering 14
8
OR Gate Logic Expressions
Use the operator + for OR operation
X = A + B
If there are more than 2 inputs, do as
below:

X= A+B+C
X= A+B+C+D
A
B
C
A
B
C
D
Logic Circuit F. M. Fernando URSM-College of Engineering 15
Basic Digital Logic
Basic Combinational Logic,
NAND and NOR gates
(Lab Session)
Logic Circuit F. M. Fernando URSM-College of Engineering 16
9
Combinational Logic
A circuit that utilizes more that 1
logic function has Combinational
Logic.

As an example, if a circuit has an
AND gate connected to an Inverter
gate, this circuit has combinational
logic.
Logic Circuit F. M. Fernando URSM-College of Engineering 17
18
Combinational logic
How would your describe the output
of this combinational logic circuit?
Logic Circuit F. M. Fernando URSM-College of Engineering
10
19
NAND Gate
The NAND gate is the combination
of an NOT gate with an AND gate.

The Bubble in front of the gate is an inverter.
Logic Circuit F. M. Fernando URSM-College of Engineering
The NAND Gate
NAND = NOT-AND



For a 2-input NAND gate:
Output X is LOW only when inputs A
and B are HIGH
X is HIGH when either A or B is LOW, or
when both A and B are LOW
&


A
B
X
A
B
X
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering 20
11
NAND Gate Truth Table & Logic
Expression
INPUTS OUTPUT
A B X
0 0 1
0 1 1
1 0 1
1 1 0
A
B
X
The Boolean expression for the
output of a 2-input NAND gate is
X = AB
Logic Circuit F. M. Fernando URSM-College of Engineering
21
Negative-OR Equivalent of a
NAND
For a 2-input NAND gate performing
a negative-OR operation
Output X is HIGH when either input A or
input B is LOW or when both A and B
are LOW
NAND Negative-OR
Logic Circuit F. M. Fernando URSM-College of Engineering
22
12
23
Combinational logic
How would your describe the output
of this combinational logic circuit?
Logic Circuit F. M. Fernando URSM-College of Engineering
24
NOR gate
The NOR gate is the combination of
the NOT gate with the OR gate.
The Bubble in front of the gate is an inverter.
Logic Circuit F. M. Fernando URSM-College of Engineering
13
25
NAND and NOR gates
The NAND and NOR gates are very
popular as they can be connected in
more ways that the simple AND and
OR gates.
Logic Circuit F. M. Fernando URSM-College of Engineering
The NOR Gate
NOR = NOT-OR



For a 2-input NOR gate:
Output X is LOW when either input A or
input B is HIGH, or when both A and B
are HIGH
X is HIGH only when both A and B are
LOW
A
B
X
A
B
X

1



A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
26
14
NOR Gate Truth Table & Logic
Expression
INPUTS OUTPUT
A B X
0 0 1
0 1 0
1 0 0
1 1 0
The Boolean expression for the
output of a 2-input NOR gate is
X = A+B
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
27
Negative-AND Equivalent of a
NOR
For a 2-input NOR gate performing a
negative-AND operation
Output X is HIGH only when both inputs
A and B are LOW
NOR Negative-AND
Logic Circuit F. M. Fernando URSM-College of Engineering
28
15
The XOR and XNOR Gates
Exclusive-OR and Exclusive-NOR
gates are formed by a combination
of other gates already discussed.
Because of their fundamental
importance in many applications,
these gates are often treated as
basic logic elements with their own
unique symbols.
Logic Circuit F. M. Fernando URSM-College of Engineering
29
The XOR Gate
For a 2-input exclusive-OR gate:
Output X is HIGH when input A is LOW
and input B is HIGH, or when input A is
HIGH and input B is LOW
X is LOW when A and B are both HIGH
and both LOW

= 1



A
B
X
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
30
16
XOR Gate Truth Table & Logic
Expression
INPUTS OUTPUT
A B X
0 0 0
0 1 1
1 0 1
1 1 0
The Boolean expression for the
output of a 2-input XOR gate is
X = A+B
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
31
The XNOR Gate
For a 2-input exclusive-NOR gate:
Output X is LOW when input A is LOW
and input B is HIGH, or when input A is
HIGH and input B is LOW
X is HIGH when A and B are both HIGH
and both LOW

= 1



A
B
X
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
32
17
XNOR Gate Truth Table & Logic
Expression
INPUTS OUTPUT
A B X
0 0 1
0 1 0
1 0 0
1 1 1
The Boolean expression for the
output of a 2-input XNOR gate is
X = A+B
A
B
X
Logic Circuit F. M. Fernando URSM-College of Engineering
33
34
Exercise (a bit challenging)
Logic Circuit F. M. Fernando URSM-College of Engineering
Turn the NAND and NOR gates into
inverter (NOT) gates. Include a
switch for the input.
18
35
Basic Digital Logic
Chips and Gates
(Lab Session)
Logic Circuit F. M. Fernando URSM-College of Engineering
36
Basic Digital Chips
Digital Electronics devices are
usually in a chip format.
The chip is identified with a part
number or a model number.
A standard series starts with
numbers 74, 4, or 14.
7404 is an inverter
7408 is an AND
7432 is an OR
7400 is a NAND
Logic Circuit F. M. Fernando URSM-College of Engineering
19
7400 Series TTL
Integrated Circuit
7400 - NAND (four gates per chip)
7402 - NOR (four gates per chip)
7404 - NOT (six gates per chip)
7408 - AND (four gates per chip)
7432 - OR (four gates per chip)
7486 - XOR (four gates per chip)
37 37
Logic Circuit F. M. Fernando URSM-College of Engineering
38 38
Logic Circuit F. M. Fernando URSM-College of Engineering
20
39
Chips Pinouts
Basic logic chips
often come in 14-pin
packages.
Package sizes and
styles vary.
Pin 1 is indicated
with a dot or half-
circle
Numbers are read
counter-clockwise
from pin 1 (viewed
from the top)
Pin 1 Pin 7
Pin 14 Pin 8
Logic Circuit F. M. Fernando URSM-College of Engineering
40
Chips Pinouts
Chips require a
voltage to function

Vcc is equal to 5
volts and is typically
pin 14

Ground is typically
pin 7
Pin 1 Pin 7
Pin 14 Pin 8
Logic Circuit F. M. Fernando URSM-College of Engineering
21
NUMBERING SYSTEM FOR
DIGITAL ICs
41 41 41
Logic Circuit F. M. Fernando URSM-College of Engineering
42
NUMBERING SYSTEM FOR
DIGITAL ICs
42 42 42
Logic Circuit F. M. Fernando URSM-College of Engineering
22
43 43
NUMBERING SYSTEM FOR
DIGITAL ICs
43 43 43
Logic Circuit F. M. Fernando URSM-College of Engineering
44 44 44 44 44
Logic Circuit F. M. Fernando URSM-College of Engineering
23
45
Wiring a chip
Vcc
Vcc
IN
IN
OUT
LED or
Probe
Logic Circuit F. M. Fernando URSM-College of Engineering
46
Layout of the (Logic Trainer
Kit) Experimenter's Board
Logic Circuit F. M. Fernando URSM-College of Engineering
24
47
Flat Side
Wires
7400
Component Placement on
Breadboard
Logic Circuit F. M. Fernando URSM-College of Engineering
48
Equivalent Logic Diagram
Logic Circuit F. M. Fernando URSM-College of Engineering
25
49
Case Project 1
(Guessing Game)
Using the 74XX series IC, build an equivalent of the logic
game that works as follows:
a) One player, using 4 switches, creates a 4-bit combination.
These switches are hidden from his opponent.
b) Another player will try to guess the combination of the 4
switches using another set of switches.
c) A BLUE LED will indicate whether the combination of the 4
hidden switches is correct. If any of the switches is incorrect, a
RED LED will be ON instead. The LEDs cannot be both ON.
Solution should include at least 3 proposed circuit designs and
your recommendation which among these circuits is your choice
with corresponding justification.
Logic Circuit F. M. Fernando URSM-College of Engineering

Você também pode gostar