0% found this document useful (0 votes)
172 views38 pages

Boolean Algebra1

- Boolean algebra uses binary logic (0 and 1) to analyze and simplify digital circuits. It was developed by George Boole in 1854. - The document outlines several important concepts in Boolean algebra including Boolean laws, logic gates, canonical expressions, and Karnaugh maps. - Karnaugh maps are a graphical technique used to simplify Boolean expressions into minimal sum-of-products or product-of-sums form by grouping variables to minimize terms. This leads to more efficient circuit implementations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
172 views38 pages

Boolean Algebra1

- Boolean algebra uses binary logic (0 and 1) to analyze and simplify digital circuits. It was developed by George Boole in 1854. - The document outlines several important concepts in Boolean algebra including Boolean laws, logic gates, canonical expressions, and Karnaugh maps. - Karnaugh maps are a graphical technique used to simplify Boolean expressions into minimal sum-of-products or product-of-sums form by grouping variables to minimize terms. This leads to more efficient circuit implementations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Yes, No, Maybe...

Boolean
Algebra
Introduction
Boolean Algebra is used to analyze and simplify the digital (logic)
circuits. It uses only the binary numbers i.e. 0 and 1. It is also called as
Binary Algebra or logical Algebra. Boolean algebra was invented by
George Boole in 1854.
Computers, as we know them today, are implementations of Booles
Laws of Thought.
In the middle of the twentieth century, computers were commonly known
as thinking machines and electronic brains.
Nowadays, we rarely ponder the relationship between electronic digital
computers and human logic. Computers are accepted as part of our
lives.
Rule in Boolean Algebra
Following are the important rules used in Boolean algebra.
Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW.
Complement of a variable is represented by an overbar (-). Thus, complement of
variable B is represented as B . Thus if B = 0 then B=1 and B= 1 then B = 0.
ORing of the variables is represented by a plus (+) sign between them. For
example ORing of A, B, C is represented as A + B + C.
Logical ANDing of the two or more variable is represented by writing a dot
between them such as A.B.C. Sometime the dot may be omitted like ABC.
Boolean Laws
There are six types of Boolean Laws.

Commutative law
i) A.B=B.A ii) A+B=B+A

Any binary operation which satisfies the following expression is referred to


as commutative operation.
Commutative law states that changing the sequence of the variables does not
have any effect on the output of a logic circuit.

Associative law
i) (A.B).C=A.(B.C) ii) (A+B)+C=A+(B+C)
This law states that the order in which the logic operations are performed is
irrelevant as their effect is the same.
Boolean Laws

Distributive law
i) A.(B+C)=A.B+A.C
Distributive law states the following condition.

AND law
i) A.0=0 ii) A.A=A
iii) A.1=A iv) A.A =0
These laws use the AND operation. Therefore they are called as AND laws.
Boolean Laws
OR law
i) A+0=A ii) A+A=A
iii) A+1=1 iv) A+A=1
These laws use the OR operation. Therefore they are called as OR laws.

INVERSION law
i) A = A
This law uses the NOT operation. The inversion law states that double inversion of a
variable results in the original variable itself.
Duality

There are useful identities of Boolean expressions that can help us to transform
an expression A into an equivalent expression B.
We can derive additional identities with the help of the dual of a Boolean
expression.
The dual of a Boolean expression is obtained by interchanging Boolean sums and
Boolean products and interchanging 0s and 1s.

Example
The dual of x(y + z) is x + yz.

The dual of -x1 + (-y + z) is (-x + 0)((-y)z).


Duality

Therefore, an identity between functions represented by Boolean


