You are on page 1of 56

1

EEE241
Digital Logic Design
CHAPTER NO. 2
DR. RIAZ HUSSAIN
ASSISTANT PROFESSOR
DEPARTMENT OF ELECTRICAL & COMPUTER ENGINEERING
COMSATS UNIVERSITY ISLAMABAD
Review


Why digital systems are more feasible?

What language computers understand?


2
 The method for converting integer part of a decimal number to another base is ___________________.
 For conversion of fractional part of a decimal number ___________________ is used.
 Which of these can be directly converted to base-2 by grouping bits
 (i) Quinary (ii) Octal (iii) Decimal (iv) Hexadecimal

 What is the significance of complementary number and where do we apply it?


 What is diminished radix complement?
 What is the relationship between diminished radix complement and radix complement?
 What is the quick rule for finding 1’s complement?
 What is the quick rule for finding 2’s complement?
 What are the three notations used for representing signed binary numbers?
 Binary codes (i) BCD, (ii) ASCII (iii) Grey Codes
 What is the purpose of using Parity bit?
 What is a cell?
 What is a register?
 An “n” bit register can store how many different combinations?
 Binary arithmetic and binary logic are the same thing? T/F
 What three gates we have learned? Operator? Truth table? Symbol?
Outline 3
 Introduction to Boolean algebra
 Basicdefinition and axiomatic definition
of Boolean algebra
 Boolean functions
 Canonical form
 Standard form
 Logic operations
 Digital logic gates
 Integrated circuits
Must Reading 4

 Chapter No. 2: Boolean Algebra and Logic Gates


Basic Definitions 5

 Binary Operator:
 “*” is a binary operator if

 “*” is not a binary operator if


Basic Definitions…continued 2 6
1. Closure:
1. A set “S” is closed w.r.t. an operator if
2. Associative Law:

3. Commutative Law:

4. Identity Element:

5. Inverse:

6. Distributive
Basic Definitions…continued 3
7
 Algebraic structure:
 e.g.: Field
A field is a set of elements, together with two
binary operators, each having properties 1
through 5 and both operators combining to
give property 6.
 Example: The set of real numbers, together with
the binary operators “+” and “.” , forms the field of
real numbers. The field of real numbers is the basis
for arithmetic and ordinary algebra.
Basic Definitions…continued 4
8
 The
operators and postulates have the following
meanings:
 The binary operator “+” defines addition.
 The additive identity is 0.
 The additive inverse defines subtraction.
 The binary operator “.” defines multiplication.
 The multiplicative identity is 1.
 Fora ≠ 0, the multiplicative inverse of a = 1/a defines
division (i.e., a . 1/a = 1 ).
 Theonly distributive law applicable is that of “.” over
“+”: a . (b + c) = (a . b) + (a . c)
Axiomatic Definition of Boolean Algebra
9
 Developed by George Bool
 A useful mathematical system for specifying and
transforming logic functions.
 We study Boolean algebra as a foundation for
designing and analyzing digital systems

Boolean algebra is an algebraic structure defined by


a set of elements, B, together with two binary
operators, “+” and “•” , provided that the
following (Huntington) postulates are satisfied:
Axiomatic Definition of Boolean Algebra
1. Closure: …continued 2
10
 (a) The structure is closed with respect to the operator +.
 (b) The structure is closed with respect to the operator • .

2. Identity Element:
 (a) The element 0 is an identity element with respect to +; that is, x + 0 = 0 + x = x.
 (b) The element 1 is an identity element with respect to “.” ; that is, x • 1 = 1 • x = x.

3. Commutative:
 (a) The structure is commutative with respect to +; that is, x + y = y + x.
 (b) The structure is commutative with respect to • ; that is, x • y = y • x.

4. Distributive:
 (a) The operator “•” is distributive over +; that is, x • (y + z) = (x • y) + (x • z).
 (b) The operator + is distributive over • ; that is, x + (y • z) = (x + y) • (x + z).

5. For every element , there exists an element (called the complement


of x) such that
 (a) x + x’ = 1 and
 (b) x • x' = 0.

6. There exist at least two elements , such that x ≠ y.


Comparison of Boolean Algebra with
Arithmetic and Ordinary Algebra 11
1. Associative Law:
 Not included in postulates
 But can be derived for both operators

2. Distributive Law:
 “+” over “•” (i.e., x + (y • z) = (x + y) • (x + z) ) is valid for Boolean algebra, but not for
