Xs-Logic Gates & Truth Tables (More Expressive)
Xs-Logic Gates & Truth Tables (More Expressive)
2
Gates
Six types of gates
– NOT
– AND
– OR
– XOR
– NAND
– NOR
Typically, logic diagrams are black and white with
gates distinguished only by their shape
We use color for emphasis (and fun)
3
NOT Gate
A NOT gate accepts one input signal (0 or 1) and
returns the opposite signal as output
4
AND Gate
An AND gate accepts two input signals
If both are 1, the output is 1; otherwise,
the output is 0
5
OR Gate
An OR gate accepts two input signals
If both are 0, the output is 0; otherwise,
the output is 1
6
XOR Gate
An XOR gate accepts two input signals
If both are the same, the output is 0; otherwise,
the output is 1
7
XOR Gate
Note the difference between the XOR gate
and the OR gate; they differ only in one
input situation
When both input signals are 1, the OR gate
produces a 1 and the XOR produces a 0
8
NAND Gate
The NAND gate accepts two input signals
If both are 1, the output is 0; otherwise,
the output is 1
10
Review of Gate Processing
A NOT gate inverts its single input
11
Combinational Circuits
Gates are combined into circuits by using the output of one gate as
the input for another
12
Combinational Circuits
D E
A B A+B=D
A.B = C Not D = E C+E=X
0 0 0 0 1
1
0 1 0 1 0
0
1 0 0 1 0
0
1 1 1 1 0
1
A B NOT A = C A+B=D C.D=E Not E = F D+F
0 0 1 0 0 1 0
0 1 1 1 1 0 0
1 0 0 1 0 1 0
1 1 0 1 0 1 0
Combinational Circuits
Consider the following Boolean expression A . (B + C) = A . D = X
18
Compare it with previous table
Combinational Circuits
Circuit equivalence
Two circuits that produce the same output for identical input
Boolean algebra allows us to apply provable mathematical
principles to help design circuits
A(B + C) = AB + BC (distributive law) so circuits must be equivalent
19
CPU Chips
The most important integrated circuit
in any computer is the Central Processing
Unit, or CPU
Each CPU chip has a large number of pins
through which essentially all
communication in a computer system
occurs
20
• Activity : Produce truth tables for each of the following
logic circuits. You are advised to split them up into
intermediate parts to help eliminate errors.