You are on page 1of 49

2.

2
Perform operations
with
Boolean algebra
LEARNING OUTCOMES
After learning this is chapter, student
will be able to :
 Draw the logic symbols for the logic gates.
 Develop truth table of logic gates.
 Write Boolean Expression for the logic
gates.
INTRODUCTION
 
Boolean functions are implemented in digital computer circuits
called gates.
A gate is an electronic device that produces a result based on
two or more input values.
– In reality, gates consist of one to six transistors, but digital
designers think of them as a single unit.
– Integrated circuits contain collections of gates suited to a
particular purpose. Vs – is ground = 0 Volts
Vd – high voltage – for all the
things we’re doing, this is
+5V, but there are many
possibilities.
Vg – gate voltage – depending on
this value, the electrons can
or can not flow from high to
low voltage.
Continue…..

 Logic gates are the basic building blocks for forming digital
electronic circuitry. A logic gate has one output terminal and
one or more input terminals. Its output will be HIGH (1) or LOW
(0) depending on the digital level(s) at the input terminal(s).
Through the use of logic gates, we can design digital systems
that will evaluate digital input levels and produce a specific
output response based on that particular logic circuit design.
The five basic logic gates are the NOT (inverter), AND, OR,
NAND, AND NOR.
Voltage inverted from
input
Logic Gates

Voltage from
input This is the logic for a This is the logic for an
NAND gate. AND gate.

Depending on the It’s simply a NAND


values of A, B, output with an inverter.
C is connected either
to Power or to Ground
and so has either a 1
or 0 logical value.
TYPES OF LOGIC GATES

 NOT
 AND
• Symbol
 OR • Truth table
 NAND • Boolean
 NOR Expression
 EX-OR
 EX-NOR
NOT gate (inverter)

 The inverter is used to complement, or invert the


digital signal. It has a single input and a single
output. If a HIGH level (1) comes in, it produces a
LOW-level (0) output. If a LOW level (0) comes in,
it produces a HIGH-level (1) output. (Note: The
circle is the part of the symbol that indicates
inversion. The inversion circle will be used on other
gates in upcoming sections.)
SYMBOL
TRUTH TABLE

Input A Output Z
0 1

1 0
BOOLEAN EXPRESSION

Z = A
AND gate

 Let’s start by looking at the two-input AND


gate whose schematic is shown in next
slide.The operation of the AND gate is simple
and is defined as follows: The output, X is
HIGH if input A and input B are both HIGH.
In other words, if A = 1 and B = 1, then X =
1. If either A or B or both are LOW, the
output will be LOW.
SYMBOL

Y=A.B
TRUTH TABLE

Input A Input B Output Z


0 0 0

0 1 0

1 0 0

1 1 1
BOOLEAN EXPRESSION

Z=A.B
OR gate

 The OR gate also has two or more inputs


and a single output. The symbol for a two-
input OR gate is shown in Figure 3-3. The
operation of the two-input OR gate is defined
as follows: The output at X will be HIGH
whenever input A or input B is HIGH or
both are HIGH.
SYMBOL

Z=A+B
TRUTH TABLE

Input A Input B Output Z


0 0 0

0 1 1

1 0 1

1 1 1
BOOLEAN EXPRESSION

Z=A+B
NAND gate

 The operation of the NAND gate is the same


as the AND gate except that its output is
inverted. You can think of a NAND gate as
an AND gate with in inverter at is output. The
symbol for a NAND gate is made from an
AND gate with the inversion circle (bubble) at
its output.
SYMBOL
TRUTH TABLE

Input X Input Y Output Z


0 0 1

0 1 1

1 0 1

1 1 0
BOOLEAN EXPRESSION

Z = XY
NOR gate

 The operation of the NOR gate is the same


as the OR gate except that its output is
inverted. You can think of a NOR gate as an
OR gate with in inverter at is output. The
symbol for a NOR gate is made from an OR
gate with the inversion circle (bubble) at its
output.
SYMBOL
TRUTH TABLE

Input X Input Y Output Z


0 0 1

0 1 0

1 0 0

1 1 0
BOOLEAN EXPRESSION

Z=X+Y
EXTRA NOTES……

 NAND and NOR are known as universal


gates because they are inexpensive to
manufacture and any Boolean function can
be constructed using only NAND or only
NOR gates.
Exclusive-OR gate

 The Exclusive-OR, on the other hand, provides a


HIGH output if one input or the other input is
HIGH, but not both. The Boolean equation for the
Ex-OR function is written X=AB + AB and can be
constructed using the combinational logic. By
experimenting and using Boolean reduction, we can
find several other combinations of the basics gates
that provide the Ex-OR function. For example, the
combination of AND, OR and NOT gates.
SYMBOL
TRUTH TABLE

Input X Input Y Output Z


0 0 0

0 1 1

1 0 1

1 1 0
BOOLEAN EXPRESSION

Z=X+Y
Exclusive-NOR gate

 The Exclusive-NOR is the complement of the


exclusive-OR. The truth table for the Ex-NOR
shows a HIGH output for both inputs LOW or
both inputs HIGH. The Ex-NOR is sometimes
called the equality gate because both inputs
must be equal to get a HIGH output.
SYMBOL
TRUTH TABLE

Input A Input B Output Q


0 0 1

0 1 0

1 0 0

1 1 1
BOOLEAN EXPRESSION

Q=A+B
Gates can have multiple inputs and more than one output.
– A second output can be provided for the complement of the
operation.
EXAMPLE
Combinational Logic Circuits

 Combinational logic circuits is a circuit which


output is determined by the input.
 Are made up from basic logic NAND, NOR or
NOT gates that are combined or connected
together to produce more complicated
switching circuits.
 Have no memory, timing or feedback.
 Combinational logic circuits give us many
useful devices.
 Example : decoders, multiplexers, full
and half adder
EXAMPLE

HALF ADDER
FULL ADDER
EXAMPLE

DECODER
EXAMPLE

MULTIPLEXER
Write output from diagram below :
Example 1

Z = _____

C
Example 2

Q
R
Z = _____
S
Draw the combinational logic circuit for
the Boolean expression below :
Example 1

S=(A+B).C
Example 2

Z=(P.Q)+(R.S)
EXERCISES
Write output from diagram below :

a)
Z = _____
C
D
b) J

L Y = _____
M
Draw the combinational logic circuit for
the Boolean expression below :

a) Z=(A.B)+(B.C)

b) Y= ( W + X ) . ( Y + Z )
“Thank You”

You might also like