boolean algerba-1
boolean algerba-1
Hasanujjaman
Assistant Professor
Department of Electronics & Communication Engineering
03/06/25 EC 302 1
Review of Gate Processing
A NOT gate inverts its single input value.
An AND gate produces 1 if both input values
are 1.
An OR gate produces 1 if one or the other or
both input values are 1.
2
Review of Gate Processing
An XOR gate produces 1 if one or the other
(but not both) input values are 1.
A NAND gate produces the opposite results
of an AND gate.
A NOR gate produces the opposite results of
an OR gate.
3
Constructing Gates
Transistor: A device that acts, depending on the
voltage level of an input signal, either as a wire that
conducts electricity or as a resistor that blocks the
flow of electricity.
A transistor has no moving parts, yet acts like a switch.
It is made of a semiconductor material, which is neither a
particularly good conductor of electricity, such as copper,
nor a particularly good insulator, such as rubber.
4
Constructing Gates
A transistor has three
terminals:
A source
A base
An emitter, typically
connected to a ground wire
If the electrical signal is
grounded, it is allowed to flow
through an alternative route to
the ground (literally) where it
can do no harm.
5
Constructing Gates
It turns out from the way a transistor works, the
easiest gates to create are the NOT, NAND, and
NOR gates.
6
Circuits
Two general categories:
In a combinational circuit, the input values explicitly
determine the output.
In a sequential circuit, the output is a function of the
input values as well as the existing state of the circuit.
As with gates, we can describe the operations
of entire circuits using three notations:
Boolean expressions
logic diagrams
truth tables
7
Combinational Circuits
Gates are combined into circuits by using the output
of one gate as the input for another.
8
Combinational Circuits
AB + AC
10
Combinational Circuits
Now let’s go the other way; let’s take a Boolean expression
and draw its circuit and its Truth Table.
A(B + C)
What does it mean?
11
Combinational Circuits
A (B + C)
12
A (B + C)
A B C B+C A(B + C)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1 13
A (B + C)
A B C B+C A(B + C)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1 14
A (B + C)
A B C B+C A(B + C)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1 15
Combinational Circuits
Now compare the final result column in this truth table to the
truth table for the previous example:
17
Boolean Algebra
.
.
Network Outputs
Inputs .
.
.
.
18
Example
Draw the network diagram for
'
F X YZ
19
Example
Draw the network diagram for
' ' ' '
F XYZ XY Z X Y
20
In the latter part of the nineteenth century, George
Boole incensed philosophers and mathematicians
alike when he suggested that logical thought could
be represented through mathematical equations .
Computers, as we know them today, are
implementations of Boole’s Laws of Thought.
John Atanasoff and Claude Shannon were
among the first to see this connection.
03/06/25 EC 302 21
Boolean algebra is a mathematical system
for the manipulation of variables that can
have one of two values.
In formal logic, these values are “true”
and “false.”
In digital systems, these values are “on”
and “off,” 1 and 0, or “high” and “low.”
Boolean expressions are created by
performing operations on Boolean variables.
Common Boolean operators include AND,
OR, and NOT.
03/06/25 EC 302 22
A Boolean operator can be
completely described using a
truth table.
The truth table for the Boolean
operators AND and OR are
shown at the right.
The AND operator is also known
as a Boolean product. The OR
operator is the Boolean sum.
03/06/25 EC 302 23
The truth table for the
Boolean NOT operator is
shown at the right.
The NOT operation is
most often designated by
an overbar. It is
sometimes indicated by a
prime mark ( ‘ ) or an
“elbow” ().
03/06/25 EC 302 24
A Boolean function has:
• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
It produces an output that is also a member of
the set {0,1}.
03/06/25 EC 302 25
The truth table for the
Boolean function:
03/06/25 EC 302 26
As with common
arithmetic, Boolean
operations have rules of
precedence.
The NOT operator has
highest priority, followed
by AND and then OR.
This is how we chose
the (shaded) function
subparts in our table.
03/06/25 EC 302 27
Digital computers contain circuits that implement
Boolean functions.
The simpler that we can make a Boolean
function, the smaller the circuit that will result.
Simpler circuits are cheaper to build,
consume less power, and run faster than
complex circuits.
With this in mind, we always want to reduce our
Boolean functions to their simplest form.
There are a number of Boolean identities that
help us to do this.
03/06/25 EC 302 28
Most Boolean identities have an AND (product) form as
well as an OR (sum) form. We give our identities using
both forms. Our first group is rather intuitive:
03/06/25 EC 302 29
Our second group of Boolean identities should be
familiar to you from your study of algebra:
03/06/25 EC 302 30
Our last group of Boolean identities are perhaps
the most useful.
If you have studied set theory or formal logic, these
laws are also familiar to you.
03/06/25 EC 302 31
Example
1: Prove the uniting theorem--
X•Y+X•Y'=X
Distributive X•Y+X•Y' = X•(Y+Y')
Complementarity = X•(1)
Identity =X
Example
2: Prove the absorption theorem--
X+X•Y=X
Identity X+X•Y = (X•1)+(X•Y)
Distributive = X•(1+Y)
Null = X•(1)
Identity =X
03/06/25 EC 302 32
Example 3: Prove the consensus theorem--
(XY)+(YZ)+(X'Z)= XY+X'Z
Complementarity XY+YZ+X'Z = XY+(X+X')YZ + X'Z
Distributive = XYZ+XY+X'YZ+X'Z
▪ Use absorption {AB+A=A} with A=XY and B=Z
= XY+X'YZ+X'Z
Rearrange terms = XY+X'ZY+X'Z
▪ Use absorption {AB+A=A} with A=X'Z and B=Y
XY+YZ+X'Z = XY+X'Z
03/06/25 EC 302 33
We can use Boolean identities to simplify the
function:
as follows:
03/06/25 EC 302 34
Sometimes it is more economical to build a
circuit using the complement of a function (and
complementing its result) than it is to implement
the function directly.
DeMorgan’s law provides an easy way of finding
the complement of a Boolean function.
Recall DeMorgan’s law states:
03/06/25 EC 302 35
DeMorgan’s law can be extended to any number of
variables.
Replace each variable by its complement and
change all ANDs to ORs and all ORs to ANDs.
Thus, we find the the complement of:
is:
03/06/25 EC 302 36
Through our exercises in simplifying Boolean
expressions, we see that there are numerous ways
of stating the same Boolean expression.
These “synonymous” forms are logically
equivalent.
Logically equivalent expressions have identical
truth tables.
In order to eliminate as much confusion as possible,
designers express Boolean functions in
standardized or canonical form.
03/06/25 EC 302 37
There are two canonical forms for Boolean
expressions: sum-of-products and product-of-sums.
Recall the Boolean product is the AND
operation and the Boolean sum is the OR
operation.
In the sum-of-products form, ANDed variables are
ORed together.
For example:
In the product-of-sums form, ORed variables are
ANDed together:
For example:
03/06/25 EC 302 38
Combinational logic circuits
give us many useful devices.
One of the simplest is the
half adder, which finds the
sum of two bits.
We can gain some insight as
to the construction of a half
adder by looking at its truth
table, shown at the right.
03/06/25 EC 302 39
As we see, the sum can be
found using the XOR
operation and the carry
using the AND operation.
03/06/25 EC 302 40
We can change our half
adder into to a full adder
by including gates for
processing the carry bit.
The truth table for a full
adder is shown at the
right.
03/06/25 EC 302 41
How can we change the
half adder shown below
to make it a full adder?
03/06/25 EC 302 42
Here’s our completed full adder.
03/06/25 EC 302 43