0% found this document useful (0 votes)
116 views

Boolean Algebra

Boolean algebra is a logical system used to simplify boolean expressions. It was developed by George Boole and uses only two values: TRUE and FALSE (often represented by 1 and 0). The document discusses boolean operators like AND, OR, and NOT and how they are represented using truth tables. It also explains how basic logic gates like AND, OR, NOT, NAND, and NOR can be implemented using only NAND or only NOR gates, making them universal gates. De Morgan's laws are also summarized, relating boolean operations on unions and intersections to their complements.

Uploaded by

Zzzab 9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Boolean Algebra

Boolean algebra is a logical system used to simplify boolean expressions. It was developed by George Boole and uses only two values: TRUE and FALSE (often represented by 1 and 0). The document discusses boolean operators like AND, OR, and NOT and how they are represented using truth tables. It also explains how basic logic gates like AND, OR, NOT, NAND, and NOR can be implemented using only NAND or only NOR gates, making them universal gates. De Morgan's laws are also summarized, relating boolean operations on unions and intersections to their complements.

Uploaded by

Zzzab 9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 147

Boolean Algebra

• Boolean algebra was used to design the


switching circuit of the computer.

• By using boolean algebra,the computer can do


logical thinking very fast and inexpensively.

• Boolean algebra was developed by George


Bool.
• Boolean algebra may operate on practically
any kind of set and when a boolean equation
is solved,the result is only one out of two
terms TRUE or NOT TRUE.

• The algebra which deals with only two


quantities that are either true or false is
called Boolean Algebra.
• The truth value TRUE of boolean algebra is
denoted by 1 and the truth value FALSE is
denoted by 0.
Truth Table
• Truth table is the tabular representation of all
the possible values of logical
variables/statements with all the possible
results for the given combination of values.
• The truth table consists of two parts.They are
rows and columns.

• The horizontal lines of truth table are called


rows.

• The number of rows depends on the number


of input variables Eg. Two inputs then there
will be 22=4
• The number of vertical lines are called
columns
LOGICAL OPERATORS
• 1)NOT
• 2)AND
• 3)OR
NOT operator
• The operator is a unary operator because it
operates on a single variable.This operator is
called complement and the symbol for this is –
• (bar) or ‘ .
• Eg X or X
• The variable used can have two possible
values 0 or 1 where 0 denotes false and 1
denotes true.
Truth table of Not
X
0 1
1 0
AND Operator
• The AND operator operates on two or more
operators.

• AND operator is used to perform logical


multiplication and the symbol is dot (.)
Truth Table for AND operator
X Y X.Y
0 0 0

0 1 0
1 0 0
1 1 1
OR operator
• The OR operator is used to perform logical
addition and the symbol for OR operator is (+)
plus.
Truth table for OR operator
X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 1
Evaluation of boolean expression using
truth table
• Logical variables are combined by means of
logical operators(AND,OR,NOT) to form a
boolean expression.
For Example

X Y Z YZ
0 0 0 0 1 1 1
0 0 1 0 1 0 1
0 1 0 0 1 1 1
0 1 1 1 0 0 0
1 0 0 0 1 1 1
1 0 1 0 1 0 1
1 1 0 0 1 1 1
1 1 1 1 0 0 1
Basic Logic gates
• A gate is simply an electronic circuit which
operates on one or more signal to produce an
output signal.

• Fundamental Gates
• Derived Gates
Fundamental Gates
• These are the basic gates which are not
constructed from other gates these are

• 1)AND gate
• 2)OR gate
• 3)NOT gate
AND GATE
• This gate has two or more input signals but
only one output signal.This gate
producesoutput 1 when all inputs are 1
X Y Z(X.Y)
0 0 0
0 1 0
1 0 1
1 1 1
OR gate
• This gate has 2 or more input signals but only
one output signals.This gate produces output
1 when any of the inputs are 1.
NOT gate
• The NOT gate has only one input and one
output signal.The output state is always the
opposite of the input state.

• This gate is also called the complement gate


because it complements the input value.
DERIVED GATES
• These gates are derived from the fundamental
gates.These are

• 1)NOR gate
• 2)NAND gate
• 3)XOR gate
• 4)XNOR gate
NOR gate
• This gate is the combination of the NOT and
the OR gate.The NOR gate has two or more
inputs but only one output.
• It produces output 1 when all inputs are 0.
TRUTH Table NOR gate
X Y X+Y’
0 0 1
0 1 0
1 0 0
1 1 0
NAND Gate
• This gate is the combination of the NOT and
the AND gate.
• The NAND gate has two or more input signals
but only one output signal.

