LOGIC GATES
Digital Signals
A digital signal has two discrete levels or values. Two representations
of digital signals are as shown below.
5V 5V
High Low
3.5V 3.5V
1V 1V
Low High
0V 0V
(a) (b)
In each case there are two discrete levels and the levels can be
represented using the terms LOW and HIGH. Fig (a), the lower of the
two levels has been designated as LOW and higher level as HIGH level.
In Fig. (b), the designation has been reversed.
Digital systems using the representation in Fig. (a) are said to employ
positive logic system and those using the other representation of Fig.
(b) are said to employ negative logic system.
Truth Tables
A truth table is means of describing how a logic circuit’s output
depends on the logic levels present at the circuit’s inputs e.g.
Inputs Outputs
A B X
0 0 0
0 1 1
1 0 1
1 1 0
Truth table for three or four inputs can also been drawn depending on
the inputs present at circuit.
Boolean Expression
It’s a simple mathematical tool allows the description of the
relationship between logic circuit output (s) and its inputs as an
algebraic equation e.g.
A B B A B
BASIC LOGIC GATES
Logic gates are the basic building blocks for forming digital electronic
circuitry. It has one output terminal and one or more input terminals.
Some of these gates include:-
a) INVERTER (or NOT gate)
1
,b) AND gate
c) OR gate
d) NAND gate
e) NOR gate
f) Exclusive-OR gate (EXOR)
g) Exclusive-NOR gate
The INVERTER, AND and OR gate are the basic gates. The NAND,
NOR, Exclusive-OR and Exclusive-NOR gates are derived gates.
(i) The INVERTER or NOT gate
Its gate that performs inversion (or complementation) operation. It has
one input (A) and one output (B).
Its logic symbols are as shown.
1
A Y A Y
(a) (b)
The truth table of a NOT gate is
Input Output
A Y
0 1
1 0
The operation of a NOT gate can be expressed in the Boolean
expression as
XA
It states that the output X is complement or opposite of the input
A i.e. X = 0 if
A = 1, and X = 1 if A = 0.
AN electronic implementation this gate is as shown.
5V(VCC )
Vo
Vi
Inverter electronic circuit
When Vi is low (0 V) transistor is cut off and is unable to conduct,
thus full voltage of Vcc is available at the output. Whereas when
2
, Vi is high (+5 V), it will make the transistor to conduct and thus
giving a low Vo
(ii) The AND gate
It’s composed of 2 or more inputs and a single output. Its logic
symbol for 2-input AND gate is as shown.
A
Y
B
The truth table of a 2-input AND gate is
Inputs outputs
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
Logic operation: An AND gate produces a HIGH (1) output only when
all of the inputs are HIGH (1) else the output is LOW (1).
Example 1 Determine the total number of possible input combinations
of a 3-input AND gate. Sketch a logic symbol and develop a truth table
for this logic gate.
Solution
A 3-input AND gate has eight possible combination i.e. 2 3 8 . The
symbol and truth table of a 3-input AND gate is as shown.
A
B Y
C
Inputs Outputs
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
3
, Exercise: Determine the total number of possible input combinations of a
4-input AND gate. Sketch a logic symbol and develop a truth table for this
logic gate.
Pulse operation of an AND gate
Example 2 Consider the two waveforms below:-
A
A Y
B
B
Y
t1 t2 t3 t4 t5 t6
Hence, applying the rules of AND gate as shown in the truth
table, the output Y as shown in obtained.
Example 3 The Fig. below shows two input waveforms, A and B applied
to an AND
gate.
1
A 0
A Y
1
B B
0
1
Y
0
t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
Boolean Expression for an AND gate
The operation of an AND gate can be expressed in the Boolean
expression
Y AB
The AND operation can be extended to more than two variables. For
example, the three and four input AND operation Boolean expressions
are expressed as:-
Y ABC and Y ABCD
The electronic implementation this gate is as shown below.
4
Digital Signals
A digital signal has two discrete levels or values. Two representations
of digital signals are as shown below.
5V 5V
High Low
3.5V 3.5V
1V 1V
Low High
0V 0V
(a) (b)
In each case there are two discrete levels and the levels can be
represented using the terms LOW and HIGH. Fig (a), the lower of the
two levels has been designated as LOW and higher level as HIGH level.
In Fig. (b), the designation has been reversed.
Digital systems using the representation in Fig. (a) are said to employ
positive logic system and those using the other representation of Fig.
(b) are said to employ negative logic system.
Truth Tables
A truth table is means of describing how a logic circuit’s output
depends on the logic levels present at the circuit’s inputs e.g.
Inputs Outputs
A B X
0 0 0
0 1 1
1 0 1
1 1 0
Truth table for three or four inputs can also been drawn depending on
the inputs present at circuit.
Boolean Expression
It’s a simple mathematical tool allows the description of the
relationship between logic circuit output (s) and its inputs as an
algebraic equation e.g.
A B B A B
BASIC LOGIC GATES
Logic gates are the basic building blocks for forming digital electronic
circuitry. It has one output terminal and one or more input terminals.
Some of these gates include:-
a) INVERTER (or NOT gate)
1
,b) AND gate
c) OR gate
d) NAND gate
e) NOR gate
f) Exclusive-OR gate (EXOR)
g) Exclusive-NOR gate
The INVERTER, AND and OR gate are the basic gates. The NAND,
NOR, Exclusive-OR and Exclusive-NOR gates are derived gates.
(i) The INVERTER or NOT gate
Its gate that performs inversion (or complementation) operation. It has
one input (A) and one output (B).
Its logic symbols are as shown.
1
A Y A Y
(a) (b)
The truth table of a NOT gate is
Input Output
A Y
0 1
1 0
The operation of a NOT gate can be expressed in the Boolean
expression as
XA
It states that the output X is complement or opposite of the input
A i.e. X = 0 if
A = 1, and X = 1 if A = 0.
AN electronic implementation this gate is as shown.
5V(VCC )
Vo
Vi
Inverter electronic circuit
When Vi is low (0 V) transistor is cut off and is unable to conduct,
thus full voltage of Vcc is available at the output. Whereas when
2
, Vi is high (+5 V), it will make the transistor to conduct and thus
giving a low Vo
(ii) The AND gate
It’s composed of 2 or more inputs and a single output. Its logic
symbol for 2-input AND gate is as shown.
A
Y
B
The truth table of a 2-input AND gate is
Inputs outputs
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
Logic operation: An AND gate produces a HIGH (1) output only when
all of the inputs are HIGH (1) else the output is LOW (1).
Example 1 Determine the total number of possible input combinations
of a 3-input AND gate. Sketch a logic symbol and develop a truth table
for this logic gate.
Solution
A 3-input AND gate has eight possible combination i.e. 2 3 8 . The
symbol and truth table of a 3-input AND gate is as shown.
A
B Y
C
Inputs Outputs
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
3
, Exercise: Determine the total number of possible input combinations of a
4-input AND gate. Sketch a logic symbol and develop a truth table for this
logic gate.
Pulse operation of an AND gate
Example 2 Consider the two waveforms below:-
A
A Y
B
B
Y
t1 t2 t3 t4 t5 t6
Hence, applying the rules of AND gate as shown in the truth
table, the output Y as shown in obtained.
Example 3 The Fig. below shows two input waveforms, A and B applied
to an AND
gate.
1
A 0
A Y
1
B B
0
1
Y
0
t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
Boolean Expression for an AND gate
The operation of an AND gate can be expressed in the Boolean
expression
Y AB
The AND operation can be extended to more than two variables. For
example, the three and four input AND operation Boolean expressions
are expressed as:-
Y ABC and Y ABCD
The electronic implementation this gate is as shown below.
4