0% found this document useful (0 votes)
17 views12 pages

Boolean Algebra

Uploaded by

kahsay
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)
17 views12 pages

Boolean Algebra

Uploaded by

kahsay
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/ 12

Symbolic Logic

Boolean algebra derives its name from the mathematician George Boole.
Symbolic Logic uses values, variables and operations :

• True is represented by the value 1.


• False is represented by the value 0.

Variables are represented by letters and can have one of two values, either
0 or 1. Operations are functions of one or more variables.
• AND is represented by X.Y
• OR is represented by X + Y
• NOT is represented by X' . Throughout this tutorial the X' form will
be used and sometime !X will be used.

These basic operations can be combined to give expressions.

Example :

• X
• X.Y
• W.X.Y + Z

Precedence
As with any other branch of mathematics, these operators have an order of
precedence. NOT operations have the highest precedence, followed by
AND operations, followed by OR operations. Brackets can be used as with
other forms of algebra. e.g.

X.Y + Z and X.(Y + Z) are not the same function.

Function Definitions
The logic operations given previously are defined as follows :

Define f(X,Y) to be some function of the variables X and Y.

f(X,Y) = X.Y
• 1 if X = 1 and Y = 1
• 0 Otherwise

f(X,Y) = X + Y
• 1 if X = 1 or Y = 1
• 0 Otherwise

f(X) = X'
• 1 if X = 0
• 0 Otherwise

Truth Tables
Truth tables are a means of representing the results of a logic function
using a table. They are constructed by defining all possible combinations of
the inputs to a function, and then calculating the output for each
combination in turn. For the three functions we have just defined, the truth
tables are as follows.

AND
X Y F(X,Y)
0 0 0
0 1 0
1 0 0
1 1 1

OR
X Y F(X,Y)
0 0 0
0 1 1
1 0 1
1 1 1

NOT
X F(X)
0 1
1 0

Truth tables may contain as many input variables as desired


F(X,Y,Z) = X.Y + Z
X Y Z F(X,Y,Z)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1

Boolean Switching Algebras


A Boolean Switching Algebra is one which deals only with two-valued
variables. Boole's general theory covers algebras which deal with variables
which can hold n values.

Axioms
Consider a set S = { 0. 1}
Consider two binary operations, + and . , and one unary operation, -- , that
act on these elements. [S, ., +, --, 0, 1] is called a switching algebra that
satisfies the following axioms S

Closure

If X S and Y S then X.Y S


If X S and Y S then X+Y S

Identity

an identity 0 for + such that X + 0 = X


an identity 1 for . such that X . 1 = X

Commutative Laws

X+Y=Y+X
X.Y=Y.X

Distributive Laws

X.(Y + Z ) = X.Y + X.Z


X + Y.Z = (X + Y) . (X + Z)

Complement

X S a complement X'such that


X + X' = 1
X . X' = 0
The complement X' is unique.
Theorems

A number of theorems may be proved for switching algebras

Idempotent Law

X+X=X
X.X=X

DeMorgan's Law

(X + Y)' = X' . Y', These can be proved by the use of truth tables.

Proof of (X + Y)' = X' . Y'

X Y X+Y (X+Y)'
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0

X Y X' Y' X'.Y'


0 0 1 1 1
0 1 1 0 0
1 0 0 1 0
1 1 0 0 0

The two truth tables are identical, and so the two expressions are identical.

(X.Y) = X' + Y', These can be proved by the use of truth tables.

Proof of (X.Y) = X' + Y'

X Y X.Y (X.Y)'
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
X Y X' Y' X'+Y'
0 0 1 1 1
0 1 1 0 1
1 0 0 1 1
1 1 0 0 0

Note : DeMorgans Laws are applicable for any number of variables.

Boundedness Law

X+1=1
X.0=0

Absorbtion Law

X + (X . Y) = X
X . (X + Y ) = X

Elimination Law

X + (X' . Y) = X + Y
X.(X' + Y) = X.Y

Unique Complement theorem

If X + Y = 1 and X.Y = 0 then X = Y'

Involution theorem

X'' = X
0' = 1

Associative Properties

X + (Y + Z) = (X + Y) + Z
X.(Y.Z)=(X.Y).Z

Consensus theorem

X.Y + X'.Z + Y.Z = X.Y + X'.Z


(X + Y).(X' + Z).(Y + Z) = (X + Y).(X' + Z)

Proof of X.Y + X'.Z + Y.Z = X.Y + X'.Z:


X.Y + X'.Z + Y.Z = X.Y + X'.Z
= X.Y + X'Z + (X+X').Y.Z
= X.Y.(1+Z) + X'.Z.(1+Y)
= X.Y + X'.Z

The term which is left out is called the consensus term.

Given a pair of terms for which a variable appears in one term, and its
complement in the other, then the consensus term is formed by ANDing
the original terms together, leaving out the selected variable and its
complement.

Example :
The consensus of X.Y and X'.Z is Y.Z

The consensus of X.Y.Z and Y'.Z'.W' is (X.Z).(Z.W')

