0% found this document useful (0 votes)
106 views67 pages

Introductory Workshop To 8051 - Lec1,2. DLD Intro

Yes, f1 and f2 are equivalent Boolean functions. They represent the same truth table using different notation - f1 uses minterms and f2 uses maxterms.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
106 views67 pages

Introductory Workshop To 8051 - Lec1,2. DLD Intro

Yes, f1 and f2 are equivalent Boolean functions. They represent the same truth table using different notation - f1 uses minterms and f2 uses maxterms.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 67

Combinational Logic vs Boolean Algebra

a ab
b ab + cd
c e (ab+cd)
d cd
e

Schematic Diagram: Boolean Algebra:


5 primary inputs 5 literals
4 components 4 operators
9 signal nets
12 pins
1
Some Definitions
• Complement: variable with a bar over it
A, B, C
• Literal: variable or its complement
A, A, B, B, C, C
• Implicant: product of literals
ABC, AC, BC
• Minterm: product that includes all input variables
ABC, ABC, ABC
• Maxterm: sum that includes all input variables
(A+B+C), (A+B+C), (A+B+C)

2-<2>
Digital Discipline: Binary Values
• Typically consider only two discrete values:
– 1’s and 0’s
– 1, TRUE, HIGH
– 0, FALSE, LOW
• 1 and 0 can be represented by specific
voltage levels, rotating gears, fluid levels,
etc.
• Digital circuits usually depend on specific
voltage levels to represent 1 and 0
• Bit: Binary digit
1-<3> 3
George Boole, 1815 - 1864
• Born to working class parents
• Taught himself mathematics and
joined the faculty of Queen’s
College in Ireland.
• Wrote An Investigation of the Laws
of Thought (1854)
• Introduced binary variables
• Introduced the three fundamental
logic operations: AND, OR, and
NOT.

1-<4>
Boolean Algebra
• Set of axioms and theorems to simplify Boolean
equations
• Like regular algebra, but in some cases simpler
because variables can have only two values (1 or 0)
• Axioms and theorems obey the principles of
duality:
– ANDs and ORs interchanged, 0’s and 1’s interchanged

1-<5>
Boolean Axioms

1-<6>
Boolean Theorems

1-<7>
T1: Identity Theorem
• B 1=
• B+0=

1-<8>
T1: Identity Theorem
• B 1=B
• B+0=B

B
1 = B

B
0 = B

1-<9>
T2: Null Element Theorem
• B 0=
• B+1=

1-<10>
T2: Null Element Theorem
• B 0=0
• B+1=1

B
0 = 0

B
1 = 1

1-<11>
T3: Idempotency Theorem

• B B=
• B+B=

1-<12>
T3: Idempotency Theorem
• B B=B
• B+B=B

B
B = B

B
B = B

1-<13>
T4: Identity Theorem

• B=

1-<14>
T4: Identity Theorem
• B=B

B = B

1-<15>
T5: Complement Theorem
• B B=
• B+B=

1-<16>
T5: Complement Theorem
• B B=0
• B+B=1

B
B = 0

B
B = 1

1-<17>
Boolean Theorems: Summary

1-<18>
Review of Boolean algebra and switching functions

AND, OR, NOT


AND A B C OR AB C NOT A C
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1

A A
1 A 1 1

A A
0 0 A
0

0 dominates in AND 1 dominates in OR


19
Boolean Theorems of Several
Variables

1-<20>
1. Identity A* 1 =A A+1= 1
A*0= 0 A+ 0 =A

2. Complement A + A’ = 1 A * A’ = 0

T8. Distributivity Law


A
A(B+C) = AB + AC A B
B
A
C C

A+BC = (A+B)(A+C) A
A B
B A
C
C
21
T7. Associativity

(A+B) + C = A + (B+C) C A
A B
B C

(AB)C = A(BC) C A
A B
B C

T12. DeMorgan’s Law (A+B)’ = A’B’ (AB)’ = A’ + B’

T11. AC + AB + BC’ = AC + BC’

22
Simplifying Boolean Expressions:
Example 1
• Y = AB + AB

1-<23>
Simplifying Boolean Expressions:
Example 1
• Y = AB + AB
= B(A + A) T8
= B(1) T5’
=B T1

1-<24>
Simplifying Boolean Expressions:
Example 2
• Y = A(AB + ABC)

