chapter 2 boolean algebra (part 2)
DESCRIPTION
This topic introduces the numbering systems: decimal, binary, octal and hexadecimal. The topic covers the conversion between numbering systems, binary arithmetic, one's complement, two's complement, signed number and coding system. This topic also covers the digital logic components.TRANSCRIPT
![Page 1: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/1.jpg)
2.2 PERFORM OPERATION WITH
BOOLEAN ALGEBRA
![Page 2: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/2.jpg)
2.2.1 Define logic gates
• A logic gate performs a logical operation on one or more logic inputs and produces a single logic output and most commonly found at digital circuits.
![Page 3: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/3.jpg)
2.2.2 Explain the operation of logic gates.2.2.3 Draw logic symbols for gates.2.2.4 Construct truth table of logic gates.
![Page 4: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/4.jpg)
AND Gate
• Logic Symbol, Truth Table And Logic Expression
YXZ X
0 0
10
Y
01
11
0
0
0
1
Logic Symbol
Truth Table
Logic Expression
![Page 5: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/5.jpg)
OR Gate
• Logic Symbol, Truth Table And Logic Expression
YXZ X
0 0
10
Y
01
11
0
1
1
1
Logic Symbol
Truth Table
Logic Expression
![Page 6: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/6.jpg)
Inverter/Not Gate• Logic Symbol, Truth Table And Logic
Expression
XZ X
0 1
01
Logic Symbol
Truth Table
Logic Expression
![Page 7: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/7.jpg)
NOR• Logic Symbol, Truth Table And Logic
Expression
YXZ X
0 0
10
Y
01
11
1
0
0
0
YXZ X
YLogic Symbol
Truth Table
Logic Expression
![Page 8: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/8.jpg)
NAND• Logic Symbol, Truth Table And Logic Expression
YXZ X
0 0
10
Y
01
11
1
1
1
0
YXZ X
YLogic Symbol
Truth Table
Logic Expression
![Page 9: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/9.jpg)
XOR• Logic Symbol, Truth Table And Logic Expression
YXZ X
0 0
10
Y
01
11
0
1
1
0
YXZ X
Y
1) Result is ‘1’ when exactly one input is ‘1’2) The output is always 1 when we have a different set of
input
Logic Symbol
Truth Table
Logic Expression
![Page 10: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/10.jpg)
XNOR• Logic Symbol, Truth Table And Logic Expression
YXZ X
0 0
10
Y
01
11
1
0
0
1
YXZ X
Y
Result is ‘1’ when both inputs are the same logic
Logic Symbol
Truth Table
Logic Expression
![Page 11: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/11.jpg)
2.3 Build sequential logic circuit
• Circuits whose outputs depends not only on the present input value but also the past input value are known as sequential logic circuits.
• Are circuits that contain memory element.• Example: flip-flop
2.3.1 Define sequential logic circuit.
![Page 12: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/12.jpg)
2.3.2 Differentiate between combinational logic circuit and sequential logic circuit
• Combinational Logic Circuit –
refers to circuits whose output is strictly depended on the present value of the inputs.
Example: logic gates• Sequential Logic Circuit-
Circuits whose outputs depends not only on the present input value but also the past input value are known as sequential logic circuits.
Example: flip-flop
![Page 13: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/13.jpg)
2.3.3 Describe Flip Flop
• Is a logic circuit that has two stable states or memory where one state is compliment with other state.
• can be divided into common types either synchronous(clock) or asynchronous (no clock):
![Page 14: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/14.jpg)
2.3.4 List the types of flip-flop:
a. SR flip – flop (SR- set reset)
b. Clocked SR flip – flop
c. JK flip – flop
d. T flip flop (Toggle)
e. D flip flop (Delay or Data)
![Page 15: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/15.jpg)
2.3.5 Build SR, JK, T and D flip flop
using logic gates.
2.3.6 Draw the symbol and truth
table of SR, JK, T and D flip –flop.
![Page 16: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/16.jpg)
1.SR FLIP FLOP • Can build from NOR or NAND gate.
From NOR gate From NAND gate
S
R
Q
Q
S
RQ
Q
S R Keluaran (Q)
0 0 Tak logik
0 1 1 (set)
1 0 0(reset)
1 1 Tak ubah
S R Keluaran (Q)
0 0 Tak ubah
0 1 0 (reset)
1 0 1 (set)
1 1 Tak logik
symbol
![Page 17: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/17.jpg)
Con’t
Timing digram for Flip-Flop SR-get NOR Timing digram for Flip-Flop SR-get NAND
S
R
Q
T1 T2 T3 T4 T5 T6
![Page 18: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/18.jpg)
2) CLOCKED SR FLIP FLOP
From NOR gate From NAND gate
Timing diagram for SR flip flop with clock
S
KLOK
R
Q
Q
S
KLOK
R
Q
Q
S
R
klok
Q
keadaan aw
al
set
tak ubah
reset
reset
tak ubah
set
![Page 19: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/19.jpg)
3) JK FLIP FLOP
Truth table
Timing Digram
nQ
J
K
clock
Q
t.ubah set t.ubah toggle reset t.ubah
Klok J K Qn+11 0 0 Qn1 0 1 01 1 0 11 1 1 nQ
symbol
![Page 20: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/20.jpg)
4) T FLIP FLOP
JAM T Qn Qn+1 CATATAN
1 0 0 0 Tak Ubah1 0 1 1 Tak Ubah1 1 1 0 Toggle1 1 0 1 Toggle
JAM T Qn+1
1 0 Qn
1 1 nQ
T
clock
Q
Logic Symbol Logic circuit
Truth table Truth table
Timing diagram
![Page 21: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/21.jpg)
5) D Flip flop
Jam D Qn+1 0 00 11 0 01 1 1
nQ
nQ D Qn+10 01 1
D
clock
Q
Symbol Circuit
Truth table
Timing diagram
![Page 22: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/22.jpg)
COMBINATIONAL LOGIC CIRCUIT
• refers to circuits whose output is strictly depended on the present value of the inputs
• Are made of logic gates with no feedback.• To design combinational logic circuit, we need to
know about basic logic equation :– If sign “+” between two or more variables, it means
all variables using OR gate. For example : A + B + C
– If sign “.” between two or more variables, it means all variables using AND gate operation. For example : A.B.C
![Page 23: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/23.jpg)
Example :• Given logic equation Y = A . B + A . B. Draw the logic
diagram base on the equation.
Solution• the equation has 2 variables A and B.• reference A . B used AND gate and A used NOT gate• reference A . B used AND gate• Finally, both reference used OR gate to form equation of
Y
![Page 24: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/24.jpg)
Boolean Theorem
• Basic Rules
1. A + 0 = A2. A + 1 = 1
5. A . 0 = 0
6. A . 1 = A
3. A + A = A
7. A . A = A
4. A + A = 1
8. A . A = 0
9. A = A=
10. A + AB = A
12. (A + B)(A + C) = A + BC
11. A + AB = A + B
![Page 25: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/25.jpg)
BOOLEAN THEOREMS
XXX
X
XX
XX
XXX
X
X
.7
11.6
0.5
0.4
.3
X1.2
00.1
XZWZXYWYZYXWb
XZXYZYXa
XYZZXYYZX
ZYXZYXZYX
XYYX
XYYX
XX
.13
.13
.12
.11
.10
.9
1.8
AA
YXXY
YXYX
YXYXX
XXYX
.18
.17
.16
.15
.14
![Page 26: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/26.jpg)
Boolean Simplification - Example
• Using Boolean theorem, Simplify the expression:
)()( CBBCBAAB
• Apply distributive law,
BCBBACABAB
• Apply rule 7 (BB = B), and rule 5 (AB + AB = AB)
BACAB
• Apply rule 10 (B + BC = B)
BCBACAB
![Page 27: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/27.jpg)
Boolean Simplification - Example
BACAB
• Apply rule 10 (AB + B = B)
ACB
At this point, the expression is simplified as muchas possible
Original expression is )()( CBBCBAAB Which is logically equal to ACB In terms of design, what is the advantage of Boolean simplification?
![Page 28: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/28.jpg)
Boolean Simplification - Example
Original expression is )()( CBBCBAAB
Which is logically equal to ACB FasterCompact designLower cost
A
BC
A
B
C
![Page 29: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/29.jpg)
DeMorgan’s Theorem
• The complement of a product of variables is equal to the sum of the complemented variables
AB = A + B
A + BA
BAB
A
B
NAND Negative-OR
BAA
0 0
10
B
01
11
1
1
1
0
BA
1
1
1
0
Theorem 1
![Page 30: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/30.jpg)
DeMorgan’s Theorem
BAA
0 0
10
B
01
11
1
0
0
0
BA
1
0
0
0
Theorem 2
ABA
BA + B
A
B
NOR Negative-AND
A + B = A . B
![Page 31: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/31.jpg)
Example 1:• Given Z = A + B . C .Simplified the equation
below using De’ Morgan Theorem.
Solution;
Z = A + B.C
= A . B.C
= A .( B+C)
= A . (B+C)
![Page 32: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/32.jpg)
Example 2:• Given Z = (A + C).(B+D) .Simplified the
equation below using De’ Morgan Theorem.
Solution :
Z = (A + C) . (B + D)
= (A + C) + (B + D)
= (A . C) + (B . D)
= AC + BD
![Page 33: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/33.jpg)
Sum-of-Products
• SOP expressions consist of two or more AND terms (products) that are ORed together
• In SOP an inversion cannot cover more than one variable in a term
Example: • ABC + ABC• A B + A B + A B• A B C + A B C• A B + A B C + C D + C
![Page 34: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/34.jpg)
Product-of-Sums
• POS expressions consist of two or more OR terms (sums) that are ANDed together
• Example: – X = (A + B + C)(A + C)– X = (A + B)(C + D)F– X = ( A + B ) . ( B + C )– X = ( B + C + D ) . ( B C + E )– X = ( A + C ) . ( B + E ). ( C + B )
![Page 35: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/35.jpg)
Karnaugh Map Method
• A graphical method of simplifying logic equations or truth tables.
• Also called a K map.
• Theoretically can be used for any number of input variables, but practically limited to 5 or 6 variables.
![Page 36: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/36.jpg)
Karnaugh Map Method• The truth table values are placed in the K
map. • Adjacent K map square differ in only one
variable both horizontally and vertically.• The pattern from top to bottom and left to
right must be in the form• A SOP expression can be obtained by
ORing all squares that contain a 1.
![Page 37: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/37.jpg)
Karnaugh Map Method
• Looping adjacent groups of 2, 4, or 8 1s will result in further simplification.
• When the largest possible groups have been looped, only the common terms are placed in the final expression.
• Looping may also be wrapped between top, bottom, and sides.
• Looping a pair (or quad or octet and so on) of adjacent 1s in a K map eliminates the variable that appears in complemented and uncomplemented form.
![Page 38: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/38.jpg)
Karnaugh maps and truth tables for (a) two, (b) three, and (c) four variables.
![Page 39: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/39.jpg)
Examples of looping pairs of adjacent 1s.
![Page 40: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/40.jpg)
Examples of looping groups of fours 1s (quads).
![Page 41: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/41.jpg)
Examples of looping groups of eight 1s (octets).
![Page 42: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/42.jpg)
Karnaugh Map Method• Complete K map simplification process
– Construct the K map, place 1s as indicated in the truth table.
– Loop 1s that are not adjacent to any other 1s. (Isolated 1s)
– Loop 1s that are in pairs– Loop 1s in octets even if they have already been looped.– Loop quads that have one or more 1s not already
looped. (Use minimum number of loops)– Loop any pairs necessary to include 1s not already
looped.– Form the OR sum of terms generated by each loop.
![Page 43: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/43.jpg)
Examples :
![Page 44: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/44.jpg)
Example : The same K map with two equally good solutions.
![Page 45: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/45.jpg)
Example :
• Use a K map to simplify:Y = C(ABD + D) + ABC + D
![Page 46: Chapter 2 Boolean Algebra (part 2)](https://reader035.vdocument.in/reader035/viewer/2022062313/558a47c9d8b42a8e368b463c/html5/thumbnails/46.jpg)
SOLUTION :