ordinary algebra.

3. Inverse:
 No additive or multiplicative inverse
 So, no subtraction and no division operations

4. Complement:
 Ordinary algebra does not have complement

5. Undefined set of elements for Boolean algebra:


 However, two valued Boolean algebra, that we are going to use has two elements, 0 and 1
Two-Valued Boolean Algebra
12
Set of two elements: B={0, 1} with rules for two binary operators “+” and “•”
 Operator tables:

x y z=x.y x y z=x+y
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1

x z = x’
0 1
1 0
Two-Valued Boolean Algebra
…continued 2
13
1. Is the structure closed w.r.t.?
a) “+” (P-1(a))
b) “•” (P-1(b))
2. What are the identity elements?
a) “+” (P-2(a))
b) “•” (P-2(b))
3. Does it hold commutative law?
a) “+” (P-3(a))
b) “•” (P-3(b))
4. Verify the distributive law (• over +):
a) x • (y + z) = (x • y) + (x • z) (P-4(a))
b) (+ over •) (P-4(b))
5. Complement:
a) x + x’ = 1 (P-5(a))
b) x • x’ = 0 (P-5(b))
6. Postulate 6 is also satisfied as there are two elements “0” and “1” and 0 ≠ 1. (P-6)
14
Boolean Algebra Theorems
15
 Duality
 The dual of a Boolean algebraic expression is
obtained by interchanging the AND and the OR
operators and replacing the 1’s by 0’s and the 0’s
by 1’s.
 If, x • ( y + z ) = ( x • y ) + ( x • z ), then using
 duality x + ( y • z ) = ( x + y ) • ( x + z )
Duality is important because it doubles the
usefulness of everything about Boolean
algebra and manipulation of logic functions.
Boolean Algebra Theorems…continued 2
16
 Theorem-1(T-1)
 x•x=x x+x=x
 Theorem-2(T-2)
 x•0=0 x+1=1
 Theorem 3: Involution (T-3)
 ( x’ )’ = x

 Theorem 4: Associative & Distributive (T-4)


 ( x • y ) • z = x • ( y • z );
(x+y)+z=x+(y+z)
 x • ( y + z ) = ( x • y ) + ( x • z );
 x+(y•z)=(x+y)•(x+z)
Boolean Algebra Theorems…continued 2
17
 Theorem 5: DeMorgan (T-5)
 ( x • y )’ = x’ + y’ ( x + y )’ = x’ • y’
 (x•y) =x +y (x+y) = x•y

 Theorem 6: Absorption (T-6)


 x•(x+y)=x x+(x•y)=x
18
19
20

The theorems of Boolean algebra can be proven by


means of truth tables.
The truth table for the first DeMorgan’s theorem
21
Theorem 5: DeMorgan (T-5)
( x • y )’ = x’ + y’ ( x + y )’ = x’ • y’
Operator Precedence
22
 Parentheses
( . . . ) • ( . . .)
 NOT
x’ + y
 AND
x+x•y
 OR
Boolean Functions
23
 Boolean Expression
x y z F
Example: F = x + y’ z
 Truth Table
0 0 0 0
All possible combinations 0 0 1 1
of input variables
0 1 0 0
 Logic Circuit
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Boolean Functions…continued 2
24
 Algebraic Manipulation
 Literal:
A single variable within a term that may be complemented or not.
 Use Boolean Algebra to simplify Boolean functions to produce simpler
circuits
Example: Simplify to a minimum number of literals
F = x + x’ y ( 3 Literals)
= x + ( x’ y )
= ( x + x’ ) ( x + y )
=(1)(x+y)=x+y ( 2 Literals)
Distributive law (+ over •)
Algebraic Manipulation

• Designers are motivated to reduce the complexity and 25


number of gates because their effort can significantly
reduce the cost of a circuit.

• Consider, for example, the following Boolean function:

F2 = x’ y’ z + x’y z + x y’
Now consider the possible simplification of the function by
applying some of the identities of Boolean algebra:

= x’z(y’ + y) + xy’

= x’z + xy’
26

EXAMPLE 2.1
Boolean Functions…continued 3
27
 Complement of Functions:
 DeMorgan’s Theorm

 Duality & Literal Complement

A simpler procedure for deriving the complement