1-<25>
Simplifying Boolean Expressions:
Example 2
• Y = A(AB + ABC)
= A(AB(1 + C)) T8
= A(AB(1)) T2’
= A(AB) T1
= (AA)B T7
= AB T3

1-<26>
DeMorgan’s Theorem

• Y = AB = A + B A
B
Y

A
Y
B

A
Y
B

• Y=A+B=A B A
B
Y

1-<27>
Bubble Pushing
• Pushing bubbles backward (from the output) or
forward (from the inputs) changes the body of
the gate from AND to OR or vice versa.
• Pushing a bubble from the output back to the
inputs puts bubbles on all gate inputs.

A A
Y Y
B B

• Pushing bubbles on all gate inputs forward


toward the output puts a bubble on the output
and changes the gate body.
A A
Y Y
B B
1-<28>
Part I. Combinational Logic

I) Specification
– a. Language
– b. Truth Table
– c. Boolean Algebra
– d. Incompletely Specified Function

29
Binary Addition (I’ll explain this again, don’t
worry)
5
+ 7
12
Carry Sum

1 1 1 Carry bits
1 0 1 5
+ 1 1 1 7
1 1 0 0 12
Carryout Sums

30
Half Adder

Truth Table
a
a b carry sum

Sum 0 0 0 0
0 1 0 1
b 1 0 0 1
Carry 1 1 1 0

31
Switching Function
Sum (a,b) = a’b + ab’

Ex:
Sum (0,0) = 0’0 + 0*0’ = 0 + 0 = 0
Sum (0,1) = 0’1 + 0*1’ = 1 + 0 = 1
Sum (1,1) = 1’1 + 1*1’ = 0 + 0 = 0

Carry (a, b) = a*b


a
a
sum carry
b
b

32
Full Adder
Truth Table

Cin Id a b cin carry sum


0 0 0 0 0 0
a 1 0 0 1 0 1
2 0 1 0 0 1
Sum 3 0 1 1 1 0
4 1 0 0 0 1
b
5 1 0 1 1 0
Carry 6 1 1 0 1 0
7 1 1 1 1 1

33
Minterm and Maxterm (google these.
Important concept)
Id a b cin carryout
0 0 0 0 0 a+b+c
1 0 0 1 0 a+b+c’
2 0 1 0 0 a+b’+c
3 0 1 1 1 a’ b c
4 1 0 0 0 a’+b+c
5 1 0 1 1 a b’c
6 1 1 0 1 a b c’
maxterm
7 1 1 1 1 abc

minterm

34
Minterms
f1(a,b,c) = a’bc + ab’c + abc’ + abc

a’bc = 1 iff (a,b,c,) = (0,1,1)


ab’c = 1 iff (a,b,c,) = (1,0,1)
abc’ = 1 iff (a,b,c,) = (1,1,0)
abc = 1 iff (a,b,c,) = (1,1,1)

f1(a,b,c) = 1 iff (a,b,c) = (0,1,1), (1,0,1), (1,1,0), or (1,1,1)

Ex: f1(1,0,1) = 1’01 + 10’1 + 101’ + 101 = 1


f1(1,0,0) = 1’00 + 10’0 + 100’ + 100 = 0

35
Maxterms
f2(a,b,c) = (a+b+c)(a+b+c’)(a+b’+c)(a’+b’+c)

a + b + c = 0 iff (a,b,c,) = (0,0,0)


a + b + c’ = 0 iff (a,b,c,) = (0,0,1)
a + b’ + c = 0 iff (a,b,c,) = (0,1,0)
a’ + b + c = 0 iff (a,b,c,) = (1,0,0)

f2(a,b,c) = 0 iff (a,b,c) = (0,0,0), (0,0,1), (0,1,0), (1,0,0)

Ex: f2(1,0,1) = (1+0+1)(1+0+1’)(1+0’+1)(1’+0+1) = 1


f2(0,1,0) = (0+1+0)(0+1+0’)(0+1’+0)(0’+1+0) = 0

36
f1(a,b,c) = a’bc + ab’c + abc’ + abc
f2(a,b,c) = (a+b+c)(a+b+c’)(a+b’+c)(a’+b’+c)
f1(a, b, c) = m3 + m5 + m6 + m7 = Sm(3,5,6,7)
f2(a, b, c) = M0M1M2M4 = PM(0, 1, 2, 4)

Question: Does f1 = f2?