Algebraic Manipulation

Minterms and Maxterms

Any boolean expression may


be expressed in terms of
either minterms or maxterms.
To do this we must first
define the concept of a literal.
A literal is a single variable
within a term which may or
may not be complemented.
For an expression with N
variables, minterms and
maxterms are defined as
follows :
• A minterm is the
product of N distinct
literals where each
literal occurs exactly
once.
• A maxterm is the sum
of N distinct literals
where each literal
occurs exactly once.
For a two-variable
expression, the minterms and
maxterms are as follows

X Y Minterm Maxterm
0 0 X'.Y' X+Y
0 1 X'.Y X+Y'
1 0 X.Y' X'+Y
1 1 X.Y X'+Y'

For a three-variable
expression, the minterms and
maxterms are as follows

X Y Z Minterm Maxterm
0 0 0 X'.Y'.Z' X+Y+Z
0 0 1 X'.Y'.Z X+Y+Z'
0 1 0 X'.Y.Z' X+Y'+Z
0 1 1 X'.Y.Z X+Y'+Z'
1 0 0 X.Y'.Z' X'+Y+Z
1 0 1 X.Y'.Z X'+Y+Z'
1 1 0 X.Y.Z' X'+Y'+Z
1 1 1 X.Y.Z X'+Y'+Z'

This allows us to represent


expressions in either Sum of
Products or Product of Sums
forms

Sum Of Products (SOP)

The Sum of Products form


represents an expression as
a sum of minterms.

F(X, Y, ...) = Sum (ak.mk)

where ak is 0 or 1 and mk is a
minterm.
To derive the Sum of
Products form from a truth
table, OR together all of the
minterms which give a value
of 1.

Example

Consider the truth table

X Y F Minterm
0 0 0 X'.Y'
0 1 0 X'Y
1 0 1 X.Y'
1 1 1 X.Y

Here SOP is f(X.Y) = X.Y' +


X.Y

Product Of Sum (POS)

The Product of Sums form


represents an expression as
a product of maxterms.

F(X, Y, .......) = Product (bk +


Mk), where bk is 0 or 1 and
Mk is a maxterm.

To derive the Product of


Sums form from a truth table,
AND together all of the
maxterms which give a value
of 0.

Example

Consider the truth table from


the previous example.

X Y F Maxterm
0 0 1 X+Y
0 1 0 X+Y'
1 0 1 X'+Y
1 1 1 X'+Y'

Here POS is F(X,Y) = (X+Y')

Exercise

Give the expression


represented by the following
truth table in both Sum of
Products and Product of
Sums forms.

X Y Z F(X,Y,X)
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0

Conversion between POS


and SOP

Conversion between the two


forms is done by application
of DeMorgans Laws.

Simplification
As with any other form of
algebra you have
encountered, simplification of
expressions can be
performed with Boolean
algebra.

Example : Show that X.Y.Z' +


X'.Y.Z' + Y.Z = Y
X.Y.Z' + X'.Y.Z' + Y.Z = Y.Z'
+ Y.Z = Y

Example : Show that (X.Y' +


Z).(X + Y).Z = X.Z + Y'.Z

(X.Y' + Z).(X + Y).Z


= (X.Y' + Z.X + Y'.Z).Z
= X.Y'Z + Z.X + Y'.Z
= Z.(X.Y' + X + Y')
= Z.(X+Y')

Logic Circuits

Boolean algebra is ideal for expressing the behavior of logic


circuits.

A circuit can be expressed as a logic design and implemented as


a collection of individual connected logic gates.

Fixed Logic Systems


A fixed logic system has two possible choices for representing
true and false.

Positive Logic
In a positive logic system, a high voltage is used to represent
logical true (1), and a low voltage for a logical false (0).

Negative Logic
In a negative logic system, a low voltage is used to represent
logical true (1), and a high voltage for a logical false (0).

In positive logic circuits it is normal to use +5V for true and 0V


for false.

Switching Circuits
The abstract logic described previously can be implemented as
an actual circuit. Switches are left open for logic 0 and closed for
logic 1.

Two variable AND circuit X.Y


Two variable OR circuit X + Y

Four variable circuit U.V.(X + Y)

Truth Table
A truth table is a means for describing how a logic circuit's output
depends on the logic levels present at the circuit's inputs.

In the following twos-inputs logic circuit, the table lists all


possible combinations of logic levels present at inputs X and Y
along with the corresponding output level F.

X Y F = X*Y
0 0 0
0 1 0
1 0 0
1 1 1

When either input X AND Y is 1, the output F is 1. Therefore the


"?" in the box is an AND gate.

You might also like