The complement of a function may be derived
of a function is to take the dual of the function and
algebraically through
complement each DeMorgan’s theorems.
literal.
The three‐ variable form of the first DeMorgan’s theorem is
derived as follows, from postulates and theorems: 28

These theorems can be generalized as follows:

The generalized form of DeMorgan’s theorems states that the


complement of a function is obtained by interchanging AND and OR
operators and complementing each literal.
Canonical Forms
29
 Minterm A B C Minterm
 Product (AND function)
0 0 0 0 m0
 Contains all variables
 Evaluates to ‘1’ for a 1 0 0 1 m1
specific combination
2 0 1 0 m2
Example
3 0 1 1 m3
A=0 A B C
B=0 (0) • (0) • (0) 4 1 0 0 m4
C=0 5 1 0 1 m5
 Also called standard Product m6
6 1 1 0
7 1 1 1 m7
Canonical Forms…continued 2
30
 Maxterm
A B C Maxterm
 Sum (OR function)
0 0 0 0 M0
 Contains all variables
 Evaluates to ‘0’ for a 1 0 0 1 M1
specific combination
2 0 1 0 M2
Example
3 0 1 1 M3
A=1 A B C
B=1 (1) + (1) + (1) 4 1 0 0 M4
C=1 5 1 0 1 M5
 Also called standard sums
6 1 1 0 M6
7 1 1 1 M7

Boolean functions expressed as a sum of minterms or product


of maxterms are said to be in canonical form .
31
32

A Boolean function can be expressed


algebraically from a given truth table by
forming a minterm for each combination
of the variables that produces a 1 in the
function and then taking the OR of all
those terms.
Canonical Forms…continued 3
33
 Truth Table to Boolean Function
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
A Boolean function can be expressed algebraically from a given truth table
by forming a minterm for each combination of the variables that
produces a 1 in the function and then taking the OR of all those terms.
Canonical Forms…continued 4
 Sum of Minterms 34
A B C F F
0 0 0 0 0 1
1 0 0 1 1 0
2 0 1 0 0 1
3 0 1 1 0 1
4 1 0 0 1 0
 Product of Maxterms
5 1 0 1 1 0
6 1 1 0 0 1
7 1 1 1 1 0

m’j = Mj
Standard Forms
35
 Sum of Product (SOP)
Standard Forms…continued 2
36
 Product of Sum (POS)
Standard Forms…continued 3
37
 Standard form to Canonical form
F = A + B’C
= A(B+B’) + B’C(A+A’)
= AB + AB’ + AB’C +A’B’C
= AB(C+C’) + AB’(C+C’) + AB’C +A’B’C
= ABC + ABC’ + AB’C + AB’C’ + AB’C +A’B’C
= A’B’C + AB’C’ + AB’C + ABC’ + ABC
= m1 + m 4 + m5 + m 6 + m7
F(A,B,C) = Σ(1,4,5,6,7)
OR you can use the truth table for F
Two Level Implementation
38

 Sum of Products (SOP)

 Product of Sums (POS)


Two‐level implementation
39
Three and Two Levels Implementation
40
 Three Levels

 Two Levels

This function is neither in sum‐of‐products


nor in product‐of‐sums form ?
OTHER LOGIC
OPERATIONS
41
Logical Operators
42

 AND x y AND
0 0 0
0 1 0
1 0 0
1 1 1

 NAND (Not AND)


x y NAND
0 0 1
0 1 1
1 0 1
1 1 0
Logical Operators…continued 2
43
x y OR
 OR
0 0 0
0 1 1
1 0 1
1 1 1

 NOR (Not OR)


x y NOR
0 0 1
0 1 0
1 0 0
1 1 0
Logical Operators…continued 3
44
 XOR (Exclusive-OR)
x y XOR
0 0 0
0 1 1
1 0 1
1 1 0

 XNOR (Exclusive-NOR)
(Equivalence) x y XNOR
0 0 1
0 1 0
1 0 0
1 1 1
Logical Operators…continued 4
45

 NOT (Inverter)
x NOT

0 1

1 0

 Buffer x Buffer

0 0

1 1
Positive or Negative Logic
46

 Positive Logic:
 High level for 1

 Negative Logic
 High level for 0
Integrated Circuits
47
 Chip:
 Is a die of a silicon semiconductor crystal
 On which IC is fabricated
 IC has various gates, integrated inside
 Chip is mounted on ceramic or plastic containers
 Connections are welded to external pins
 IC has numeric designation
 Catalogs provide detailed specification
