Transcript Document

5 - Digital Logic with
Boolean Algebra
Boolean Algebra
AND
Multiplication
You have seen this as p^q
Usually Represented as AB or A*B
A
B
AB
1
1
1
1
0
0
0
1
0
0
0
0
Boolean Algebra
OR
Addition
You have seen this as pvq
Commonly Represented as A+B
A
B
A+B
1
1
1
1
0
1
0
1
1
0
0
0
Boolean Algebra
NOT
Inverse
You have seen this as ~p or ~q
Usually Represented as A’ or A͞
A
A’
1
0
0
1
Properties
Basic Properties
A+1=1
A*0=0
A+A=A
A*A=A
Double Negative Law
(A’)’=A
Complement Law
A’+A=1
A*A’=0
Properties
Law of Common Identities
A*(A’+B)=AB
A+(A’B)=A+B
DeMorgan’s Theorem
A’+B’=(AB)’
(A+B)’=A’B’
Boolean Algebra to Logic Gates
Logic circuits are built from components called
logic gates.
The logic gates correspond to Boolean operations
+, *, ’.
OR
+
AND
*
NOT
’
Binary operations have two inputs, unary has one
The AND Gate:
Truth Table: The table shows that the AND gate responds with a high at the output if the signal
applied to the input A and B are both high.
Animation: In order to see how it works, the gate has been connected to 2 switches and LED. Continue to
see the system in action…
5v
AND
Logic 1
0
Input A
5v
Output X
Input B
5v
Logic 1
0
Logic 10
A
B
X
0
0
0
0
1
0
1
0
0
1
1
1
AND
Logic Gate:
A
A*B
B
A
B
Series Circuit:
A*B
Truth Table:
A
0
0
B
0
1
A*B
0
0
1
1
0
1
0
1
The OR Gate:
Truth Table: The table shows that the OR gate responds with a high at the output if the signal
applied to the input A or B is high.
Animation: In order to see how it works, the gate has been connected to 2 switches and LED. Continue to
see the system in action…
5v
OR
Logic 1
0
5v
Input A
Output X
Input B
5v
Logic 1
0
Logic 10
A
B
X
0
0
0
0
1
1
1
0
1
1
1
1
OR
Logic Gate:
A
A+B
B
A
Parallel Circuit:
B
A+B
Truth Table:
A
0
0
B
0
1
A+B
0
1
1
1
0
1
1
1
The NOT Gate (inverter):
Truth Table: Is a chart that lists the input condition on the left and the gate’s
output response on the right. The table shows that the NOT gate responds at the
output with the inverse of the signal applied to the input.
A
X
0
1
1
0
Animation: In order to see how it works, the gate has been connected to a switch and LED. Continue to see
the system in action…
5v
Input A
Logic 1
Logic 0
Output X
OFF
ON
n-input Gates
Because + and * are binary operations, they can
be cascaded together to OR or AND multiple
inputs.
A
B
A
B
C
C
A
A+B+C B
A+B+C
A
B
C
ABC
ABC
n-bit Inputs
For convenience, it is sometimes useful to think
of the logic gates processing n-bits at a time.
This really refers to n instances of the logic
gate, not a single logic date with n-inputs.
1101100101
0100110111
10001111
00111100
110001
1101110111
00001100
001110
Logic Circuits ≡ Boolean Expressions
All logic circuits are equivalent to Boolean expressions and any boolean
expression can be rendered as a logic circuit.
AND-OR logic circuits are equivalent to sum-of-products form.
Consider the following circuits:
A
B
C
y=aB+Bc
abc
aBc
y
Ab
y=abc+aBc+Ab
A
B
C
Y
NAND and NOR Gates
NAND and NOR gates can greatly simplify circuit
diagrams. As we will see, can you use these gates
wherever you could use AND, OR, and NOT.
NAND
NOR
A
B
AB
0
0
1
0
1
1
1
0
1
1
1
0
A
B
AB
0
0
1
0
1
0
1
0
0
1
1
0
XOR and XNOR Gates
XOR is used to choose between two mutually
exclusive inputs. Unlike OR, XOR is true only
when one input or the other is true, not both.
XOR
XNOR
A
B
AB
0
0
0
0
1
1
1
0
1
1
1
0
A
B
A B
0
0
1
0
1
0
1
0
0
1
1
1
NAND and NOR as Universal Logic Gates
Any logic circuit
can be built using
only NAND gates,
or only NOR
gates. They are
the only logic
gate needed.
Here are the
NAND
equivalents:
NAND and NOR as Universal Logic Gates (cont)
Here are the NOR
equivalents:
NAND and NOR
can be used to
reduce the
number of
required gates in
a circuit.
Practice Problems
Predict the simplified output & develop a Truth
Table:
1.
2.
3.
4.