• If all inputs are 1 then output produced is 0.


XOR gate(Exclusive OR)
• The exclusive OR gate can have two or more
inputs but produces one output signal.

• Exclusive OR is different from OR gate.

• OR gate produces output signal 1 for any input


combinations having 1 or more 1’s,but exclusive
OR gate produces output 1 for only those input
combinations that have odd number of 1’s.
In Boolean algebra XOR gate is Represented by
XNOR gate(Exclusive NOR)
• The exclusive NOR gate is the complement of
XOR gate(exclusive OR gate)

• It recognizes the pair that has even number of


1’s.

• Logically Exclusive NOR gate (XNOR)is


equivalent to an inverted XOR gate.
A XNOR B=A B
Write the equivalent Boolean
Expression for the following Logic
Circuit
Draw the circuit for the following
equation (X+Y').(X'+Y').(X'+Y')
NAND and NOR are known as universal
gates because
• They are inexpensive to manufacture in
comparison of other gates.

• Secondly,any boolean function can be


constructed using only NAND gates or only
NOR gates,It is much easier to build complex
integrated circuits from the same basic
building blocks than it is to construct an
integrated circuit using different basic gates.
IMPLEMENTATION OF BASIC GATES USING
NAND GATES
IMPLEMNTATION OF NOT GATE BY
NAND GATE
IMPLEMENTATION OF AND GATE BY
USING NAND GATE

X.Y
IMPLEMENTATION OF OR GATE BY
USING NAND GATE

X
X
X+Y
Y
Y X.Y
IMPLEMENTATION OF BASIC GATES USING
NOR GATES
IMPLEMENTATION OF NOT GATE
USING NOR GATE
IMPLEMENTATION OF AND GATE
USING NOR GATE

A.B

B
IMPLEMENTATION OF OR GATE USING
NOR GATE

A+B

A+B
NAND to NAND and NOR to NOR
• Any combinational circuit is possible using
only NAND or NOR gate because of this NAND
and NOR gates are called universal gates.

• Since logic operations,AND,OR and NOT can


be implemented with NAND ,NOR gates.
Any logic function can be implemented using
NAND gates only by the following steps

1)The logic function has to be written in SOP


form(Sum of Products)
2)Draw the logic circuit with AND and OR gates
3)Replace all AND and OR gates by NAND gates.
• Any logic function can be implemented with
NOR gates only by the following steps:

• 1)First the logic function has to written in


Product of sum form(POS)
• 2)Draw the logic circuit with AND and OR
gates.
• 3)Replace all AND and OR gates with NOR
gate.
Basic Theorems of Boolean Algebra
• Properties of 0 and 1

• a)0+X =X
• b)1+X=1
• C) 0.X=0
• D)1.X=X
Idempotence Law
• X+X=X
• X.X=X
Involution Law
• (X’)’ = X
Complementarity Law
• X + X’ = 1

• X.X’ = 0
Commutative Law
• X+Y=Y+X

• X.Y=Y.X
Associatiative Law
• X+(Y+Z)=(X+Y)+Z

• X.(Y.Z)=(X.Y).Z
Distributive Law
• X(Y+Z)=XY+XZ

• X+YZ=(X+Y)(X+Z)
Absorption Law
• X+XY=X

• =X(1+Y)
• =X(1)
• =X

• X(X+Y)=X
Summary Of Boolean Laws
Using Laws of boolean algebra prove that
A’B’C’D’ + A’B’CD’ + A’BCD + AB’C’D’ + ABCD + A B’D=B’D’ + AB’ + BCD
Lhs = A’B’C’D’ + A’B’CD’ + A’BCD + AB’C’D’ + ABCD + A B’D
Applying Distributive Law
=A’B’D’(C’+C)+BCD(A’+A)+AB’D’(C’+C)+AB’D
Applying inverse law and identity law
=A’B’D’+BCD+AB’D’+AB’D
=B’D’(A’+A)+BCD+AB’D
=B’D’+BCD+AB’D
Applying Distributive Law
=B’(D’+AD)+BCD --- Absorbtion law
=B’(D’+A)+BCD
=B’D’+B’A+BCD
=B’D’+AB’+BCD
• (A+B)(A+C)=A+BC
• LHS=(A+B)(A+C)
• =A.A +A.B +A.C+B.C
• =A+AB+AC+BC
• =A(1+B)+AC+BC
• =A.1+AC+BC
• =A+AC+BC
• =A(1+C)+BC
• =A.1+BC
• =A+BC
• Using boolean laws prove that
• (A+B’+C’)(A+B’C)=A+B’C
• LHS=A.A+AB’C+B’A+B’B’C+C’A+C’B’C
• =A+AB’C+AB’+B’C+AC’+BC’C
• =A+AB’C+AB’+B’C+AC’+B.O
• =A+AB’+AC’+AB’C+B’C+0
• =A(1+B’+C’+B’C)+B’C
• =A.1+B’C
• =A+B’C
De Morgans Law
• In set theory,de morgans law relates the three
basic set properties to each other,the union
,the intersection and the complement.One of
the most powerful identities used in boolean
algebra i.e De Morgans Theorem.

