Escolar Documentos
Profissional Documentos
Cultura Documentos
Circuits
Part 1: Boolean Algebra
Binary Logic and Digital Circuits
true or false
examples:
F(x, y) = x.y
F(x, y) = x + y
F(x, y, z) = y + x.z
x.y = 1 AND 0 = 0
x + y = 1 OR 0 = 1
but in what order to we perform the operations to find the answer to the third function?
Operators: Order of Precedence
priority highest to lowest:
Inputs Intermediate Output
NOT then AND then OR
x y z x x.z F=y+x.z
F(x,y,z) = y + x.z
0 0 0 1 0 0
evaluate F when x = 0, y = 1
0 0 1 1 1 1
and z = 1
0 1 0 1 0 1
easiest to evaluate in stages:
0 1 1 1 1 1
x = NOT(0) = 1
1 0 0 0 0 0
x.z = 1 AND 1 = 1
1 0 1 0 0 0
y + x.z = 1 OR 1 = 1
1 1 0 0 0 1
so we see that it helps to evaluate
1 1 1 0 0 1
the function in pieces
(can you spot the easy way to generate the set of truth table
input values for x, y and z?)
Boolean Identities
for now, well use the basic identities to perform the task
Boolean Identities
Name AND Form OR Form
Identity Law 1.x = x 0 + x = x
Null (or Dominance) Law 0.x = 0 1 + x = 1
Idempotent Law x.x = x x + x = x
Inverse Law x.x = 0 x + x = 1
Commutative Law x.y = y.x x + y = y + x
Associative Law (x.y).z = x.(y.z) (x+y)+z = x+(y+z)
Distributive Law x+y.z = (x+y).(x+z) x.(y+z) = x.y + x.z
Absorption Law x.(x+y) = x x + x.y = x
DeMorgans Law x.y = x + y x+y = x.y
Double Complement Law x = x
Table 3.5 from Computer Organization & Architecture
note the double-bar over the x
Using Identities to Simplify Functions
(examples i., ii. & iii. are based upon examples 3.2, 3.3 and the proof on p128 from Computer Organization & Architecture)
Using Identities to Simplify Functions
= y + (y + x) commutative
= (y + y) + x associative
= 1 + x inverse
= 1 null
Using Identities to Simplify Functions
recall that:
important: note that
x.y = x + y
x.y x.y
x+y = x.y
why?
example: show that OR, NOT and AND can be performed using NAND
operations only:
because building circuits is often easier just using NAND and NOR gates,
its useful to be able to negate a function (using a simple NOT operation)
so we see that DeMorgans law extends for 3 variables, and in fact generally
Standardized Form
weve seen that the same boolean function can be written in many different
ways
sum of products
product of sums
find and list the values of x, y and z which make the function true
x y z F
so the function is:
0 0 0 0
F = xyz + xyz + xyz + xyz
0 0 1 0
0 1 0 0
0 1 1 1 xyz
1 0 0 0
1 0 1 1 xyz
1 1 0 1 xyz
1 1 1 1 xyz
Table 3.8 from Computer Organization & Architecture
To Conclude
and to transform others so that they can be expressed just using NAND
or NOR
Chapter 3, Computer Organization & Architecture (3rd Edition), Null & Lobur
practice creating truth tables for the basic operators until you are
comfortable with them
use NAND gates to build the remaining gates from the example
create a function, draw its truth table and then derive its standardized form
as a sum of products