0% found this document useful (0 votes)
21 views33 pages

Boolean Algebra-New

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)
21 views33 pages

Boolean Algebra-New

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/ 33

Boolean Algebra

• Boolean algebra was developed in 1847 by a


mathematician George Boole.
• Boolean algebra is a branch of mathematics
that provides a set of operations and rules to
manipulate binary variables.
• The Boolean algebra is based on the binary
number system and logical arithmetic.
• Thus, it is also referred to as logical algebra.
• Boolean algebra is used as the fundamental of
digital electronics, computer systems, and
information technology.
• Boolean algebra is based on the binary
number system. Hence, the Boolean variables
can take only one of the two possible values
i.e., 0 or 1. Here, the value 0 represents the
False state, while the value 1 represents the
True state.
Logical Operations in Boolean Algebra
The operations in Boolean algebra have their
own symbols
Negation / NOT Operation
• The NOT operation is performed to obtain the
inverted version of the input value. Thus, the
result of the NOT operation is false (0), if the
input is true (1) and vice-versa. i.e
1’=0
0’=1
• The NOT operation is represented by the
symbol "~". For example, NOT A is
represented as ~A.
AND Operation
• A logical operation in which the outcome is true
(1) only when all the input values are true (1),
otherwise, the output is false (0) . The basic rules
are illustrated with their relation to the AND gate
in Figure

• The AND operation is represented by a dot (.). For


example, A AND B can be represented as A.B in
symbolic form.
OR Operation
• The OR operation is a logical operation in which
the output is false (0) only when all input values
are false (0), otherwise the output is true (1). The
basic rules are illustrated with their relation to
the OR gate in Figure

• The OR operations is denoted by a plus (+). For


example, A OR B can be represented as
A + B.
Terminology of Boolean Algebra
• Boolean Variable
A symbol that can take one of the two
possible binary values i.e., 0 and 1.

• Boolean Value
A value representing the state of a variable. It
can be either True (1) or False (0).
• Literal
A variable or the complement of the variable
in Boolean Algebra is called the Literal.
• Logic Gate
A logic gate is a digital circuit that can perform
a specific logical operation. There are 7 main
logic gates used in digital electronics, they are
AND gate, OR gate, NOT gate, NOR gate, NAND
gate, XOR gate, and XNOR gate.
Boolean Function or Expression
• It is a logical expression that consists of
Boolean variables and logical operators
• The value for a logical function can either be 0
or 1.
• The Boolean function may be represented as
An algebraic expression or
A truth table
Operator Precedence
• Expression is scanned from left to right.
• First, expressions enclosed within parantheses
are evaluated.
• Second, all complement (NOT) operations are
performed.
• Third, (AND) operations are performed.
• Lastly; OR operations are performed.
Operator Precedence
• For example; when having a Boolean
expression below, precedence would be;
Representation as an Algebraic
Expression
• A logical function can be represented as
W  X Y Z

• Where W is a function of X,Y and Z written as


W  f ( X ,Y , Z )
• The RHS of the equation is call an expression.
Representation as a Truth table
X Y Z Y Y Z W  X Y Z
1 1 1
1 1 0
1 0 1
1 0 0
0 1 1
0 1 0
0 0 1
0 0 0
Representation as a Truth table
X Y Z
Y Y Z X Y Z
1 1 1 0 0 1
1 1 0 0 0 1
1 0 1 1 1 1
1 0 0 1 0 1
0 1 1 0 0 0
0 1 0 0 0 0
0 0 1 1 1 1
0 0 0 1 0 0

Note :The number of rows in the table is equal to 2 n


Where n is the number of literals in the function.
Minimization/simplification of Boolean
Function
Minimization or simplification of Boolean
functions deals with:
Reduction in number of literals
Reduction in number of terms
Minimization is achieved through manipulating
the expression to obtain equal and simpler
expression (having fewer literals and/or
terms).
F1  x. y.z  x. y.z  x. y
• F1 has 3 literals (x, y, z) and 3 terms
F2  x. y  x.z
• F2 has 3 literals (x, y, z) and 2 terms.
• F2 can be realized with fewer electronic
components resulting in a cheaper circuit.
x y z x y B F1 F2
x. y x. y.z x. y x. y.z x. y x.z
1 1 1 0 0 0 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 1 0 1 0 0 0 0 1 0 0 1 1
1 0 0 0 1 0 0 0 0 1 0 0 1 1
0 1 1 1 0 0 0 1 1 0 1 1 1 1
0 1 0 1 0 0 0 1 0 0 0 0 0 0
0 0 1 1 1 1 1 0 0 0 1 1 1 1
0 0 0 1 1 1 0 0 0 0 0 0 0 0

whereB  x. y.z  x. y.z