expressions remains valid when the duals of both sides of the identity
are taken.
We can use this fact, called the duality principle, to derive new
identities.
For example, consider the absorption law
x(x + y) = x.
By taking the duals of both sides of this identity, we obtain the
equation x + xy = x, which is also an identity (and also called an
absorption law).
Basic Theorems
Boundedness
Theorem1: For all elements a in B, a+1=1; a*0=0.
Proof: a+1 = 1 *(a+1) (Identity)
= (a + a')*(a+1) (Complement)
= a + a'*1 (Distributive )
= a + a' (Identity)
= 1 (Complement)
Comments:
'1' dominates as input in OR gates.
0' dominates as input in AND gates.

A 1 0
A
1
0
Theorem 2: Idempotent Laws
Statement: For every a in B,
a+a=a and a * a = a.
Proof:
a + a = (a + a) * 1 (Identity)
= (a + a) * (a + a') (Complement)
= a + (a*a') (Distributive)
=a+ 0 (Complement)
=a (Identity)

A A A A

A A
Theorem 3: De Morgans Law
Theorem3: For every pair a, b in set B:
(a+b) = ab, and (ab) = a+b.
Proof: We show that a+b and ab are complementary.
In other words, we show that both of the following are true
(complement):
(a+b) + (ab) = 1, (a+b)(ab) = 0.
Proof (Continue):
(a+b)+(ab)
=(a+b+a)(a+b+b) (distributive)
=(1+b)(a+1) (complement)
=1 (Theorem 3)
2. (a+b)(ab)
=(ab)(a+b) (commutative)
=aba+abb (distributive)
=0*b+a*0 (complement)
=0+0
=0 (identity)
Theorem 4: Complement

Statement:
The complement of element 1 is 0 and vice versa, i.e.
0' = 1, 1' = 0.
Proof:
0 + 1 = 1 and 0 * 1 = 0 (Postulate 3)
Thus 0= 1, 1= 0 (Postulate 4 and Theorem 2)
Logic Gates

We have looked at Boolean functions in abstract


terms.
In this section, we see that 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.
Logic Gates

The three simplest gates are the AND, OR, and NOT
gates.

They correspond directly to their respective Boolean


operations, as you can see by their truth tables.
Logic Gates
Another very useful gate is the exclusive OR
(XOR) gate.
The output of the XOR operation is true only when
the values of the inputs differ.

Note the special symbol


for the XOR
operation.
Logic Gates

NAND and NOR


are two very
important gates.
Their symbols and
truth tables are
shown at the right.
Logic Gates

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.
Logic Gates

Gates can have multiple inputs and more than


one output.
A second output can be provided for the
complement of the operation.
Well see more of this later.
Canonical Expression

A boolean expression consisting entirely either of minterm or maxterm is called


canonical expression.
Example
if we have two variables X and Y then,
Following is a canonical expression consisting of minterms XY + XY
and
Following is a canonical expression consisting of maxterm (X+Y) . (X + Y)

Different Forms of Canonical Expression

There are two forms of canonical expression.


Sum of Products (SOP)
Product of Sums (POS)
Sum of Products (SOP)
A boolean expression consisting purely of Minterms (product terms) is said to be in
canonical sum of products form.
Example

lets say, we have a boolean function F defined on two variables A and


B. So, A and B are the inputs for F and lets say, output of F is true i.e.,
F = 1 when any one of the input is true or 1. Now we draw the truth
table for F.
Now we will create a column for the minterm using the variables A and B. If
input is 0 we take the complement of the variable and if input is 1 we take the
variable as is.

To get the desired canonical SOP expression we will add the minterms (product
terms) for which the output is 1.
F = AB + AB + AB
Product of Sums (POS)
A boolean expression consisting purely of Maxterms (sum terms) is said to be
in canonical product of sums form.
Example
Lets say, we have a boolean function F defined on two variables A and B. So, A
and B are the inputs for F and lets say, output of F is true i.e., F = 1 when
only one of the input is true or 1.
now we draw the truth table for F
Now we will create a column for the maxterm using the variables A and B. If
input is 1 we take the complement of the variable and if input is 0 we take
the variable as is.

To get the desired canonical POS expression we will multiply the maxterms (sum
terms) for which the output is 0.
F = (A+B) . (A+B)
Karnaugh Maps
Boolean algebra helps us simplify expressions and circuits

Karnaugh Map: A graphical technique for simplifying a Boolean expression into


either form:
minimal sum of products (MSP)
minimal product of sums (MPS)

Goal of the simplification.


There are a minimal number of product/sum terms
Each term has a minimal number of literals

Circuit-wise, this leads to a minimal two-level implementation


Re-arranging the Truth Table
A two-variable function has four possible minterms. We can re-arrange
these minterms into a Karnaugh map
x y minterm Y
0 0 xy 0 1
0 1 xy 0 xy xy
1 0 xy X
1 xy xy
1 1 xy

Now we can easily see which minterms contain common literals


Minterms on the left and right sides contain y and y respectively
Minterms in the top and bottom rows contain x and x respectively
Y

0 1 Y Y
0 xy xy X xy xy
X
1 xy xy X xy xy
Karnaugh Map Simplifications
Imagine a two-variable sum of minterms:

xy + xy

Both of these minterms appear in the top row of a Karnaugh map, which
means that they both contain the literal x
Y
xy xy
X xy xy

What happens if you simplify this expression using Boolean algebra?

xy + xy = x(y + y) [ Distributive ]
= x 1 [ y + y = 1 ]
= x [x1=x]
A Three-Variable Karnaugh Map
For a three-variable expression with inputs x, y, z, the arrangement of
minterms is more tricky:
YZ YZ
00 01 11 10 00 01 11 10
0 xyz xyz xyz xyz 0 m0 m1 m3 m2
X X
1 xyz xyz xyz xyz 1 m4 m5 m7 m6

Another way to label the K-map


Y (use whichever you like): Y
xyz xyz xyz xyz m0 m1 m3 m2
X xyz xyz xyz xyz X m4 m5 m7 m6
Z Z
ORDERING
With this ordering, any group of 2, 4 or 8 adjacent squares on the map
contains common literals that can be factored out

Y xyz + xyz
xyz xyz xyz xyz = xz(y + y)
X xyz xyz xyz xyz = xz 1
Z = xz

Adjacency includes wrapping around the left and right sides:

Y xyz + xyz + xyz + xyz


xyz xyz xyz xyz = z(xy + xy + xy + xy)
X xyz xyz xyz xyz = z(y(x + x) + y(x + x))
Z
= z(y+y)
= z
Well use this property of adjacent squares to do our simplifications.
Grouping the Minterms Together
The most difficult step is grouping together all the 1s in the K-map
Make rectangles around groups of one, two, four or eight 1s
All of the 1s in the map should be included in at least one rectangle
Do not include any of the 0s
Each group corresponds to one product term

Y
0 1 0 0
X 0 1 1 1
Z

Make as few rectangles as possible, to minimize the number of products in the


final expression.
Make each rectangle as large as possible, to minimize the number of literals in
each term.
Rectangles can be overlapped, if that makes them larger.
K-map Summary
K-maps are an alternative to algebra for simplifying expressions
K-maps are really only good for manual simplification of small expressions.

Things to keep in mind:

Remember the correct order of minterms/maxterms on the K-map


When grouping, you can wrap around all sides of the K-map, and your groups can
overlap
Make as few rectangles as possible, but make each of them as large as possible.
This leads to fewer, but simpler, product terms
There may be more than one valid solution

31
USE OF BOOLEAN ALGEBRA IN COMPUTER
SCIENCE

1. Boolean algebra is the branch of algebra in which the values of the variables are
the truth values true and false, usually denoted 1 and 0 respectively. Instead
of where the values of the variables are numbers, and the prime operations are
addition and multiplication, the main operations of Boolean algebra are
the conjunction and denoted as , the disjunction or denoted as , and
the negation not denoted as . It is thus a formalism for describing logical relations in
the same way that ordinary algebra describes numeric relations.
2. Boolean algebra has been fundamental in the development of digital electronics, and
is provided for in all modern programming languages. It is also used in set
theory and statsistics.
3. In the 1930s, while studying switching circuits,engineer Akira Nakashima
independently discovered Boolean algebra, which he was unaware of until 1938. In a
series of papers published from 1934 to 1936, he formulated a two-valued Boolean
algebra as a way to analyze and design circuits by algebraic means in terms of logic
gates.
In digital circuits the value is 1 for a current or voltage or 0 in the absence of
it. All the circuits in a electronic hardware can be used to form a circuit
diagram consisting of logic gates. Each gate implements a Boolean operation,
and is depicted schematically by a shape indicating the operation. The shapes
associated with the gates for conjunction (AND-gates), disjunction (OR-gates),
and complement (inverters) are as follows.
The basic gates are
1. AND gate

2. OR gate
3. NOT gate

By using boolean algebra we can control the flow of electron in the digital circuit and
thus can control the outcome. For example IC 7402 the circuit is shown below. From
these we can see the logic gates and inputs we can predict the outcome.
Today, all modern general purpose computers perform their functions using two-
value Boolean logic; that is, their electrical circuits are a physical manifestation
of two-value Boolean logic. They achieve this in various ways: as voltages on
wires in high-speed circuits and capacitive storage devices, as orientations of a
magnetic domain in ferromagnetic storage devices, as holes in punched cards or
paper tape, and so on.
All the programs or application in a computer coverts into 0 and 1 while running
in the system which operates the digital circuit inside it and give us the
outcome.
Using of Boolean Algebra in different
projects
Coffee, Tea, or Milk?
Snerdleys Automated Cafeteria orders a machine to dispense coffee, tea,
and milk. Design the machine so that it has a button (input line) for each
choice and so that a customer can have at most one of the three choices.

U.S. Rocket Launcher


The India has gained a missile defense capability governed by its Security
Council. The Council consists of four members: the Indian President and
three Counselors (the Chiefs of Staff of the Army and Air Force plus the
Presidents Uncle Homer). The missile system is to be activated by a device
obeying these rules: each member of the Security Council has a button to
push; the missiles fire only if the President and at least one Counselor push
their buttons.
Using of Boolean Algebra in different
projects

Two-Floor Elevator
Numerous functions must be performed by the circuitry of an elevator
(open/close door, move up/down, light up/down indicator, and so on). This
example focuses on one aspect of a two-floor elevator: deciding when to
move to the other floor.
Hallway Light
A hallway light is controlled by three switches. If the light is off, clicking
any one of the three switches turns it on. If the light is on, clicking any one
of the three switches turns it off. A fourth input variable is needed to
register the current state of the light (1 = on, 0 = off). The output variable
should be 1 when the light is to be turned on and 0 when it is to be turned
off.
Using of Boolean Algebra in different
projects

Car Garage
A car garage has a front door and one window, each of which has a sensor to
detect whether it is open. A third sensor detects whether it is dark outside. A
security system for the garage follows this rule: the alarm rings if and only if
the alarm switch is turned on and either the front door is not closed or it is
dark and the side window is not closed.
Nuclear Power Plant
A nuclear power plant contains three danger sensors, x, y,and z that can shut
down the plant. Sensor z is in such a sensitive location that it has a backup,
b. The plant is to be shut down if two of the three sensors x, y,and z indicate
danger. However, if sensor z is one of only two to register danger, zs backup,
b, must also register danger for the plant to be shut down.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy