10 Boolean Algebra
10 Boolean Algebra
10 Boolean Algebra
2
10 Boolean Algebra
• History
• Operators and Truth Tables
• Identities
• Standardized Form
A potted history
George Boole
1938: John Atanasoff determines 4 principles for his ABC digital computer: 1815−1864
4
10 Boolean Algebra
• History
• Operators and Truth Tables
• Identities
• Standardized Form
Boolean algebra
A system for the manipulation of variables, where the variables can have
one of two values:
• True or False.
• Which correspond to on or off, 1 or 0.
6
Operators and their truth tables
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1 NOT
1 1 1 1 1 1
AND OR
7
Operators and their truth tables
0 0 1 0 0 1 0 0 0
0 1 1 0 1 0 0 1 1
1 0 1 1 0 0 1 0 1
1 1 0 1 1 0 1 1 0
NAND NOR XOR
8
Boolean functions
Examples:
• F(x, y) = xy
• F(x, y) = x + y
• F(x, y, z) = y + x'.z
But in what order do we perform the operations to find the answer to the third function?
9
Operators: order of precedence
Here, we’ll use the basic boolean identities to perform the task.
12
Boolean identities
13
Truth table proofs
0 0 0 1 0 0 1 1 1 0 0 0 1 0 0 1 1 1
0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 0
1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 0
1 1 1 0 1 1 0 0 0 1 1 1 0 1 1 0 0 0
Important: note that x'.y' ≠ (x.y)' This technique extends for 3 or more variables.
14
Using identities to simplify functions
15
Using identities to simplify functions
= y + (x.y)'
= y + x' + y' DeMorgan’s
= y + y' + x' commutative
= (y + y') + x' associative
= 1 + x' inverse
= 1 null
16
Using identities to simplify functions
Prove (x + y).(x' + y) = y
(x + y).(x' + y)
= x.x' + x.y + y.x' + y.y distributive
= 0 + x.y + y.x' + y.y inverse
= 0 + x.y + y.x' + y idempotent
= x.y + y.x' + y identity
= y.(x + x') + y distributive (& commutative)
= y.(1) + y inverse
= y + y identity
= y idempotent ✓
17
Universality of NAND and NOR
18
NAND alone
Examples:
Show that OR, NOT and AND can be performed using NAND operations only: NAND(a,b) = (a.b)'
OR:
x+y = x.x + y.y idempotent
= ((x.x)')' + ((y.y)')' double complement
= ((x.x)'.(y.y)')' DeMorgan (a.b)' = a' + b'
= NAND(NAND(x,x),NAND(y,y))
✓
NOT:
x' = (x)' simple re-write
= (x.x)' idempotent
= NAND(x,x)
✓
19
NAND alone
Examples:
Show that OR, NOT and AND can be performed using NAND operations only: NAND(a,b) = (a.b)'
AND:
x.y = ((x.y)')' double complement
= ((x.y)'.(x.y)')' idempotent a = a.a
= NAND(NAND(x,y),NAND(x,y))
✓
20
10 Boolean Algebra
• History
• Operators and Truth Tables
• Identities
• Standardized Form
Standardized form
We've seen that the same boolean function can be written in many different ways.
To avoid confusion designers specify functions in a standardized (or canonical) form.
The two most common forms are:
Sum of Products:
• ANDed variables are ORed together.
• Such as F(x, y, z) = x.y + x.z + y.z
Product of Sums:
• ORed variables are ANDed together
• Such as F(x, y, z) = (x + y).(x + z).(y + z)
22
Universality of AND, OR and NOT
The easiest version to determine because we can just use a truth table:
• Find and list the values of x, y and z which make the function true.
• Then simply OR each expression in the list together.
We’ve seen how to form truth tables to help us to determine the outcome of functions.
• Don’t underestimate the value of using these!
We’ve seen how to apply the identities to help us to simplify some functions.
And to transform others so that they can be expressed just using NAND or NOR.
• Making good use of DeMorgan’s Law.
24
Reading and References
Required Reading
• Course textbook chapter 7.1, 7.2
Suggested learning activities:
• In these slides we simplified functions by hand.
• But the process can be automated using Karnaugh Maps.
• Which is helpful in circuit design,
• and you see an explanation of the process here.
25