Logical Operators 1 Boolean AND Operation Truth Table
Logical Operators תירגול 1 - מבנה מחשב
Boolean AND Operation Truth Table Equivalent Gate 0 1 0 0 0 1 : Different notations תירגול 1 - מבנה מחשב 3
Boolean OR Operation Truth Table Equivalent Gate 0 1 0 0 1 1 : Different notations תירגול 1 - מבנה מחשב 4
Boolean NOT Operation Truth Table 0 1 1 0 Equivalent Gate : Different notations תירגול 1 - מבנה מחשב 5
Boolean NAND Operation Equivalent Gate Truth Table 0 1 1 1 1 0 תירגול 1 - מבנה מחשב 6
Boolean NOR Operation Equivalent Gate Truth Table 0 1 0 1 0 0 תירגול 1 - מבנה מחשב 7
Boolean XOR Operation Truth Table Equivalent Gate 0 1 0 0 1 1 1 0 : Different notations תירגול 1 - מבנה מחשב 8
How to implement XOR? n Which is Bet ter? n תירגול 1 - מבנה מחשב 9
Boolean Equalities (1( Rules of Associativity, Commutation. n Other rules : n תירגול 1 - מבנה מחשב 10
Boolean Equalities (2( n Distribution n de. Morgan תירגול 1 - מבנה מחשב 11
Example (1): Simplify the expression Compare number of gates תירגול 1 - מבנה מחשב 12
Example (2): Simplify the expression תירגול 1 - מבנה מחשב 13
Evaluating an Expression (1( n Let’s look at the first expression: ¨ 1 1 1 תירגול 1 - מבנה מחשב 14
Evaluating an Expression (2( n Let’s look at the first expression: ¨ 1 1 =1 תירגול 1 - מבנה מחשב 15
Truth Table 0 1 2 3 4 5 6 7 0 0 1 1 0 1 0 1 1 1 0 0 1 1 0 1 תירגול 1 - מבנה מחשב We get Different Notation for 16
Disjunctive Normal Form 0 1 0 0 0 1 1 1 4 5 7 1 1 1 0 0 1 1 1 תירגול 1 - מבנה מחשב It’s easy to transform a DNF formula to its equivalent gates’ representation 17
Disjunctive Normal Form תירגול 1 - מבנה מחשב 18
Back to the Truth Table 0 1 2 3 4 5 6 7 0 0 1 1 0 1 0 1 1 1 0 0 1 1 0 1 תירגול 1 - מבנה מחשב Can we make the simplification process more simple? Yes, using Karnaugh Maps 19
Karnaugh Maps (1( n We’ll arrange the truth table in a different manner. 00 01 11 10 0 1 תירגול 1 - מבנה מחשב 20
Karnaugh Maps (2( n We’ll arrange the truth table in a different manner. 00 01 11 10 How about The areas? 0 1 תירגול 1 - מבנה מחשב 21
Karnaugh Maps (3( n Step 1: We’ll assign the values in the new table. 00 01 11 10 0 1 1 1 1 0 תירגול 1 - מבנה מחשב 22
Karnaugh Maps (4( n Step 2: We’ll try to catch all the 1’s with the largest, fewest rectangles. 00 01 11 10 0 1 1 1 1 0 תירגול 1 - מבנה מחשב 23
Karnaugh Maps (5( n Step 3: Every rectangle gives us a clause in the simplified formula. 00 01 11 10 0 1 1 1 1 0 תירגול 1 - מבנה מחשב 24
Karnaugh Maps (6( n Back to example 2: ¨ We’ll use a 4 -variable Karnaugh Map: 00 01 11 10 00 0 0 01 0 0 1 1 10 1 1 0 0 תירגול 1 - מבנה מחשב 25
“Don’t Cares” Sometimes not all inputs are possible (can actually happen) in a sub-part of a function designed from logical gates. n So it really doesn’t matter what we’ll write in its truth table at the corresponding line. n תירגול 1 - מבנה מחשב 26
“Don’t Cares” example 0 1 2 3 4 5 6 7 0 0 1 1 0 1 0 1 0 X 0 תירגול 1 - מבנה מחשב Assume a (1, 1, 0) input can’t really occur. We can mark this situation as “Don’t Care” 27
Karnaugh Maps with Don’t Cares n We can choose the Don’t Care location to be considered as 1 or 0, depending what will be more efficient to us. 00 01 11 10 0 1 1 1 0 0 X תירגול 1 - מבנה מחשב What is more Efficient here? 28
Flip-Flops n n What happens if we create a circle in the logic gates diagram? Consider the following diagram: This is a S-R Flip-Flop תירגול 1 - מבנה מחשב 29
S-R Flip-Flop n S-R Flip Flop truth table: 0 0 Save 0 1 0 1 1 0 0 תירגול 1 - מבנה מחשב 30
S-R Flip-Flop With a Clock n n The CPU is timed by the pulses of a clock. Maintaining the FF contents when the clock is between pulses (i. e. outputting 0) using the S-R FF: תירגול 1 - מבנה מחשב 31
D-Flip-Flop (1( n n n On each clock pulse the FF should be meaningful Therefore the R and S lines should be opposite If so do we still need both of them? תירגול 1 - מבנה מחשב 32
D Flip-Flop (2( n D Flip-Flop when the clock is pulsing: 0 0 1 1 1 0 תירגול 1 - מבנה מחשב 33
J-K Flip-Flop (with Clock( n n Back to S-R Flip-Flop… How can we solve the 1 -1 problem? תירגול 1 - מבנה מחשב 34
J-K Flip-Flop (2( n J-K Flip-Flop truth table when clock is pulsing: J K 0 0 0 1 0 1 1 1 Toggle 1 0 0 1 Save 1 0 1 1 0 תירגול 1 - מבנה מחשב Save Toggle 35
T Flip-Flop (Based on J-K( n But since we have the “toggle” attribute, do we really need the rest? תירגול 1 - מבנה מחשב 36
T Flip-Flop (2( n T Flip-Flop when the clock is pulsing: 0 0 1 1 1 0 תירגול 1 - מבנה מחשב 37
- Slides: 37