Yes! Prove using Boolean algebra.

37
Minterm 4 = ab’c’

Id a b cin carry minterm 4 = ab’c’


0 0 0 0 0 0
1 0 0 1 0 0
2 0 1 0 0 0
3 0 1 1 1 0
4 1 0 0 0 1
5 1 0 1 1 0
6 1 1 0 1 0
7 1 1 1 1 0

Only one row has a 1.


38
Maxterm 4 = a’+b+c

Id a b cin carry maxterm 4 = a+b+c


0 0 0 0 0 1
1 0 0 1 0 1
2 0 1 0 0 1
3 0 1 1 1 1
4 1 0 0 0 0
5 1 0 1 1 1
6 1 1 0 1 1
7 1 1 1 1 1

Only one row has a 0.


39
Don’t care values

Certain situations arise when we are concerned with only


a limited set of input combinations. The outputs to the rest
Input combinations are marked by “x”. This means that we
don’t care whether these outputs are 1 or 0, because we don’t
have any concern with them. These don’t care terms are
actually a blessing in disguise because while making
K-maps, they greatly reduce the circuitry

40
Incompletely Specified Function
Don’t care set is important because it allows us to
minimize the function
Id a b f (a, b)
1) The input does not
0 0 0 1 happen.
1 0 1 0
2 1 0 1 2) The input happens, but
3 1 1 - the output is ignored.

Examples:
-Decimal number 0… 9 uses 4 bits. (1,1,1,1) does not happen.
-Final carry out bit (output is ignored).

41
Incompletely Specified Function

g1(a,b,c) canonical form


Id a b c g(a,b,c)
w/ minterms
0 0 0 0 0
1 0 0 1 1 g2(a,b,c) canonical form
2 0 1 0 - w/ maxterms
3 0 1 1 1 Does g1(a,b,c) = g2(a,b,c)?
4 1 0 0 1
5 1 0 1 -
No! Because there is a group of
6 1 1 0 0 Don’t Care set. (g1 only covers
7 1 1 1 1
the onset, g2 only covers the
offset).

42
Definitions

Literals xi or xi’

Product Term x2x1’x0

Sum Term x2 + x1’ + x0

Minterm of n variables: A product of n variables


in which every variable appears exactly once.

43
Implementation
Specification  Schematic Diagram
Net list,
Switching expression
Obj min cost  Search in solution space
(max performance)

Cost: wires, gates  Literals, product terms,


sum terms

We want to minimize # of terms, # of literals

44
Implementation (Optimization)
Karnaugh map – 2D truth table

ID A B f(A,B) minterm

0 0 0 0

1 0 1 1 A’B

2 1 0 1 AB’

3 1 1 1 AB

45
Function can be represented by sum of minterms:
f(A,B) = A’B+AB’+AB
This is not optimal however!
We want to minimize the number of literals and terms.
We factor out common terms –

A’B+AB’+AB= A’B+AB’+AB+AB
=(A’+A)B+A(B’+B)=B+A

f(A,B) = A+B

46
On the K-map however:
A=0 A= 1
AB’
0 2
B=0 0 1
1 3
B=1 1 1

A’B AB

f(A,B) = A + B
47
Another Example
ID A B f(A,B) minterm

0 0 0 0

1 0 1 1 A’B

2 1 0 0

3 1 1 1 AB

f(A,B)=A’B+AB=(A’+A)B=B
48
On the K-map:
A=0 A= 1
0 2
B= 0 0 0
1 3
B=1 1 1

A’B AB

f(A,B)=B

49
Using Maxterms
ID A B f(A,B) Maxterm

0 0 0 0 A+B

1 0 1 1

2 1 0 0 A’+B

3 1 1 1

f(A,B)=(A+B)(A’+B)=(AA’)+B=0+B=B
50
Two variable K-maps

Id a b f (a, b)
0 0 0 f (0, 0)
1 0 1 f (0, 1)
2 1 0 f (1, 0)
3 1 1 f (1, 1)

2 variables means we have 22 entries and thus we have


2 to the 22 possible functions for 2 bits, which is 16.

a
f(a,b)
b
51
Two-Input Logic Gates

AND OR
A A
Y Y
B B

Y = AB Y=A+B

A B Y A B 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

52
More Two-Input Logic Gates

XOR NAND NOR XNOR


A A A A
Y Y Y Y
B B B B

