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

Chapter4 Boolean Algebra-290510 013229

1. Boolean algebra is the basic mathematics for studying logic design and digital circuits. It uses boolean variables that can take on one of two values, typically 0 and 1. 2. Boolean operations like AND, OR, and NOT are used to combine boolean variables into boolean functions. Complex functions can be built from the basic operations. 3. Boolean algebra follows laws like commutativity and associativity similarly to normal algebra, but also has its own dual laws related to replacing operations. Theorems can be proven by evaluating all combinations of variable values.

Uploaded by

Alviana Jad's
Copyright
© Attribution Non-Commercial (BY-NC)
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)
180 views

Chapter4 Boolean Algebra-290510 013229

1. Boolean algebra is the basic mathematics for studying logic design and digital circuits. It uses boolean variables that can take on one of two values, typically 0 and 1. 2. Boolean operations like AND, OR, and NOT are used to combine boolean variables into boolean functions. Complex functions can be built from the basic operations. 3. Boolean algebra follows laws like commutativity and associativity similarly to normal algebra, but also has its own dual laws related to replacing operations. Theorems can be proven by evaluating all combinations of variable values.

Uploaded by

Alviana Jad's
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 7

Boolean Algebra Boolean Variables, Functions

• Basic mathematics for the study of logic design is


Boolean Algebra • A boolean variable can take on two values
– Will use the values ‘0’ and ‘1’
• Basic laws of Boolean Algebra will be
– Could just as easily use ‘T’, ‘F or H,L or ON,OFF
implemented as switching devices called logic
gates. • Boolean operations transform Boolean Variables.
– Basic operations are NOT, AND, OR
• Networks of Logic gates allow us to manipulate
digital signals • We can make more complicated Boolean
– Can perform numerical operations on digital signals Functions from the basic boolean operations
such as addition, multiplication
– Can perform translations from one binary code to
another.
BR 8/99 1 BR 8/99 2

NOT operation
AND operation
The NOT operation (or inverse, or complement operation) replaces a The AND operation is a function of two variables (A, B)
boolean value with its complement:
F(A,B) = A • B boolean function representation
0’ = 1 , 1’ = 0
When both A and B are ‘1’, then F is ‘1’.

Truth Table 0 • 0 = 0, 0 • 1 = 0, 1 • 0 = 0, 1•1=1

A’ is read as NOT A or Complement A Truth Table AND


A Y
0 1 A B Y A
A A’ F
1 0 Inverter symbol 0 0 0
0 1 0 B
F(A) = A’ boolean representation 1 0 0
1 1 1
BR 8/99 3 BR 8/99 4

AND operation (cont).


OR operation
Will usually drop the ‘• ‘ in the equation and just write the equation
as: The OR operation is a function of two variables (A, B)

F(A,B) = AB boolean function representation F(A,B) = A + B boolean function representation

Can also view AND operation as two switches in series: When either A or B are ‘1’, then F is ‘1’.
0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1+1=1
Truth Table
Switch Open (0)
Switch Closed (1) A B Y
0 0 0 OR

A B 0 1 1
When Switch A closed (1)
1 0 1
and Switch B closed (1),
1 1 1
circuit is closed (1)
BR 8/99 5 BR 8/99 6

1
OR operation (cont).
Can view OR operation as two switches in parallel: Boolean Functions
A
Neither switch A or switch B is More complex boolean functions can be created by combining
B closed, so circuit is open (0) basic operations
A A’
A F(A,B) = A’ + B
Switch B closed (1), so circuit is B OR
B closed (1)

A A B A’ F = A’ + B
Switch A closed (1), so circuit is
closed (1) 0 0 1 1
B
0 1 1 1
A 1 0 0 0
Switch A or Switch B is closed, 1 1 0 1
B circuit is closed (1)
BR 8/99 7 BR 8/99 8

Basic Theorems Duality


Duals
A dual of a boolean expression is formed by replacing
X+0=X X*1=X ANDs with ORs, ORs with ANDs, ‘1’s with ‘0’s, and
X+1=1 X*0=0 ‘0’s with ‘1’s. Variables and their complements are left
alone.
If two boolean expressions are equal, then their duals are
X+X=X X*X=X
equal!
(X’)’ = X (X’)’ = X Helpful in remembering boolean laws. Only need to
remember one set, can generate the 2nd set by taking the
X + X’ = 1 X * X’ = 0 dual!

BR 8/99 9 BR 8/99 10

Proving a Theorem Commutative, Associative Laws


How do we prove X + 0 = X is correct? Dual Laws
One way is to replace all boolean variables with values of ‘0’, ‘1’ Commutative
and use basic operations: X+Y=Y+X X*Y=Y*X
For X = 0, 0+ 0 = 0 For X = 1, 1 + 0 = 1
0 = 0 1 = 1 Associative Associative

So, X + 0 = X is valid. (X + Y) + Z = X + (Y + Z) (XY) Z = X(YZ)