• Augustus De Morgan had paved the way to


Boolean algebra by discovering two important
theorems.
De Morgans First Theorem
• To prove this theorem,we need to recall the
complementarity laws which states that
• X+X’=1 and X.X’=0 that is a logical variable
when added to its complement,produces
output 1 and when multiplied with
complement produces the output 0.

• To prove de morgans law we will use the


complementarity laws.
• Let us assume that P=X+Y
• Where P,X,Y are logical variables.Then
according to complementation laws P+P’=1
and P.P’=0.

• This means that if P,X,Y are boolean variables


then the complementarity laws must hold for
variable P.
• X+Y+X’.Y’=1
• AND
• X+Y.X’.Y’=0
• Let us prove the first part

• X+Y+X’.Y’=1
• =((X+Y)+X’)((X+Y)+Y’)
• =(X+Y+X’)(X+Y+Y’)
• =(X+X’+Y)(X+Y+Y’)
• =(1+Y)(X+1)
• =1.1
• =1
• Let us now prove the second part

• X+Y.X’.Y’=0
• =X’Y’(X+Y)
• =X’Y’X+X’Y’Y
• =0.Y’+X’.0
• =0+0
• =0
• De Morgans second theorem

• It states that
• (X.Y)’=X’+Y’
• 1ST Part X.Y+(X’+Y’)=1
• 2ND Part X.Y.(X’+Y’)=0

• 1ST part X.Y+(X’+Y’)=1


• X.Y+(X’+Y’)
• =(X’+Y’+X)(X’+Y’+Y)
• =(X+X’+Y)(X’+Y’+Y)
• =(1+Y’)(X’+1)
• =1.1
• =1
• 2ND PART
• X.Y.(X’+Y’)=0
• =X.Y.X’+X.Y.Y’
• =XX’Y+XYY’
• =0.Y+X.O
• =0+0
• =0
• Although the above identities represent de
morgans theorem,the transformation is easily
performed by the following steps

• 1)Complement the entire function.change all


the AND’s to OR’s and all the OR’s to AND’s .
• Complement each of the individual variables
• DEMORGAN’S LAW

It states that
• 1) (X+Y)’ = X’.Y’

• 2)(X.Y)’ = X’ + Y’
Duality Principal
• The principal of duality is an important
principal in boolean algebra.
• It states that another boolean relation can be
derived by:

• 1)Chaging each OR sign(+)to an AND sign(.)


• 2)Changing each AND sign (.)to an OR sign(+)
• 3)Replacing each 0 by 1 and each 1 by 0.
• Eg:
• X+1=1
• X.0=0

• 0+0=0
• 1.1=1

• 0+1=1
• 1.0=0
• A(B+C)=A.B+A.C

• The dual will be

• A+(B.C)=(A+B)(A+C)
• Find the dual of the following

• (A+B)(AC’ +B)
• =(A.B)+(A+C’).B

• 2)A+A’B=A+B
• =A.(A’+B)=A.B

• 3)(X+Y).(X’+Y’)
• =X.Y+X’.Y’
• Find the dual of
• (U+W)(V’U+W)
• =UW+(V’+U)W
• Simplify the following using boolean laws

