Digital Logic Gates
4There are three types of logic gates from
which we can build all digital computers.
4They’re all isomorphic ally related to
semantic logic operators.
* Iff stands for ‘If and only if.’
Consider:
Iff* Sally asks John AND John accepts, then
They will go out to dinner.
Digital Logic Gates
4Let T (*) be the truth value operator:
– g = T (They will go out to dinner)
– A = T (Sally Asks John)
– B = T (John Accepts)
4g=A AND B = A B = A B
– (Iff, then provide the semantic equivalent of
the equal sign.)
Digital Logic Gates
4There is an electrical analog to the AND operator.
+
-
A B (F) 0 (F) 0 (F) 0
A B g=A B
Truth Table
AND Operator
0 1 0
1 0 0
1 1 1
4When argument is true => Switch closed
4AND Result true => Light on
Digital Logic Gates
4If we treat:
– T=1=+5 Volts
– F=0= 0 Volts
4We can build an electrical device that performs the
logical AND operation on the voltage equivalent
of logical values. An AND gate has the electrical
schematic:
A
B g=A B 0 0 0
A B g=A B Truth Table
AND Operator
0 1 0
1 0 0
1 1 1
Digital Logic Gates
4Consider:
Iff Sally asks John OR Beth Asks John then,
He will go to the dance.
4Let T (*) be the truth value operator:
– g = T (He will go to the dance)
– A = T (Sally Asks John)
– B = T (Beth Asks John)
4g=A OR B = A + B
Digital Logic Gates
4There is an electrical analog to the OR operator.
(F) 0 (F) 0 (F) 0
A B g=A + B
Truth Table
OR Operator
0 1 1
1 0 1
1 1 1
A
+
-
B
4When argument is true => Switch closed
4OR Result true => Light on
Digital Logic Gates
4If we treat:
– T=1=+5 Volts
– F=0= 0 Volts
4We can build an electrical device that performs the
logical OR operation on the voltage equivalent of
logic values. An OR gate has the electrical
schematic:
0 0 0
A B g=A + B Truth Table
OR Operator
0 1 1
1 0 1
1 1 1
A
B g=A + B
Digital Logic Gates
4One Last Logical operator/gate - NOT
4All digital computers are built using ONLY
these three gate types: AND, OR Inverter
A g=A=A’
A g= A
NOT Operator
Truth Table
Digital Logic Gates
• All our truth tables had 4 inputs
combinations:
– 2 Ways to pick the first input
– 2 Ways to pick the second input
– 2 2=22 Input Combinations
– How many input combinations for a 3 input
gate?
Digital Logic Gates
How to Create Truth Table?
• 3 Input AND/OR Truth Tables
3-input AND3-input AND
Truth Table Truth Table
Digital Logic Gates
3-Input OR3-Input OR
Truth Table Truth Table
Example of Wave Form
A
g
B
A
B g=A + B
0 0 0
A B g=A + B Truth Table
0 1 1
1 0 1
1 1 1
Rules for wiring gates together
Do not wire two outputs together.
Obey the fan out rules of TTL family: Typically
1 TTL gate can drive 10 other TTL gates.
Do not leave inputs floating.
Digital Logic Gates
1
0
0
4Using AND, OR, and NOT gates, draw a
schematic diagram for:
g=A B +CA
Practice Problem
4Note: The implied order of association and
evaluation is the same as in linear algebra:
NAND Gate=NOT (AND)
NANDNAND
Truth Table Truth Table
A
B
Y= A B
NORNOR
Truth Table Truth Table
A
B
Y= A + B
NOR Gate = NOT(OR)
AB A BA
B
A
B
A + B A + B
Digital Logic Gates
• Exclusive OR: Output = 1 if
odd number of inputs = 1 3-Input XOR3-Input XOR
Truth Table Truth Table
ABC
Y= A B C+ +
B
+A Y= A B = A B + A B
Digital Logic Gates
B
+A Y= A B = A B + A B
Digital Logic Gates
B
A
Exclusive NOR gate (XNOR)
4 Using NAND/NOR logic draw a
schematic for:
g=A B + C A
Digital Logic Gate