+ CS 325: CS Hardware and Software Organization and Architecture Gates and Boolean Algebra Part 2.
-
Upload
tyrone-miles -
Category
Documents
-
view
218 -
download
0
Transcript of + CS 325: CS Hardware and Software Organization and Architecture Gates and Boolean Algebra Part 2.
+Outline
Sum of Products (SOP)
Fan-in, Fan-out
Cascading to Reduce Inputs
Boolean Algebra Laws
Gate Reduction using Boolean Algebra
+Circuits from SOP Functions
Why simplify circuits? NAND and NOR gates are simpler (faster, smaller) than NOT
AND and NOT OR.
Reduction in complexity when using a small number of gate types.
Goal: To implement circuit using a small complete set of operators. NAND and NOR are both complete since any Boolean
function can be implemented with either.
Faster to use small number of inputs to a gate (fan-in), and small number of gate inputs from a gate output (fan-out) Typically, fan-in and fan-out < 10.
+Gate Cascading to Reduce InputsImplementing 3-input AND and OR functions with 2-input gates
ABC = (AB)C A+B+C = (A+B)+C
Implementing a 3-input NAND function with 2-input gates.
NO!Correct
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
Commutative Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
Commutative Law
Associative Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
Commutative Law
Associative Law
Distributive Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
Commutative Law
Associative Law
Distributive Law
Absorption Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
Commutative Law
Associative Law
Distributive Law
Absorption Law
De Morgan’s Law
+Basic Laws of Boolean Algebra Boolean Algebra follows many algebra rules which can
be used to make simpler circuits.
Example: AB + AC Three gates = A(B + C), Distributive Law Two gates
Name AND Form OR Form
Identity Law
Null Law
Idempotent Law
Commutative Law
Associative Law
Distributive Law
Absorption Law
De Morgan’s Law
+Equivalent Gates/Symbols Using Boolean Laws (identities), alternative symbols for
some gates can be derived:
+Functionally Complete Sets of Gates
Not all gate types are typically implemented in circuit design. Simpler if only 1 or 2 types of gates are used.
A functionally complete set of gates means that any Boolean function can be implemented using only the gates in that set.
Examples of functionally complete sets: AND, OR, NOT AND, NOT OR, NOT NAND NOR
+Implement XOR with NANDs
Exclusive-OR (XOR) example: Step 1: build truth table
Step 2: find SOP and build circuit using AND and OR.
A B
0 0 0
0 1 1
1 0 1
1 1 0
𝑨⊕𝑩=𝑨𝑩+𝑨𝑩
+Implement XOR with NANDs
Apply Boolean Algebra rules:
so,
De Morgan’s Law:
so,
The last formula is 3 NAND gates.
+Simplification Boolean functions, and therefore circuits, can usually
be manipulated using Boolean laws into simpler functions.
Distributive Law
Inverse Law
Distributive Law
Inverse Law
Idempotent Law
Identity Law
How to check for correctness?
+Checking Logic for Correctness We can check our solution using a truth table
Checking
0 0 0 1 0 0
0 1 1 0 0 0
1 0 1 1 1 1
1 1 1 1 1 1
+Checking Logic for Correctness We can check our solution using a truth table
Checking
Correct
0 0 0 1 0 0
0 1 1 0 0 0
1 0 1 1 1 1
1 1 1 1 1 1
+Another Example Draw the logic gate diagram for the following Boolean
function:
Circuit Reduction:
Distributive Law
Idempotent Law
Idempotent Law
Distributive Law
Check with Truth table for correctness.
+Checking Logic for Correctness We can check our solution using a truth table
Checking
0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 1 0 0 0 0 0 0
0 1 1 0 1 1 1 1
1 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 1 0 1 0 0 1 1
1 1 1 1 1 1 1 1
+Checking Logic for Correctness We can check our solution using a truth table
Checking
Correct
0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 1 0 0 0 0 0 0
0 1 1 0 1 1 1 1
1 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0
1 1 0 1 0 0 1 1
1 1 1 1 1 1 1 1