Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia © UCB Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia inst.eecs.berkeley.edu/~cs61c.

Similar presentations


Presentation on theme: "CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia © UCB Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia inst.eecs.berkeley.edu/~cs61c."— Presentation transcript:

1

2 CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia © UCB Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 22 – Representations of Combinatorial Logic Circuits Sony PSP!   People in the know say this will be bigger than the iPod. It plays video games, videos, music & photos. $250! www.us.playstation.com/consoles.aspx?id=4

3 CS61C L22 Representations of Combinatorial Logic Circuits (2) Garcia © UCB Review… We use feedback to maintain state Register files used to build memories D-FlipFlops used for Register files Clocks usually tied to D-FlipFlop load Setup and Hold times important Pipeline big-delay CL for faster clock Finite State Machines extremely useful You’ll see them again in 150, 152 & 164

4 CS61C L22 Representations of Combinatorial Logic Circuits (3) Garcia © UCB Representations of CL Circuits… Truth Tables Logic Gates Boolean Algebra

5 CS61C L22 Representations of Combinatorial Logic Circuits (4) Garcia © UCB Truth Tables 0

6 CS61C L22 Representations of Combinatorial Logic Circuits (5) Garcia © UCB TT Example #1: 1 iff one (not both) a,b=1 aby 000 011 101 110

7 CS61C L22 Representations of Combinatorial Logic Circuits (6) Garcia © UCB TT Example #2: 2-bit adder How Many Rows?

8 CS61C L22 Representations of Combinatorial Logic Circuits (7) Garcia © UCB TT Example #3: 32-bit unsigned adder How Many Rows?

9 CS61C L22 Representations of Combinatorial Logic Circuits (8) Garcia © UCB TT Example #3: 3-input majority circuit

10 CS61C L22 Representations of Combinatorial Logic Circuits (9) Garcia © UCB Logic Gates (1/2)

11 CS61C L22 Representations of Combinatorial Logic Circuits (10) Garcia © UCB And vs. Or review – Dan’s mnemonic AND Gate C A B SymbolDefinition AN D

12 CS61C L22 Representations of Combinatorial Logic Circuits (11) Garcia © UCB Logic Gates (2/2)

13 CS61C L22 Representations of Combinatorial Logic Circuits (12) Garcia © UCB 2-input gates extend to n-inputs N-input XOR is the only one which isn’t so obvious It’s simple: XOR is a 1 iff the # of 1s at its input is odd 

14 CS61C L22 Representations of Combinatorial Logic Circuits (13) Garcia © UCB Truth Table  Gates (e.g., majority circ.)

15 CS61C L22 Representations of Combinatorial Logic Circuits (14) Garcia © UCB Truth Table  Gates (e.g., FSM circ.) PSInputNSOutput 000 0 1010 0000 011100 0000 101001 or equivalently…

16 CS61C L22 Representations of Combinatorial Logic Circuits (15) Garcia © UCB Boolean Algebra George Boole, 19 th Century mathematician Developed a mathematical system (algebra) involving logic later known as “Boolean Algebra” Primitive functions: AND, OR and NOT The power of BA is there’s a one-to-one correspondence between circuits made up of AND, OR and NOT gates and equations in BA + means OR, means AND, x means NOT

17 CS61C L22 Representations of Combinatorial Logic Circuits (16) Garcia © UCB Boolean Algebra (e.g., for majority fun.) y = a b + a c + b c

18 CS61C L22 Representations of Combinatorial Logic Circuits (17) Garcia © UCB Boolean Algebra (e.g., for FSM) PSInputNSOutput 000 0 1010 0000 011100 0000 101001 or equivalently… y = PS 1 PS 0 INPUT

19 CS61C L22 Representations of Combinatorial Logic Circuits (18) Garcia © UCB BA: Circuit & Algebraic Simplification BA also great for circuit verification Circ X = Circ Y? use BA to prove!

20 CS61C L22 Representations of Combinatorial Logic Circuits (19) Garcia © UCB Laws of Boolean Algebra

21 CS61C L22 Representations of Combinatorial Logic Circuits (20) Garcia © UCB Boolean Algebraic Simplification Example

22 CS61C L22 Representations of Combinatorial Logic Circuits (21) Garcia © UCB Canonical forms (1/2) Sum-of-products (ORs of ANDs)

23 CS61C L22 Representations of Combinatorial Logic Circuits (22) Garcia © UCB Canonical forms (2/2)

24 CS61C L22 Representations of Combinatorial Logic Circuits (23) Garcia © UCB Administrivia Midterm Regrades If you want a regrade… Explain your reasoning in a paragraph on a piece of paper along with the Staple that to the front of your exam Return your exam to your TA We will regrade your entire exam Your score MAY go down

25 CS61C L22 Representations of Combinatorial Logic Circuits (24) Garcia © UCB Peer Instruction A. (a+b) (a+b) = b B. N-input gates can be thought of cascaded 2-input gates. I.e., (a ∆ bc ∆ d ∆ e) = a ∆ (bc ∆ (d ∆ e)) where ∆ is one of AND, OR, XOR, NAND C. You can use NOR(s) with clever wiring to simulate AND, OR, & NOT ABC 1: FFF 2: FFT 3: FTF 4: FTT 5: TFF 6: TFT 7: TTF 8: TTT

26 CS61C L22 Representations of Combinatorial Logic Circuits (25) Garcia © UCB A. (a+b)(a+b) = aa+ab+ba+bb = 0+b(a+a)+b = b+b = b TRUE B. (next slide) C. You can use NOR(s) with clever wiring to simulate AND, OR, & NOT. ° NOR(a,a)= a+a = aa = a ° Using this NOT, can we make a NOR an OR? An And? ° TRUE Peer Instruction Answer A. (a+b) (a+b) = b B. N-input gates can be thought of cascaded 2-input gates. I.e., (a ∆ bc ∆ d ∆ e) = a ∆ (bc ∆ (d ∆ e)) where ∆ is one of AND, OR, XOR, NAND C. You can use NOR(s) with clever wiring to simulate AND, OR, & NOT ABC 1: FFF 2: FFT 3: FTF 4: FTT 5: TFF 6: TFT 7: TTF 8: TTT

27 CS61C L22 Representations of Combinatorial Logic Circuits (26) Garcia © UCB A. B. N-input gates can be thought of cascaded 2-input gates. I.e., (a ∆ bc ∆ d ∆ e) = a ∆ (bc ∆ (d ∆ e)) where ∆ is one of AND, OR, XOR, NAND…FALSE Let’s confirm! CORRECT 3-input XYZ|AND|OR|XOR|NAND 000| 0 |0 | 0 | 1 001| 0 |1 | 1 | 1 010| 0 |1 | 1 | 1 011| 0 |1 | 0 | 1 100| 0 |1 | 1 | 1 101| 0 |1 | 0 | 1 110| 0 |1 | 0 | 1 111| 1 |1 | 1 | 0 CORRECT 2-input YZ|AND|OR|XOR|NAND 00| 0 |0 | 0 | 1 01| 0 |1 | 1 | 1 10| 0 |1 | 1 | 1 11| 1 |1 | 0 | 0 0 0 0 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 1 1 1 1 Peer Instruction Answer (B)

28 CS61C L22 Representations of Combinatorial Logic Circuits (27) Garcia © UCB “And In conclusion…” Use this table and techniques we learned to transform from 1 to another


Download ppt "CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia © UCB Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia inst.eecs.berkeley.edu/~cs61c."

Similar presentations


Ads by Google