Chapter 3 Logic Gates
Chapter 3 Logic Gates
0 1
LOW HIGH
Logic Gates
The truth table for NOT gate
INPUT OUTPUT
A Y=A
0 1
1 0
INPUT OUTPUT
A B X = AB
0 0 0
0 1 0
1 0 0
1 1 1
Logic Gates
The OR gate
Is composed of two or more inputs and a
single output, and it performs logical addition
The logical operation of the OR gate is such
that the output is HIGH (1) when any of the
inputs are HIGH, otherwise it is LOW (0)
The standard logic symbols for the OR gate
are:
1
1
Logic Gates
The truth table for OR gate
INPUT OUTPUT
A B X = A+B
0 0 0
0 1 1
1 0 1
1 1 1
Logic Gates
The NOR (NOT OR) gate
Is composed of two or more inputs and a single
output and it has a universal property
The term NOR is a contraction of NOT–OR and
implies an OR function with an inverted output
The logical operation of the NOR gate is such
that the output is HIGH (1) only when all the
inputs are LOW
The standard logic symbols for the NOR gate
are: 1
1
Logic Gates
The truth table for NOR gate
INPUT OUTPUT
A B X =A+B
0 0 1
0 1 0
1 0 0
1 1 0
Logic Gates
The NAND (NOT AND) gate
Is composed of two or more inputs and a
single output
It is a very popular logic element because it
may be used as a universal function
That is, it may be employed to construct an
inverter, an AND gate, an OR gate, or any
combination of these functions
The term NAND is a contraction of NOT-AND
and implies an AND function with an inverted
output
The logical operation of the NAND gate is such
that the output is LOW (0) only when all the
inputs are HIGH (1)
Logic Gates
The standard logic symbols for the NAND gate:
&
&
A B X = AB
0 0 1
0 1 1
1 0 1
1 1 0
Logic Gates
The XOR (EXCLUSIVE OR) Gate
It has two input terminals and one output
terminal
Usually formed from the combination of other
logic gates
Is an "inequality" function and the output is
HIGH (1) when the inputs are not equal to
each other
The standard logic symbols for the XOR gate:
=1
=1
Logic Gates
The truth table for XOR gate is
INPUT OUTPUT
A B X
0 0 0
0 1 1
1 0 1
1 1 0
Logic Gates
The XNOR (EXCLUSIVE NOR)
It has two input terminals and one output
terminal
Usually formed from the combination of other
logic gates
Is an "equality" function and the output is
HIGH (1) when the inputs are equal to each
other
The standard logic symbol for the XNOR gate:
=1
=1
Logic Gates
The truth table for XNOR gate is
INPUT OUTPUT
A B X
0 0 1
0 1 0
1 0 0
1 1 1
Logic Gates
The truth table below summarizes the
output states for all 2-input gates
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1
Logic Gates
The truth table below summarizes the
output states for all 3-input gates
INPUT OUTPUT
A B C AND NAND OR NOR
0 0 0 0 1 0 1
0 0 1 0 1 1 0
0 1 0 0 1 1 0
0 1 1 0 1 1 0
1 0 0 0 1 1 0
1 0 1 0 1 1 0
1 1 0 0 1 1 0
1 1 1 1 0 1 0
Combination of Logic Gates
Logic gates can be combined to produce
more complex functions
They can also be combined to substitute
one type of gate for another
For example to produce an output Q
which is true only when input A is true and
input B is false, as shown in the truth table
below,
INPUT A INPUT B OUTPUT Q
0 0 0
0 1 0
1 0 1
1 1 0
Combination of Logic Gates
we can combine a NOT gate and an AND
gate like this
Q = A AND NOT B
Combination of Logic Gates
Truth tables can be used to work out the
function and the output of a combination
of gates
For example
D = NOT (A OR B)
E = B AND C
Q = D OR E (NOT(A OR B)) OR (B AND C)
Chapter 3: Combination of Logic
Gates
INPUTS OUTPUTS
A B C D E Q
0 0 0 1 0 1
0 0 1 1 0 1
0 1 0 0 0 0
0 1 1 0 1 1
1 0 0 0 0 0
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 1 1
Combination of Logic Gates
signment
Compute the truth table for the following combinational logic
& &
A A
1
C
1 F C F
& &
& &
D
B B
Combination of Logic Gates
Logic gates are available on ICs which usually
contain several gates of the same type
For example four 2-input NAND gates or
three 3-input NAND gates
This can be wasteful if only a few gates are
required
To avoid using too many different gates you
can reduce the number of gate inputs or
substitute one type of gate for another
The number of inputs to a gate can be
reduced by connecting two (or more) inputs
together
Combination of Logic Gates
The diagram below shows a 3-input AND
gate operating as a 2-input AND gate
AND
OR
NOR
CHAPTER FOUR
Boolean Functions
A Boolean function is an expression formed with
binary variables and logical operators
0+0=0 0∙0=0
0+1=1 0∙1=0
1+0=1 1∙0=0
1+1=1 1∙1=1
Laws of Boolean Algebra
Cummutative Law
The commutative law of addition for two
variables is algebraically expressed as
A+B=B+A
The commutative law of multiplication for two
variables is expressed as
AB = BA
Associative Laws
The associative law of addition of three
variables is expressed as
A + (B + C) = (A + B) + C
Laws of Boolean Algebra
The associative law of multiplication of three
variables is expressed as
A(BC) = (AB)C
Distributive Law
The distributive law of three variables is
expressed as follows:
A (B+C) = AB + AC
Rules of Boolean Algebra
Rule Number Boolean Expression
1 A+0=A
2 A+1=1
3 A∙0=0
4 A∙1=A
5 A+A=A
6 A+A=1
7 A∙A =A
8 A ∙A=0
9 A=A
10 A + AB = A
11 A + AB = A + B
12 (A+B)(A+C) = A + BC
13
14
Boolean Algebra
De Morgan’s theorems may be verified by
examining the truth tables of Boolean
expressions
For example: A+B= A∙B
A B A+B
0 0 A
1 B
1 A1B A0B 0
0 1 1 0 0 1 1
1 0 0 1 0 1 1
1 1 0 0 0 1 1
Boolean Algebra
DUALITY
Every sum-of-products equation has a dual
product-of-sums equation and vice versa
A L N
B P
C
Q