Integrated Circuits…continued 2
48
 Level of Integration:
 SSI:
 Gates fewer than 10
 Limit on number of pins available
 MSI:
 10 – 1000 gates
 Perform elementary digital operation
 LSI:
 1000 – 1000000 (upto a million gates in a package)
 e.g. Processor, memory chips, programmable logic devices
 VLSI:
 Millions of gates in a package
 e.g. Micro-computer chips
Integrated Circuits…continued 3
49
 Digital Logic Families:
 The circuit technology is referred to as a digital logic family.
 Each logic family has its own basic electronic circuit upon
which more complex digital circuits and components are
developed.
 The basic circuits in each technology is a NAND, NOR, or
inverter gate.
 e.g.:
 TTL (Transistor-Transistor Logic)

 ECL (Emiter-Couple Logic)


 MOS (Metal-Oxide Semi Conductor)
 CMOS (Complementary Metal-Oxide Semi Conductor)
Integrated Circuits…continued 4
 Important Terminology: 50
 Fan-out:
 number of standard loads that the output of a typical gate can drive
without impairing its normal operation
 Fan-in:
 number of inputs available in a gate
 Power dissipation
 power consumed by the gate
 Propagation delay:
 average transition delay time for a signal to propagate from input
to output
 Noise Margin
 maximum external noise voltage added to an input signal that does
not cause an undesirable change
Computer Aided Design (CAD)
51
 ICs having submicron geometric features are manufactured
by optically projecting patterns of light onto silicon wafers
 Wafers are coated with photo-resistive material
that either hardens or softens when exposed to
light.
 Removing extraneous photo-resist leaves patterns of exposed
silicon regions.
 Exposed regions are then implanted with dopant atoms to create a
semiconductor material
electrical properties of transistors
logical properties of gates
Computer Aided Design (CAD)
…continued 2 52
 VLSI circuit
 millions of transistor and gates
 Require computer assistance --- CAD
 CAD tools consist of software programs that
support computer‐based representations of circuits
and aid in the development of digital hardware by
automating the design process.
 Electronic design automation (EDA)
 covers all phases of the design of ICs
 entering a schematic
 generation of the database that contains the photomask used to
fabricate the IC
Computer Aided Design (CAD)
…continued 3
53
 Options for physical realization of a digital circuit
 ASIC
 FPGA
 PLD
 Full custom ICs
CAD systems include an editing program for creating and
modifying schematic diagrams on a computer screen. This
process is called schematic capture or schematic entry.
 CAD:
 Helps circuit diagrams drawing
 manages a database
 Model logical behavior
 Verification of timing of the circuit
Computer Aided Design (CAD)
…continued 4 54
 HDL:
 resembles a computer programming language
 oriented to describing digital hardware
 represents logic diagrams and other digital information in
textual form to describe the functionality and structure of a
circuit
 freeinga designer to devote attention to higher level
functional detail, e.g. (1,0 and not transistor level details)
 Two most common HDLs are:
 Verilog and
 VHDL
Boolean Algebra (Cheat Sheet) 55
 Invented by George Boole in 1854
 An algebraic structure defined by a set B = {0, 1}, together with two
binary operators (+ and ·) and a unary operator ( )

1. X+0= X 2. X .1 =X Identity element


3. X+1 =1 4. X .0 =0
5. X+X =X 6. X .X = X Idempotence
7. X+X =1 8. X .X = 0 Complement
9. X=X Involution
10. X+Y =Y+X 11. XY = YX Commutative
12. (X + Y) + Z = X + (Y + Z) 13. (XY) Z = X(Y Z) Associative
14. X(Y + Z) = XY + XZ 15. X + YZ = (X + Y) (X + Z) Distributive
16. X + Y =X .Y 17. X .Y = X + Y DeMorgan’s
Recommended Reading 56

 http://math.stackexchange.com/questions/7717/difference-b
etween-axioms-theorems-postulates-corollaries-and-hypoth
esis
 http://bscshortnote.blogspot.com/2012/11/canonical-forms-f
or-boolean-function.html
 http://www.facstaff.bucknell.edu/mastascu/elessonshtml/Lo
gic/Logic1.html

 Acknowledgement and References:


 Chapter No. 2 Digital Design with verilog By M. Mano and Ciletti
 Slides from Princess Sumaya University, Computer Engineering
Department

You might also like