Prove X + X’ = 1
For X = 0, 0 + (0)’ = 1 For X = 1, 1 + (1)’ = 1 If ‘+’ is viewed as addition, and ‘*’ as multiplication, then the
0+1 =1 1+ 0 =1 Commutative, Associative laws in normal algebra are the same as
1 =1 1 = 1 in boolean algebra.
So, X + X’ = 1 is valid.
BR 8/99 11 BR 8/99 12

2
Three Input AND Function Distributive Law
A
F = ABC = (AB) C = A (BC)
B
C
A(B + C) = AB + AC (valid in normal algebra)

A B C AB F = ABC
0 0 0 0 0 Dual:
0 0 1 0 0
0 1 0 0 0 A + BC = (A + B) (A + C) (only valid in Boolean algebra!)
0 1 1 0 0
1 0 0 0 0 Note that the 2nd form is NOT valid in normal algebra! This
1 0 1 0 0 tends to make one forget about it. Remember the first form,
1 1 0 1 0 then take the DUAL of it to get the second form.
1 1 1 1 1
BR 8/99 13 BR 8/99 14

Prove A + BC = (A + B) (A + C) Other Simplification Theorems


Use Truth Table method for both sides Duals
XY + XY’ = X (X +Y)(X+Y’) = X
A B C BC A+BC A+B A+C (A+B)(A+C)
0 0 0 0 0 0 0 0
X + XY = X X(X + Y) = X
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
(X + Y’)Y = XY XY’ + Y = X + Y
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 0 1 1 1 1 Prove XY + XY’ = X via algebraic manipulation
1 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1 XY + XY’ = X (Y + Y’) = X (1) = X !!!!!

Results are same


BR 8/99 15 BR 8/99 16

Simplification Sum Of Products (SOP) Form


• Simplification tries to reduce the number of terms in a
boolean equation via use of basic theorems A boolean expression is in Sum Of Products form when all
• A simpler equation will mean: products are the products of single variables only.
– less gates will be needed to implement the equation
– could possibly mean a faster gate-level implementation F = AB’ + CD’E + AC’E’ (SOP Form)
• Will use algebraic techniques at first for simplification
G = ABC’ + DEFG + H (SOP Form)
– Later, will use a graphical method called K-maps
– Computer methods for simplification are widely used in industry.
Y = A + B’ + C + D (SOP Form)

Z = (A+B)CD + EF Not SOP Form


= ACD + BCD + EF SOP Form

BR 8/99 17 BR 8/99 18

3
Use Distributive Law for Multiplying Use 2nd Distributive Law
Problem: Put into SOP form the following equation and Recall 2nd Distributive Law:
simplify: (X + Y)(X + Z) = X + YZ
Lets try and use this law, may make things easier:
(A + BC) (A + D + E)
Try just straightforward multiplication of terms: (A + BC) (A + D + E)
AA + AD + AE + ABC + BCD + BCE (A + (BC)) ( A + (D + E) )
Apply 2nd Distributive Law:
Simplify (AA = A):
A + BC (D + E)
A + AD + AE + ABC + BCD + BCE
Multiply Out:
Look for simplification via factoring:
A(1 + D + E + BC) + BCD + BCE A + BCD + BCE (Final SOP form)
A (1) + BCD + BCE Finished!!
A+ BCD + BCE !!!!!!!!! (Final SOP form)
BR 8/99 19 BR 8/99 20

A + BCD + BCE as logic gates Product of Sums (POS) Form


B A boolean expression is in Product Of Sums form when all
C sums are the sums of single variables.
D
B F = (A + B’)(C + D’ + E)(A + C’ + E’) (POS Form)
C G = A (B + E)(C + D) (POS Form)
E AND-OR form

A Y = AB + AC Not POS Form


= A (B + C) POS Form
SOP can be implemented in two levels of logic assuming
that both a variable (A) and its complement (A’) are
available (Dual Rail Inputs). SOP is a TWO-LEVEL form
(AND-OR)
BR 8/99 21 BR 8/99 22

Factoring (A+B’)(A+C)(A+D) as Logic Gates


Use factoring to get to Product of Sums form. A

Use basic theorem: B’

X + YZ = (X + Y) (X + Z) (just reverse of distributive law) A


C
Problem: Put A + B’CD into POS Form:
A
A + B’CD = (A + B’) (A + CD ) OR-AND form
D

= (A + B’) (A + C) (A + D)
POS can be implemented in two levels of logic assuming
(A + B’) (A + C) (A + D) is final POS form!!!! that both a variable (A) and its complement (A’) are
available (Dual Rail Inputs). POS is a TWO-LEVEL form
(OR-AND form)
BR 8/99 23 BR 8/99 24

4
Consensus Theorem
Prove the Consensus Theorem
Consensus theorem states:
XY + X’Z + YZ = XY + X’Z Consensus Theorem Proof:
XY + X’Z + YZ = XY + X’Z + (X + X’)YZ
The YZ term is called the consensus term and is
= XY + X’Z + XYZ + X’YZ
redundant. The consensus term is formed from a PAIR
= (XY + XYZ) + (X’Z + X’YZ)
OF TERMS in which a variable (X) and its complement
= XY (1 + Z) + X’Z (1 + Y)
(X’) are present; the consensus term is formed by
= XY + X’Z
multiplying the two terms and leaving out the selected
variable and its complement.
You could also use a truth table to prove this.