• F=AB(A+C)+AB(A+B+C)
• =AB+(A+C)+AB(ABC)
• =A+B+AC+ABC
• =A+B+AC(1+B)
• =A+B+AC
• =A(1+C)+B
• =A+B
• AB+BC+CA=AB+BC+CA
• =AB+BC+CA
• =(AB)(BC)(CA)
• =(A+B)(B+C)(C+A)
• =(A+B)(A+C)(B+C)
• =(A+BC)(B+C)
• =AB+BBC+AC+BCC
• =AB+BC+AC+BC
• =AB+BC+BC+AC
• =AB+BC+AC
Derivation of Boolean Expression
• Boolean expression which consists of a single
variable or its complement,example x or y or
z’ are known as literals.

• The two terms ob boolean expression are

• Min term
• Max Term
Min Term
• One of the most poweful theorem within
boolean algebra states that any boolean
function can be expressed as the sum of
products of all the variables within the
system.

• For example x+y can be expressed as sum of


several products,each of the products
containing letters x and y.
• A min term is a product of all the literals
(with or without the bar )within the logic
system.

• When values are given for different


variables,min terms can be easily formed.
• Eg if x=0,y=1,z=0.Then min term will be x’.y.z’

• (For a varaible with value 0 take its


complement )
Truth table min term 3 input
Steps involved in min term expansion
of expression
• 1)Convert the given expression in SOP
form(Sum of products)
• 2)In each term if any variable is missing
,multiply that term with (missing term +
missing term)
• 3)Expand the expression
• 4)Remove all duplicate terms and we will have
the min term form of an expression.
• Convert X+Y to minterns

• =X(Y+Y’)+Y(X+X’)
• =XY+XY’+XY+X’Y
• =XY+XY’+X’Y
• Max Terms

• A max term is the sum of all the literals(With


or without the bar )within the logic system.

• In max term the value of a variable is 1,then


its complement is added.
Canonical Expression
• A boolean expression composed entirely
either of min terms or max terms is referred
to as canonical expression.

• Canonical expression can be represented in


the following two forms
• 1)Sum of Products(SOP)
• 2)Product of Sum(POS)
Sum of Products
• A canonical expression composed of min
terms is called sum of products form.
• Eg F=X’YZ+XY’Z’+XYZ

• The canocial form is the designation of the


minterm
• F= (3,4,7)
• A boolean function may be expressed
algebrically from a given truth table by
forming a min term for each combination of
the variable which produces an output 1 in
the function and then taking OR of all those
terms.

• Eg:The given truth table expresses the


function f(x,y,z)in the sum of products.Find
the canonical form.
• X Y Z F
0 0 0 0
0 0 1 1 X’Y’Z
0 1 0 1 X’Y Z’
0 1 1 0
1 0 0 1 X Y’Z’
1 0 1 0
1 1 0 0
1 1 1 1 XYZ

F(X,Y,Z)=X’Y’Z+X’YZ’+XY’Z’+XYZ
Product of Sum
• When a boolean expression is represented
purely as a product of maxterm ,it is said to be
canonical product of sum formed of an
expression.

• Express in the product of sum form ,the


boolean function f(x,y,z)and the truth table for
which is given below
X Y Z F
0 0 0 1
0 0 1 0 X+Y+Z’
0 1 0 1
0 1 1 0 X+Y’+Z’

1 0 0 1
1 0 1 0 X’+Y+Z’

1 1 0 1
1 1 1 1

F(X,Y,Z)=(X+Y+Z’)(X+Y’+Z’)(X’+Y+Z’)
State and verify the distributive law
using truth table
• Seven invertors are cascaded after one
another.What will be the output if the input is
1?

• Ans 0
Karnaugh Maps
• Obtain a simplified form for the following
boolean expression using K maps

• F(abcd)= (0,1,2,3,4,5,10,11,15)

• Also draw the logic circuit diagram for the


simplified expression using basic gates
Half Adder
• Half adder is a combinational circuit that
performs the addition of two bits,this circuit
needs two binary inputs and two binary
outputs
Truth Table Half Adder
A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

S=A’B+AB’
C=AB
Circuit for half adder
Full Adders
• The main difference between a half-adder and a
full-adder is that the full-adder has three inputs
and two outputs. The first two inputs are A and B
and the third input is an input carry designated as
CIN.

• the output S is an EXOR between the input A and


the half-adder SUM output with B and CIN
inputs.
• Thus, we can implement a full adder circuit
with the help of two half adder circuits.

• The first will half adder will be used to add A


and B to produce a partial Sum. The second
half adder logic can be used to add CIN to the
Sum produced by the first half adder to get
the final S output. If any of the half adder logic
produces a carry, there will be an output carry.
Thus, COUT will be an OR function of the half-
adder Carry outputs.

You might also like