Basic Laws for Boolean Algebra
Boolean laws Description
A.0=0
Annulment law
A+1=1
A.1=A
Identity law
A+0=A
A.A=A
Idempotent law
A+A=A
A . A’ = 0
Complement law
A + A’ = 1
A.B=B.A
Commutative Law
A+B=B+A
Basic Laws for Boolean Algebra
A . (B . C) = (A . B) . C
Associative law
A + (B + C) = (A + B) + C
A.(B + C) = A.B + A.C
Distributive law
A + (B.C) = (A + B).(A + C)
A.(A + B) = A / A+A.B=A
Absorption law
A + (A . B) = A / A+A’.B=A+B
Involution law (A’)’ = A
(A + B)’ = A’ . B’
De Morgan’s law
(A . B)’ = A’ + B’
Boolean Algebra Theorems
• There are two basic theorems of great
importance in Boolean Algebra, which are De
Morgan’s First Laws, and De Morgan’s Second
Laws. These are also called De Morgan’s
Theorems.
Boolean Algebra Theorems
• De Morgan’s First laws
states that the complement of the product
(AND) of two Boolean variables (or
expressions) is equal to the sum (OR) of the
complement of each Boolean variable (or
expression).
( P.Q ) '  P '  Q '
• Generally,
A1  A2  A3  ...  An  A1  A2  A3  ... An
Proof by truth table
P Q P’ Q’ P.Q (P.Q)’ P’+Q’

1 1 0 0 1 0 0

1 0 0 1 0 1 1

0 1 1 0 0 1 1

0 0 1 1 0 1 1

• We see that truth values for (P.Q)’ are equal to


truth values for (P)’ + (Q)’, corresponding to the
same input. Thus, De Morgan’s First Law is true.
• De Morgan’s Second laws
States that; the Complement of the sum (OR)
of two Boolean variables (or expressions) is
equal to the product(AND) of the complement
of each Boolean variable (or expression).
( P  Q )  P .Q ' ' '

Generally;
A1  A2  A3  ...  An  A1  A2  A3  ...  An
Proof by truth table
P Q P’ Q’ P+Q (P+Q)’ P’.Q’

1 1 0 0 1 0 0

1 0 0 1 1 0 0

0 1 1 0 1 0 0

0 0 1 1 0 1 1

• We see that truth values for (P + Q)’ are equal to


truth values for (P)’.(Q)’, corresponding to the
same input. Thus, De Morgan’s Second Law is
true.
examples
Apply DeMorgan’s theorem to each expression
a )( A  B )  C
b)( A  B )  CD
c )( A  B )C D  E  F

Solution
a )( A  B )  C  ( A  B )C  ( A  B )C
b)( A  B )  CD  ( A  B )CD  ( A B )(C  D )  A B (C  D )
c )( A  B )C D  E  F  (( A  B )C D ( E  F )  ( A B  C  D ) E F
Examples
Qn2. Simplify A + A’ . B.
Solution:
Using Distributive Law
A + A’ . B = (A + A’) . (A + B)
Using Complement law
= (1) . (A + B)
Using AND law
=A+B
Example: Using Boolean algebra techniques, simplify this
expression:
AB + A(B + C) + B(B + C)
Solution
The following is not necessarily the only approach.
AB + A(B + C) + B(B + C)
=AB + AB + AC + BB + BC (by distributive law )
=AB + AB + AC + B + BC(from (BB = B) )
=AB + AC + B + BC (from (AB + AB = AB) )
=AB + AC + B (from(B + BC = B) )
=B + AC (from (AB + B = B) )
3. Simplify (A + B) . (A + B’) + (B . B’).
Solution:
(A + B) . (A + B’) + (B . B’) = (A + B) . (A + B’) + (0)
= A + (B . B’)
= A + (0)
=A
Simplify the following Boolean expression:
(X + Y).(X’ + Y).
Solution:
(X + Y).(X’ + Y) = XX’ + XY + X’Y + YY (Distributive law)
= 0 + XY + X’Y + Y (Complement and idempotent law)
= XY + X’Y + Y (Identity law)
= (X + X’) .Y + Y (Distributive law)
= 1.Y + Y (Complement law)
=Y+Y (Identity law)
=Y (Idempotent law)
Thus, the simplified Boolean expression is (X + Y).(X’ + Y) = Y.
Qn4: Simplify the following Boolean algebra
p q r  p qr  pq
' ' ' ' '

Solution:
Solution:
p ' q ' r '  p ' qr  pq '  p ' (q ' r '  qr )  pq '
 p (1)  pq
' '

 p '  pq '
 ( p '  p ).( p '  q ' )
 (1).( p '  q ' )
 p q ' '
Review Questions
Simplify the following Boolean functions
i)(A  B) . (A  B’ )  (B . B’ ).
ii)AB  A(B  C)  B(B  C)
iii)x  x  y
iv ) x  ( x  y )
v) x  y  z  x  y  z  x  y
vi ) x  y  x  z  y  z
vii )( x  y )  ( x  z )  ( y  z )
viii)A B + A (B + C) + B(B + C)

You might also like