The consensus of XY, X’Z is YZ .

BR 8/99 25 BR 8/99 26

Dual of the Consensus Theorem Short Cuts for Multiplying


A short cut theorem for Distribution (Multiplication)
(X+Y) (X’ + Z) (Y + Z) = (X + Y) (X’ + Z)
(X + Y) (X’ + Z) = XZ + X’Y

The consensus of (X+Y)(X’+Z) is (Y + Z) .


Only works when you have a variable (X) and its complement
(X’). To PROVE this, lets do the distribution the long way.
How do you use the consensus theorem? Simply be
suspicious anytime you have two terms that have a variable
and its complement. Form the consensus term and see if it is (X + Y)(X’ + Z) = X X’ + XZ + X’Y + YZ
present; if consensus term is present, just get rid of it.
0 Redundant by
consensus theorem
= 0 + XZ + X’Y = XZ + X’Y
BR 8/99 27 BR 8/99 28

DeMorgan’s Laws Applying DeMorgan’s Law


DeMorgan’s Laws provide an easy way to find the inverse of Apply DeMorgan’s Law to a more complex expression:
a boolean expression:
(X + Y)’ = X’ Y’
(XY)’ = X’ + Y’ (AB + C’D)’ = (AB)’ (C’D)’
= (A’+B’)(C + D’)
Note that DeMorgan’s law was applied twice.
An easy way to remember this is that each TERM is
complemented, and that ORs become ANDs; ANDs Another example:
become ORs.
[(A’ + B)C’]’ = (A’ + B)’ + (C’)’
Easy to prove this via a truth table, see textbook. = (A’)’ (B)’ + C
= AB’ + C

BR 8/99 29 BR 8/99 30

5
NAND, NOR Gates NAND, NOR (cont.)
Why do we care about DeMorgan’s Law? NAND (NOT AND) - can be thought of as an AND gate
followed by an inverter.
There are two other gate types that produce the complement
of a boolean function! A (AB)’ A
AB (AB)’
AB Y AB Y B
B
0 0 1 0 0 1 NAND
0 1 1 0 1 0
1 0 1 1 0 0 NOR (NOT OR) - can be thought as an OR gate followed
1 1 0 1 1 0 by an inverter.

A (AB)’ A (A+B)’ A A+B (A+B)’


A (A+B)’
B B B
B NOR
NAND NOR
BR 8/99 31 BR 8/99 32

Actually…. What is this logic function in SOP form?


In the real world, an AND gate is made from an NAND gate
followed by an inverter!!! A (AB)’
An OR gate is made from a NOR gate followed by an inverter!!! B F = ((AB’) (CD)’)’

A (AB)’ A C
AB AB
B B D (CD)’
NAND AND
Hmmmmmmmm…. Lets use DeMorgan’s Law

A (A+B)’ A+B F = ((AB)’(CD)’)’ = ((AB)’)’ + ((CD)’)’ = AB + CD !!!!


A+B A
B
B OR
NOR An interesting result…... SOP Form!!

BR 8/99 33 BR 8/99 34

NAND-NAND form = AND-OR form What is this logic function in POS form?
A (AB)’ A (A+B)’
B F = ((AB’) (CD)’)’ B F= ((A+B)’ + (C+D)’)’

C C (C+D)’
D D
(CD)’ Same logic function Hmmmmmmmm…. Lets use DeMorgan’s Law
A (AB)
F = ((A+B)’ + (C+D)’)’
B F = AB + CD = ((A+B)’)’ ((C+D)’)’ = (A+B) (C+D) !!!!!

C An interesting result…...
POS Form!!!
D (CD)
BR 8/99 35 BR 8/99 36

6
NOR-NOR form = OR-AND form
Two Level Form Summary
A (A+B)’
B F= ((A+B)’ + (C+D)’)’ Any logic function in SOP form (Sum of Products) can be
implemented in the two level gate forms of AND-OR,
C (C+D)’ NAND-NAND.
D
Same logic function Any logic function in POS form (Product of Sums) can be
A implemented in the two level gate forms of OR-AND, NOR-
(A+B)
NOR.
B F= (A+B)(C+D)

C (C+D) There are actually FOUR more two level gate forms but we will
D not talk about these.

BR 8/99 37 BR 8/99 38

What do you need to know?


XOR Function
• Basic Boolean Theorems
One last gate type is the XOR Gate (Exclusive OR gate).
• Proving boolean theorems (algebraically, truth
XOR A F=AÅB table)
AB Y B • Duality
0 0 0
0 1 1 • Boolean equation to gate network and vice-versa
1 0 1 XOR gate is usual in logic circuits that do
• Algebraic Simplification
1 1 0 binary addition/subtraction.
• Consensus Theorem, De’Morgans Laws
Note that: • SOP form, POS form
F =AÅB
= A’B + AB’ • Two level forms AND-OR, NAND-NAND, OR-
AND, NOR-NOR
• XOR Gate
BR 8/99 39 BR 8/99 40

You might also like