Y=A+B Y = AB Y=A+B Y=A+B

A B Y A B Y A B Y A B Y
0 0 0 0 0 1 0 0 1 0 0 1
0 1 1 0 1 1 0 1 0 0 1 0
1 0 1 1 0 1 1 0 0 1 0 0
1 1 0 1 1 0 1 1 0 1 1 1

53
Three variables K-maps

Id a b c f (a,b,c)
0 0 0 0 1
1 0 0 1 0
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1
5 1 0 1 0
6 1 1 0 1
7 1 1 1 0

54
Corresponding K-map

Gray code b=1


(0,0) (0,1) (1,1) (1,0)
0 2 6 4
c=0 1 1 1 1
1 3 7 5
c=1 0 0 0 0

a=1

f(a,b,c) = c’

55
Karnaugh Maps (K-Maps)
• Boolean expressions can be minimized by combining
terms
• K-maps minimize equations graphically
• PA + PA = P
A B C Y Y Y
AB AB
0 0 0 1
00 01 11 10 C 00 01 11 10
0 0 1 1 C
0 1 0 0
0 1 1 0 0 1 0 0 0 0 ABC ABC ABC ABC
1 0 0 0
1 0 1 0
1 1 0 0 1 1 0 0 0 1 ABC ABC ABC ABC
1 1 1 0

56
K-map
• Circle 1’s in adjacent squares
• In the Boolean expression, include only the
literals whose true

Y
A B C Y AB
0 0 0 1 00 01 11 10
C
0 0 1 1
0 1 0 0 0 1 0 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0 1 1 0 0 0
1 1 1 0

y(A,B)=A’B’
57
Another 3-Input example

Id a b c f (a,b,c)
0 0 0 0 0
1 0 0 1 0
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 -
7 1 1 1 1

58
Corresponding K-map

b=1
(0,0) (0,1) (1,1) (1,0)
0 2 6 4
c=0 0 1 - 1
1 3 7 5
c=1 0 0 1 1

a=1

f(a,b,c) = a + bc’

59
Yet another example

Id a b c f (a,b,c,d)
0 0 0 0 1
1 0 0 1 1
2 0 1 0 -
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 0
7 1 1 1 0

60
Corresponding K-map

b=1
(0,0) (0,1) (1,1) (1,0)
0 2 6 4
c=0 1 - 0 1
1 3 7 5
c=1 1 0 0 1

a=1

f(a,b,c) = b’

61
4-input K-map

A B C D Y Y
0 0 0 0 1 AB
0 0 0 1 0 CD 00 01 11 10
0 0 1 0 1
0 0 1 1 1 00
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1 01
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1 11
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0 10
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0

62
4-input K-map

A B C D Y Y
0 0 0 0 1 AB
0 0 0 1 0 CD 00 01 11 10
0 0 1 0 1
0 0 1 1 1 00 1 0 0 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1 01 0 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1 11 1 1 0 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0 10 1 1 0 1
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0

63
4-input K-map

A B C D Y Y
0 0 0 0 1 AB
0 0 0 1 0 CD 00 01 11 10
0 0 1 0 1
0 0 1 1 1 00 1 0 0 1
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1 01 0 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1 11 1 1 0 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0 10 1 1 0 1
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0 Y = AC + ABD + ABC + BD

64
K-maps with Don’t Cares

A B C D Y Y
0 0 0 0 1 AB
0 0 0 1 0 CD 00 01 11 10
0 0 1 0 1
0 0 1 1 1 00
0 1 0 0 0
0 1 0 1 X
0 1 1 0 1 01
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1 11
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X 10
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X

65
K-maps with Don’t Cares

A B C D Y Y
0 0 0 0 1 AB
0 0 0 1 0 CD 00 01 11 10
0 0 1 0 1
0 0 1 1 1 00 1 0 X 1
0 1 0 0 0
0 1 0 1 X
0 1 1 0 1 01 0 X X 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1 11 1 1 X X
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X 10 1 1 X X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X

66
K-maps with Don’t Cares

A B C D Y Y
0 0 0 0 1 AB
0 0 0 1 0 CD 00 01 11 10
0 0 1 0 1
0 0 1 1 1 00 1 0 X 1
0 1 0 0 0
0 1 0 1 X
0 1 1 0 1 01 0 X X 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1 11 1 1 X X
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X 10 1 1 X X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X Y = A + BD + C

67

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy