Professional Documents
Culture Documents
DIGITAL LOGIC:
CHAPTER 4
Complement (Pelengkap)
The inverse of a variable
Indicated by an overbar (Ā) or prime (A’)
If A = 1 , then Ā = 0
Basic laws of BA
Commutative Laws (Hukum Tukar
Tertib)
For addition and multiplication
Associative Laws (Hukum Sekutuan)
For addition and multiplication
Distributive Laws (Hukum Taburan)
Commutative Laws
(Hukum Tukar Tertib)
A+B=B+A
A B
A+B B+A
B A
AB = BA
A B
AB BA
B A
4
Associative Laws (Hukum
Sekutuan)
A + (B + C) = (A + B) + C
A A
A+B
A + (B + C)
B
B
(A + B) + C
B+C
C C
Associative law of addition
A(BC) = (AB)C
A A
A(BC)
B
B
(AB)C
BC
C C
B A
B+C
C B
AB + AC
A(B + C)
A
A
C
6
Rules of Boolean Algebra
7
1 A+0=A
2 A+1=1
3 A 0=0
4 A 1=A
5 A+A=A
6 A+A=1
7 A A=A
8 A A=0
9 A=A
10 A + AB = A
11 A + AB = A + B
12 (A + B)(A + C) = A + BC
Rules of Boolean Algebra:
8
Proof
Rule 1:
A=1 A= 0
X=1 X=0
0 0
X=A+0=A
Rule 2:
A=1 A= 0
X=1 X=1
1 1
X=A+1=1
Rule 3:
A= 1 A= 0
X=0 X=0
0 0
X=A 0=0
Rule 4:
A= 0 A= 1
X=0 X=1
1 1
X=A 1=A
Rule 5:
A= 0 A= 1
X=0 X=1
A= 0 A= 1
X=A+A=A
9
Rule 6:
A= 0 A= 1
X=1 X=1
A= 1 A= 0
X=A+A=1
Rule 7:
A= 0 A= 1
X=0 X=1
A= 0 A= 1
X=A A=A
Rule 8:
A= 1 A= 0
X=0 X=0
A=0 A=1
X=A A=0
Rule 9:
A =0
A =1
A= 1 A=1
A= 0 A=0
A=A
10
Rules 10, 11 and 12 can be proven using
BA laws.
Rule 10:
Refer proof
A + AB = A(1 + B) Factoring (distributive law)
=A.1 Rule 2: (1 + B) = 1 -next slide
=A Rule 4: A . 1 = A
Rule 11:
A + AB = (A + AB) + AB Rule 10: A = A + AB
= (AA + AB) + AB Rule 7: A = AA
= AA + AB + AA + AB Rule 8: adding AA = 0
= (A + A)(A + B) Factoring
= 1 . (A + B) Rule 6: A + A = 1
=A+B Rule 4: drop the 1
Rule 12:
(A + B)(A + C) = AA + AC + AB + BC Distributive law
= A + AC + AB + BC Rule 7: AA = A
= A(1 + C) + AB + BC Factoring (distributive law)
= A . 1 + AB + BC Rule 2: 1 + C = 1
= A(1 + B) + BC Factoring (distributive law)
= A . 1 + BC Rule 2: 1 + B = 1
= A + BC Rule 4: A . 1 = A
11
Proof can also be shown by a truth table.
Rule 10
A B AB A + AB
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
equal
12
DeMorgan’s Theorems
Provides mathematical verification for:
NAND ≡ negative-OR
NOR ≡ negative-AND
X X
XY X+Y
Y Y
NAND Negative-OR
X X
X+Y XY
Y Y
NOR Negative-AND
13
DM theorem 1:
1
The complement of a product of variables is
equal to the sum of the complements of the
variables
XY = X + Y
DM theorem 2:
2
The complement of a sum of variables is
equal to the product of the complements of
the variables
X + Y = XY
14
DeMorgan’s Theorem
15
Application
DeMorgan's Theorems I
XYZ = X + Y + Z
WXYZ = W + X + Y + Z
DeMorgan's Theorem II
X + Y + Z = XYZ
** Note:
W + X + Y + Z = WXYZ
X = AB + C
Y = A + BC
Examples for DeMorgan’s
Theorems
16
1 2 3 4
17
Constructing a Truth Table for a
Logic Circuit
18
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
21
Tips on ‘table-making’:
For n possible combinations, the input part of
the table will register the binary value of 0 to
n-1. (e.g. n = 16; 0 to 15)
24 22 21 20
8 4 2 1
0 0 0 0 (0)
0 0 0 1 (1)
0 0 1 0 (2)
0 0 1 1 (3)
22
Simplification using Boolean
23
Algebra
Simplification:
To reduce an expression to its simplest form
To change a form to a more convenient one
for efficient implementation
We use:- basic laws, rules, theorems of
Boolean algebra
Practice makes perfect
Simplify this expression
AB + A(B + C) + B(B + C)
AB + A(B + C) + B(B + C)
Step 1: Apply distributive law to the red terms
AB + AB + AC + BB + BC
Step 2: Apply rule 7 (BB = B) to the green term
AB + AB + AC + B + BC
Step 3: Apply rule 5 (AB + AB = AB) to the red terms
AB + AC + B + BC
Step 4: Apply rule 10 (B + BC = B) to the green terms
AB + AC + B
Step 5: Apply rule 10 (B + AB = B) to the red terms
24
AC + B
Simplify this expression
ABC + ABC + ABC + ABC + ABC
ABC + ABC + ABC + ABC + ABC
Step 1: Factor BC for the red terms
BC + AB + BC
25
Standard Form of Boolean
Expressions
26
Term 2 : A B = A BC + A BC
= ABC ( D + D ) + A BC ( D + D ) = ABCD + A BC D + ABC D + A BC D
Now we have
ABC + A B + ABC D
= ABCD + A BC D + A BCD + ABC D + ABC D + ABC D + ABC D
30
Binary representation of a
standard product term
A product = 1 only if
ALL variables in the
term is equal to 1. SOP
Remember: product =
multiplication 1.1 = 1 Product1 Product2 Product3
A sum = 1 when one
or all of the variables Var1 Var1 Var1
ABCD = 1.1.1.1 = 1
The term ABCD is equal to 1 when A = 1, B = 0, C = 0, and D = 1
ABCD = 1.0.0.1 = 1.1.1.1 = 1
The term ABCD is equal to 1 when A = 0, B = 0, C = 0, and D = 0
ABCD = 0.0.0.0 = 1.1.1.1 = 1
The SOP expression equals 1 when any or all of the three product
terms is 1.
Product-of-Sums (POS)
Form
POS = when 2 or more sum terms are
multiplied.
(A + B)S1(A + B + C)S2
(A + B + C)S1(C + D + E)S2(B + C + D)S3
Like SOP, POS
can also contain a single variable term
a single overbar cannot extend over more
than 1 variable, but more than 1 variable can
have an overbar.
A+ B+C A+ B+C
33
Domain = a set of variables contained in
an expression
(A + B + C)(A + B + D)(A + B + C + D)
domain = A, B, C, D
35
Convert this Boolean expression to standard POS
form ( A + B + C )( B + C + D)( A + B + C + D)
Domain = A, B, C, D.
What is missing?
Term 1: missing D or D’
Term 2: missing A or A’
Apply
Term
1 : A +rules
B + C 8= and
A + B 12
+ C + D D = ( A + B + C + D)( A + B + C + D)
Term 2 : B + C + D = B + C + D + A A
= ( A + B + C + D)( A + B + C + D)
( A +
B + Cwe
Now )( B +have
C + D)( A + B + C + D)
= ( A + B + C + D)( A + B + C + D)( A + B + C + D)( A + B + C + D)( A + B + C + D)
36
Binary representation of a
standard sum term
A product = 0 only if
one or more of the
sum term is equal to POS
0.
Remember: product = Sum1 Sum2 Sum3
multiplication 1.1 = 1
A sum = 1 when one Var1 Var1 Var1
38
Steps to follow : SOP to
39 POS
Step 1: Evaluate each product term in the
SOP expression i.e. determine the
binary numbers of the product terms.
Step 2: Determine all the binary numbers
not included in Step 1.
Step 3: Write equivalent sum term for
each binary number from Step 2 and
express in POS form.
** Using a similar procedure, to go from
POS to SOP
Convert this SOP exp. to an equivalent
POS exp.
A B C + A B C + A BC + AB C + A B C
40
Boolean Expressions and
41
Truth Tables
Step 1: determine domain and
combinations of binary values input
Step 2: convert expression to Standard
SOP/POS.
Step 3: find the binary values that make
the product = 1 (SOP) or sum = 0 (POS)
Step 4: the remaining combination will be
Equal to 0 (SOP)
Equal to 1 (POS)
Fill in the truth table
Develop a truth table for the standard SOP
expression ABC + ABC + ABC
Domain = A, B, C. combinations = 23 = 8
What binary value makes the product term
= 1? ABC
001 =111=1
ABC INPUTS OUTPUT PRODUCT
100 =111=1 TERM
A B C X
ABC
111 =111=1
0 0 0 0
0 0 1 1 ABC
0 1 0 0
0 1 1 0
1 0 0 1 ABC
Fill the truth table 1 0 1 0
1 1 0 0
1 1 1 1 ABC
42
Develop a truth table for the standard POS
expression (A + B + C)(A + B + C)(A + B +C)(A + B + C)(A + B +C)
Domain = A, B, C. combinations = 23 = 8
What binary value makes the sum term =
0?
(A + B + C)(A + B + C)(A + B +C)(A + B + C)(A + B +C)
0 0 0 0 1 0 0 1 1 1 0 1 1 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0
INPUTS OUTPUT PRODUCT
TERM
A B C X
0 0 0 0 (A + B + C)
Fill the truth table 0 0 1 1
0 1 0 0 (A + B + C)
0 1 1 0 (A + B + C)
1 0 0 1
1 0 1 0 (A + B + C)
1 1 0 0 (A + B + C)
1 1 1 1
43
Determining Standard expressions
from a truth table
Replace each binary number with its
corresponding variable.
SOP = 1→ var. & 0 → var. complement
POS = 0→ var. & 1 → var. complement
SOP POS
1010 ABCD 1001 A+B+C+D
ABCD = 1 0 1 0 A+B+C+D= 1+0+0+1
=1111=1 =0+0+0+0=0
44
Karnaugh Map (K-Map)
45
K-Map is similar to the truth table, but it
presents all of the possible values of input
and output.
This is shown in an array of cells.
K-Maps can be used for expressions with 2,3,4 or
5 variables.
The number of cells in a K-Map = total number of
possible input variable combinations 3 = 23 = 8
Cells that differ by only one variable are adjacent
(bersebelahan)
Cell 010 is adjacent to 000, 011 and 110
Physically, cells that share their walls are
adjacent
In a K-map with 4-variable or more, the top-most
& bottom-most cells of a column (and row) are
adjacent.
C C
0 1 0 1
46 AB AB
00 00 ABC ABC
01 01 ABC ABC
3-Variable Karnaugh Map
11 11 ABC ABC
10 10 ABC ABC
CD CD
00 01 11 10 00 01 11 10
AB AB
00 00 ABCD ABCD ABCD ABCD
01
11 1
10 1
Map the following expression
ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
01 1
ABCD
11 1 1 1
ABCD 10 1 ABCD
ABCD ABCD
49
To use K-maps, expressions must be in
standard form.
For expressions that are not standard, it
must be converted to a standard form.
Recall: AB + ABC
AB(C/C’) 11(1/0) ABC + ABC’
So: ABC + ABC’ + ABC C
AB 0 1
Map the following expression on a K-map:
00 1 1
A + AB + ABC
000 100 110 01 1 1
001 101
11 1
010
011 10 1 1
50
K-Map Simplification of SOP
51
Expressions
There are 3 steps to obtain a minimum
SOP expression from a K-map.
1. Grouping the 1s
2. Determine product term for each
group
3. Summing the resulting product terms
Grouping the 1s
52
C C
AB 0 1 0 1 CD CD
AB AB 00 01 11 10 AB 00 01 11 10
00 1 00 1 1
00 1 1 00 1 1
01 1 01 1
01 1 1 1 1 01 1 1 1
11 1 1 11 1 11 1 1 1
11
10 10 1 1 10 1 1 1
10 1 1
53
Link
www.allaboutcircuits.com/vol_4/chpt_7/5.html
wps.prenhall.com/chet_floyd_digitalfun_10/86/22258/5698226.cw/inde
x.html
54