Lecture 1:
Introduction,
Logic gates,
Boolean algebra, Canonical Forms
Spring 2011
Partha Sarathi Mandal
•
•
•
•
•
•
•
•
Number Systems: representations of numbers (binary, octal, decimal, and hexadecimal), arithmetic of signed and unsigned numbers;
Boolean algebra and logic gates: gate level minimization of Boolean functions;
Combinational logic circuits: design and analysis, some standard combinational circuits (encoders, decoders, multiplexers); Sample and hold Circuits, analogtodigital converter, digitaltoanalog converter.
Synchronous sequential logic circuits: design and analysis; flipflops, registers, counters;
Finite state model: state tables and state diagram, state minimization;
Memory organization: hierarchical memory systems, cache memories, cache coherence, virtual memory;
System buses: interconnection structures and bus interconnection, Arithmetic
Logic Unit.
Study of an existing CPU: architecture, instruction set and the addressing modes supported; assembly language programming;
Control unit design: instruction interpretation, hardwired and microprogrammed methods of design; RISC and CISC paradigms. I/O transfer techniques: programmed, interruptdriven and DMA; I/O processors and channels, mapping of
I/O addresses.
•
Marks distribution:
–
–
–
Quizzes + Assignments:
Mid Semester:
End Semester:
30%
30%
40%
•
•
•
•
There may be pop quizzes (without prior warning or announcement) in the classes.
If any one fails to write any of the quizzes or the midsemester examination then NO makeup examination will be conducted .
The portion (syllabus) for Midsemester examination will be in general from the first lecture to the last lecture just before the mid semester examination.
The endsemester examination will cover all topics.
•
•
M. Morris Mano, “Digital Logic and Computer Design”,
10th impression ,Pearson Education, Inc., 2008.
M. M. Mano, “Digital Design”, 3rd Edition, Pearson
Education Asia, 2002.
•
•
D.A. Pattersonand J.L. Hennessey, "Computer
Organization and Design: The Hardware/Software
Interface", Morgan Kaufman
J.L. Hennesseyand D.A. Patterson, "Computer
Architecture: A Quantitative Approach ", Morgan
Kaufman
Oper. Sys
Computer Organization and Architecture
Logic Design
In 1938,
Shannon
showed how the basic rules of logic first given by
George Boole
in his 1854 publication
The Laws of Thought
, can be used to design circuits that enables computer hardware to perform various arithmetic and logical operation. These rules form the basis of Boolean Algebra. These rules involve two
Symbols 1 and 0 (synonymous with true the operators AND, OR, NOT.
and false ) and
Electric Switches and Logical Networks
Electric Switches and Logical Networks
•
Developed mid1800’s by George Boole to formalize human thought
–
Ex: “I’ll go to lunch if Mary goes OR John goes, AND Sally does not go.”
•
•
•
Let F represent my going to lunch (1 means I go, 0 I don’t go)
Likewise, m for Mary going, j for John, and s for Sally
Then
F = (m OR j) AND NOT(s)
–
Nice features
•
Formally evaluate
– m=1, j=0, s=1 > F = (1 OR 0) AND NOT(1) = 1 AND 0 = 0
•
Formally transform
–
F = (m and NOT(s)) OR (j and NOT(s))
–
Looks different, but same function
Evaluate the Boolean equation:
F = (a AND b) OR (c AND d)
What is the value of F ?
1. when a=1, b=1, c=1, d=0.
2. when a=0, b=1, c=0, d=1.
NOT/OR/AND
Logic Gate Timing Diagrams
Motionindark Detector
Turn on lamp (F=1) when motion sensed (a=1) and no light (b=0)
F = a AND NOT(b)
Build using logic gates, AND and NOT, as shown
Which circuit corresponds to the Boolean
Equation: F = a AND NOT( b OR NOT(c) )
Example: Seat Belt Warning Light System
An nvariable Boolean function f : {0.1} n
⟶
{0,1}
It can be expressed as a truth table.
•
•
•
•
•
Commutative
–
A+B = B+A
–
A.B=B.A
Distributive
–
–
A.(B+C)=A.B+A.C
A+(B.C)=(A+B).(A+C)
Associative
–
(A+B)+C=A+(B+C)
–
(A.B).C=A.(B.C)
Identity
–
0+A=A+0=A
–
1.A=A.1=A
Complement
–
A+A’ = 1
–
A.A’=0
•
Ex 1: Show x+x’.z
equivalent to x+z.
x+x’.z = (x+x’).(x+z)
= 1.(x+z)
= x+z
•
Ex 2: Can xx’+xy(x’+y’) ever evaluate to 1?
xx’+xy(x’+y’)
=xx’+xyx’+xyy’
=xx’+yxx’+xyy’
=0+y.0+x.0
=0+0+0
=0
•
•
•
•
•
Null elements
–
–
A+1= 1
A.0=0
Idempotent Law
–
A+A=A
–
A.A=A
Involution
–
(A’)’=A
DeMorgan’s Law
–
–
(A+B)’=A’.B’
(A.B)’=A’+B’
Complement
–
A+A’ = 1
–
A.A’=0
•
•
Ex 1: Show x+x.z equivalent to x.
x+x.z
= x.1+x.z as x=x.1
= x.(1+z) distributive law
= x.1 as A+1=1
= x Identity
Dual of the above equation
: x.(x+z)=x

