Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Elementary Digital Logic Apps O/S Arch  Arch Logic Digital Analog.

Similar presentations


Presentation on theme: "CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Elementary Digital Logic Apps O/S Arch  Arch Logic Digital Analog."— Presentation transcript:

1 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Elementary Digital Logic Apps O/S Arch  Arch Logic Digital Analog Devices Physics

2 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Variables and Transistors (Switches) Digital systems use binary logic –Two values: 0 and 1 (or false and true if you like) Transistors are essentially a switch controlled by a single binary variable x A generic symbol for a switch is x0= x1= S x

3 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Switches and Functions logical AND function (series connection) S x1 L Power supply S x2 S x1 Power supplyS x2 logical OR function (parallel connection) L

4 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Switches and Functions (2) Can do more complex logic, too: L(x1,x2,x3) = (x1 + x2) x3 Don’t get the idea that this is the actual physical way it is done –This is just an abstraction S x1 Power supplyS x2 S x3 L

5 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst AND OR NOT (complement, inversion) NAND NOR XOR XNOR Seven Common Logic Primitives

6 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = And(A,B) C = A B or C = A  B or just C = A B Logic Gate Truth table ABC 000 010 100 111 ABAB C And

7 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = Or(A,B) C = A + B or C = A  B Logic Gate Truth table ABC 000 011 101 111 ABAB C Or

8 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = Not(A) C = A Logic Gate Truth table AC 01 10 A C Not

9 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = Nand(A,B) C = (A B) Logic Gate Truth table ABC 001 011 101 110 ABAB C Nand

10 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = Nor(A,B) C = (A + B) Logic Gate Truth table ABC 001 010 100 110 ABAB C Nor

11 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = Xor(A,B) C = A  B Logic Gate Truth table ABC 000 011 101 110 ABAB C Xor

12 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = Xnor(A,B) C = A B Logic Gate Truth table ABC 001 010 100 111 ABAB C Xnor

13 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst How do we make gates? These standard logic gates can be implemented in many technologies: –Relay Switches Huge and extremely power-hungry –Vacuum Tubes Still huge, but much faster – prone to burn-out –“Individually-wrapped” transistors Small and fast –IC packages Good for small circuits –Very Large Scale Integrated circuits (VLSI) –Legos! http://goldfish.ikaruga.co.uk/logic.html

14 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Universal Logic Families: –Any logic function can be designed using one of these sets of gates: {AND, OR, NOT} {NAND} {NOR} –These are called “universal logic families” –Actual synthesized circuits are usually designed using either NAND or NOR gates only Remember Regularity –We’ll use {AND, OR, NOT} since it is easier to do “on paper” Universal Logic Families

15 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Digital Design Process How do you build a digital logic circuit? –Represent all inputs and outputs in binary Create a model / representation for the system –Formalize the design in a truth table or in an algebraic expression Defines the function of the system –Simplify the description  simplify the algebraic expression Ex: X ( X + Y ) = X –Implement the system with available components (gates) Apps O/S Arch  Arch Logic Digital Analog Devices Physics

16 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Using only {AND,OR,NOT} C = AB + AB(Boolean algebra representation) ABC 00 01 10 11 XOR

17 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Identify rows with “1” on output (C = 1) Represent the input for each such row as a “minterm” –a product (logical AND) of the input bits which guarantees that term will be “1” Sum of Products Form SABC 0101 0110 1010 1111

18 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst The “Sum” part comes from OR-ing together all of the minterms Final Equation: C = SAB + SAB Sum of Products Form (2) SABC 0101 0110 1010 1111

19 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Converting Boolean Algebra into Gates C = SA + SB What does this device do? –When S = 0  C = A –When S = 1  C = B A steering device: S steers/switches A or B onto the output C

20 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst C = SA + SB This is a 2x1 MUX “Black box” version is 2 input by 1 bit of data multiplexor (steering device) –2 inputs requires a 1 bit selector S 2x1 MUX (Multiplexor) S B A C 0 1 S B A C 0 1 S B A C 0 1

21 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst MUX Question How many selection bits do we need for a: –4 input mux? 2 bits –8 input mux? 3 bits –6 input mux? 3 bits –N input mux? ceil( log 2 (N))

22 CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Changes in input values are reflected immediately (subject to the speed of light and electrical delays) on the outputs Each gate has an associated “electrical delay” Delays are often ignored for the purpose of the logic design (but not for the real implementation!) As soon as inputs change, the outputs change – no memory of what happened before –(at least conceptually) Combinational Logic


Download ppt "CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Elementary Digital Logic Apps O/S Arch  Arch Logic Digital Analog."

Similar presentations


Ads by Google