5 - digital logic with boolean algebra. boolean algebra andmultiplication you have seen this as p^q...
TRANSCRIPT
5 - Digital Logic with Boolean Algebra
Boolean AlgebraBoolean Algebra
ANDANDMultiplicationMultiplication
You have seen this as p^qYou have seen this as p^q
Usually Represented as AB or A*BUsually Represented as AB or A*B
A B AB
1 1 1
1 0 0
0 1 0
0 0 0
Boolean AlgebraBoolean Algebra
ORORAdditionAddition
You have seen this as pvqYou have seen this as pvq
Commonly Represented as A+BCommonly Represented as A+B
A B A+B
1 1 1
1 0 1
0 1 1
0 0 0
Boolean AlgebraBoolean Algebra
NOTNOTInverseInverse
You have seen this as ~p or ~qYou have seen this as ~p or ~q
Usually Represented as A’ or A#Usually Represented as A’ or A#
A A’
1 0
0 1
PropertiesProperties
Basic PropertiesBasic PropertiesA+1=1A+1=1
A*0=0A*0=0
A+A=AA+A=A
A*A=AA*A=A
Double Negative LawDouble Negative Law(A’)’=A(A’)’=A
Complement LawComplement LawA’+A=1A’+A=1
A*A’=0A*A’=0
PropertiesProperties
Law of Common IdentitiesLaw of Common IdentitiesA*(A’+B)=ABA*(A’+B)=AB
A+(A’B)=A+BA+(A’B)=A+B
DeMorgan’s TheoremDeMorgan’s TheoremA’+B’=(AB)’A’+B’=(AB)’
(A+B)’=A’B’(A+B)’=A’B’
Boolean Algebra to Logic GatesBoolean Algebra to Logic Gates
Logic circuits are built from components called Logic circuits are built from components called logic gates.logic gates.The logic gates correspond to Boolean operations The logic gates correspond to Boolean operations +, *, +, *, ’.’.
Binary operations have two inputs, unary has oneBinary operations have two inputs, unary has one
OR+
AND*
NOT’’
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.
5v
5v
5v
Input AOutput X
Input B
AND
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…
Logic 0
Logic 0
Logic 0
Logic 0
Logic 0
Logic 1
Logic 1
Logic 0
Logic 0
Logic 1
Logic 1
Logic 1
A B X
0 0 0
0 1 0
1 0 0
1 1 1
ANDAND
A
B
A*B
Logic Gate:
Series Circuit:
A B
A*B
AA BB A*BA*B
00 00 00
00 11 00
11 00 00
11 11 11
Truth Table:
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.
Input AOutput X
Input B
OR
5v
5v
5v
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…
Logic 0
Logic 0
Logic 0
Logic 0
Logic 1
Logic 1
Logic 1
Logic 1
Logic 0
Logic 1
Logic 1
Logic 1
A B X
0 0 0
0 1 1
1 0 1
1 1 1
A
B
A+B
Logic Gate:
Parallel Circuit:
A
B
AA BB A+BA+B
00 00 00
00 11 11
11 00 11
11 11 11
Truth Table:A+B
OROR
5v
The NOT Gate (inverter):
Input A Output X
A X
0 1
1 0
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.
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…
Logic 1OFF
Logic 0
ONLogic 1
OFF
Logic 0
ONLogic 1
OFF
Logic 0
ON
nn-input Gates-input Gates
Because + and * are binary operations, they can Because + and * are binary operations, they can be cascaded together to OR or AND multiple be cascaded together to OR or AND multiple inputs.inputs.
AB
C
ABC
A+B+C
A+B+C
AB
ABC
ABC
ABC
nn-bit Inputs-bit Inputs
For convenience, it is sometimes useful to think For convenience, it is sometimes useful to think of the logic gates processing of the logic gates processing nn-bits at a time. -bits at a time.
This really refers to This really refers to nn instances of the logic instances of the logic
gate, not a single logic date with gate, not a single logic date with nn-inputs.-inputs.
1101100101
01001101111101110111
10001111
0011110000001100
110001 001110
Logic Circuits Logic Circuits ≡≡ Boolean Expressions Boolean Expressions
All logic circuits are equivalent to Boolean expressions and All logic circuits are equivalent to Boolean expressions and any boolean any boolean expression can be rendered as a logic circuit.expression can be rendered as a logic circuit.AND-OR logic circuits are equivalent to sum-of-products form.AND-OR logic circuits are equivalent to sum-of-products form.Consider the following circuits:Consider the following circuits:
A
CB abc
aBc
Ab
y=abc+aBc+Ab
y
A
B
C
Y
y=aB+Bc
NAND and NOR GatesNAND and NOR Gates
NAND and NOR gates can greatly simplify circuit NAND and NOR gates can greatly simplify circuit diagrams. As we will see, can you use these gates diagrams. As we will see, can you use these gates wherever you could use AND, OR, and NOT.wherever you could use AND, OR, and NOT.
NAND
NOR
AA BB AABB
00 00 11
00 11 11
11 00 11
11 11 00
AA BB AABB
00 00 11
00 11 00
11 00 00
11 11 00
XOR and XNOR GatesXOR and XNOR Gates
XOR is used to choose between two mutually XOR is used to choose between two mutually exclusive inputs. Unlike OR, XOR is true only exclusive inputs. Unlike OR, XOR is true only when one input or the other is true, not both.when one input or the other is true, not both.
XOR
XNOR
AA BB AABB
00 00 00
00 11 11
11 00 11
11 11 00
A B A B
0 0 1
0 1 0
1 0 0
1 1 1
NAND and NOR as Universal Logic GatesNAND and NOR as Universal Logic Gates
Any logic circuit Any logic circuit can be built using can be built using only NAND gates, only NAND gates, or only NOR or only NOR gates. They are gates. They are the only logic the only logic gate needed.gate needed.
Here are the Here are the NAND NAND equivalents:equivalents:
NAND and NOR as Universal Logic Gates (cont)NAND and NOR as Universal Logic Gates (cont)
Here are the NOR Here are the NOR equivalents:equivalents:
NAND and NOR NAND and NOR can be used to can be used to reduce the reduce the number of number of required gates in required gates in a circuit.a circuit.
Practice ProblemsPractice Problems
Predict the simplified output & develop a Truth Predict the simplified output & develop a Truth Table:Table:
1.1. 2. 2.
3. 3. 4. 4.