Every
Boolean eq
. has a dual, which is found by interchanging AND and OR operators and replacing 0's by 1's and 1's by 0's.
x.(x+z)
= x.x+x.z = x+ x.z =x
Note that the brackets are added to maintain the evaluation order.
•
•
Any algebraic equality derived from the axioms of Boolean algebra remains true when the operators (.) and (+) are interchanged and the identity elements 0 and 1 are interchanged.
For example: x +1=1 > x.0 = 0 (Dual)
•
•
The dual of (x . 1 ).(0 + x') = 0 is
(x + 0)+(1 . x') = 1 dual of (x + y).(y + z) = x.z + y is x.y + y.z = (x + z).y
Representation of Boolean Functions
•
A function can be represented in different ways
–
Here are seven representations of the same function using four different methods:
English, Equation, Circuit
, and
Truth Table
•
Truth Table Representation of Boolean
Functions
Define value of F for each possible combination of input values
–
2input function: 4 rows
–
3input function: 8 rows
–
4input function: 16 rows
•
•
Can convert from any representation to any other
Common conversions
–
Equation to circuit (we did this earlier)
–
Truth table to equation (which we can convert to circuit)
•
Easy  just OR each input term that should output 1
–
Equation to truth table
•
Easy  just evaluate equation for each input combination(row)
•
Creating intermediate columns helps
Q: Convert to equation
ab’c abc’ abc
Standard Representation: Truth Table
•
•
How can we determine if two functions are the same ?
–
Is f = c’(hp + hp’ + h’) the same as g = hc’ + h’pc’?
•
Use algebraic methods
•
But if we failed, does that prove not equal?
–
No.
Solution: Convert to truth tables
–
Only ONE truth table representation of a given function
•
Standard
representation – for given function, only one version in standard form exists.
–
But, truth tables too big for numerous inputs f = c’(hp + hp’ + h’) f = c’( h(p + p’) + h’ ) f = c’( h + h’ ) f = c’
So…are they equal ?
Q: Determine if F=ab+a’ is same function as F=a’b’+a’b+ab, by converting each to truth table first
•
•
A
canonical form
is a standard way of writing an equation—a shape or form of equation.
Canonical forms are useful for example in algorithms for logic gates such as logic minimization and checking if boolean expressions are equal.
•
•
One common canonical form is a sum of
minterms
.
Minterms: A minterm is simply a product term
(i.e., a conjunction) containing each input variable appearing
exactly once
, in true or complemented form: eg (for 3 variables A, B,
C): ABC, AB’C’, A’BC, ABC’ but not B’C’
Q: Determine if F(a,b)=ab+a’ is same function as
F(a,b)=a’b’+a’b+ab, by converting first equation to canonical form (second already in canonical form)
F = ab+a’ (already sum of products)
F = ab + a’(b+b’) (expanding term)
F = ab + a’b + a’b’ (SAME  same three terms as other equation)
The canonical form derived from truth table
•
One advantage of the canonical form is that it directly represents the truth table.
Consider the minterm: A’BC
–
This has value 1 iff A=0, B=1 and C=1.
–
So a minterm in the canonical form corresponds to a row in the truth table which has an output of 1
(Returns 1 iff the majority of the inputs is 1)
So X = A’BC + AB’C + ABC’ + ABC
The canonical form derived from eqs.
•
•
•
•
•
The canonical form can also be found from equations by a process known as augmentation .
Consider X = BC + A’BC’
We know that (A+A') = 1 and so we can write
X = (A+A’)BC + A’BC’
X = ABC+A’BC + A’BC’
•
The canonical form is simply a sum of minterms
(ie a disjunction of conjuncts) also known as sum of products (SOP) :
X
1
= ABC + AB’C’ + A’BC
Note that, for example
X
2
= BC + B’ + A’BC is a valid Boolean equation, but is not in canonical form.
Convert R
2 to a canonical form
•
•
•
•
Any boolean expression may be expressed in terms maxterms .
A maxterm is the sum of N distinct literals where each literal occurs
exactly once
(where a minterm is the product of N distinct literals where each literal occurs
exactly once
)
–
Also known as products of sum (POS)
Example:
F= (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)
Note: sum of mintrems also known as sum of products (SOP)
Canonical FormsMinterm/Maxterms
•
For a threevariable expression, the minterms and maxterms are as follows
0
0
1
1
1
Y
0
0
1
1
1
0
0
1
X
0
0
1
0
1
0
1
0
Z
0
1
1
Minterm
X'.Y'.Z'
X'.Y'.Z
X'.Y.Z'
X'.Y.Z
X.Y'.Z'
X.Y'.Z
X.Y.Z'
X.Y.Z
Designation m
0 m
1 m
2 m
3 m
4 m
5 m
6 m
7
Maxterm
X+Y+Z
X+Y+Z'
X+Y'+Z
X+Y'+Z'
X'+Y+Z
X'+Y+Z'
X'+Y'+Z
X'+Y'+Z'
Designation
M
0
M
1
M
2
M
3
M
4
M
5
M
6
M
7
•
•
Mintrem
–
–
F = A’BC’ + A’BC + ABC
F(A,B,C)=
(2,3,7)
Maxterm
–
–
F= (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)
F(x,y,z)=
(0,1,2,4)
Product of maxterms from truth table
•
•
•
•
Now consider complement of a Boolean function i.e., products a 0 in the function and then ORing those terms
F’
1
=x’y’z’+x’y’z+x’yz’+xy’z’=m
0
+m
1
+m
2
+m
4
Now take complement of F’
F
1
1
=(x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)
=M
0
M
1
M
2
M
4
Any Boolean function can be expressed as a product of maxterms (
i
) directly or
(
ii
) complementing SOP.
Try for F
2 function 1
1
1
1
0
0
x
0
0
0
1
0
1
1
0
z
0
1
1
1
0
0
0
1
y
0
1
0
0
1
0
1
0
F
2
1
0
1
1
0
1
0
0
F
1
0
1
1. Express Boolean function F=x+y’z in a sum of mintrms (SOP).
–
Ans:f=x(y+y’)+y’z(x+x’)=….
=x’y’z+xy’z’+xy’z+xyz’+xyz
2. Express F=xy+x’z in a product of maxterms
(POS).
–
Ans: xy+x’z=(xy+x’)(xy+z)=()(x+z)(y+z)=()()(y+z+xx’)
=()()(x+y+z)(x’+y+z)
16 possible Boolean algebraic functions for 2 variables