CS 61C L13 Combinational Logic (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #13: Combinational.

Slides:



Advertisements
Similar presentations
1 CS/COE0447 Computer Organization & Assembly Language Logic Design.
Advertisements

ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 2: Overview of Computer Organization Partially adapted from Computer Organization and.
CS61C L16 Representations of Combinatorial Logic Circuits (1) Beamer, Summer 2007 © UCB Scott Beamer Instructor inst.eecs.berkeley.edu/~cs61c CS61C :
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L29 Combinational Logic Blocks (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L20 Caches I (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS 61C L14 State (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #14: State and FSMs Andy.
CS 61C L14 Combinational Logic (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #14: Combinational.
CS61C L20 Synchronous Digital Systems (1) Garcia, Spring 2010 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L23 Synchronous Digital Systems (1) Garcia, Fall 2011 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
CS61C L21 State Elements : Circuits that Remember (1) Spring 2007 © UCB 161 Exabytes In 2006  In 2006 we created, captured, and replicated 161 exabytes.
CS61C L20 Synchronous Digital Systems (1) Garcia, Fall 2006 © UCB Blu-ray vs HD-DVD war over?  As you know, there are two different, competing formats.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2008 © UCB 100 MPG Car contest!  The X Prize Foundation has put up two prizes;
CS61C L17 Combinatorial Logic Blocks (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS61C L14 Introduction to Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Eric, Spring 2010 © UCB Cal Alumni Wins 2009 Turing Award! Charles P. Thacker was named.
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L14 Synchronous Digital Systems & State Elements I (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CIS 314 : Computer Organization Lecture 1 – Introduction.
CS 61C L20 Introduction to Synchronous Digital Systems (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks.
CS 61C L21 State Elements: CircuitsThat Remember (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L28 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L20 Synchronous Digital Systems (1) Garcia, Spring 2007 © UCB Disk failures 15x specs!  A recent conference reveals that drives fail in real life.
CS61C L20 Introduction to Synchronous Digital Systems (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L17 Combinational Logic (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17.
CS61C L14 Introduction to Synchronous Digital Systems (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L15 Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 61C L15 State & Blocks (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #15: State 2 and Blocks.
CS61C L25 Representations of Combinational Logic Circuits (1) Garcia, Spring 2013 © UCB Android Brain on Robots!  “Half the weight of some robots is.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Binary Addition CSC 103 September 17, 2007.
CS 61C: Great Ideas in Computer Architecture Lecture 9: Synchronous Digital Systems Instructor: Sagar Karandikar
Logic Design Computer Architecture and Design Lecture 1.
CS61C L23 Synchronous Digital Systems (1) Garcia, Fall 2011 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
CS 61C: Great Ideas in Computer Architecture Synchronous Digital Systems 1 Instructors: John Wawrzynek & Vladimir Stojanovic
CS35101 Computer Architecture Spring 2006 Week 1 Slides adapted from: Mary Jane Irwin ( Course url:
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
CS/COE0447 Computer Organization & Assembly Language
CS 61C L4.1.2 State (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture State and FSMs Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
CS 61C L4.1.1 Combinational Logic (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Logic Gates and Combinational Logic
CS61C L20 Synchronous Digital Systems (1) Beamer, Spring 2008 © UCB Scott Beamer, Guest Lecturer inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
1 Arithmetic Where we've been: –Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: –Implementing the Architecture.
CS 61C: Great Ideas in Computer Architecture Hardware intro, Digital Logic 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: Vladimir Stojanovic and Nicholas Weaver
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
Logic Gates and Boolean Algebra Introduction to Logic II.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
Revisão de Circuitos Lógicos PARTE I. What are “Machine Structures”? Coordination of many levels of abstraction I/O systemProcesso r Compiler Operating.
Morgan Kaufmann Publishers
Senior Lecturer SOE Dan Garcia
Stateless Combinational Logic and State Circuits
There is one handout today at the front and back of the room!
4. Transistors and logic gates
Fundamentals of Computer Science Part i2
CS/COE0447 Computer Organization & Assembly Language
Instructor Paul Pearce
Inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 23 – Representations of Combinatorial Logic Circuits TA/Punner.
en.wikipedia.org/wiki/Conway%27s_Game_of_Life
Digital Logic.
Inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture #8 – State Elements, Combinational Logic Greet class James Tu, TA.
Digital Logic.
TA David “The Punner” Eitan Poll
Lecturer SOE Dan Garcia
Lecturer PSOE Dan Garcia
Instructor: Michael Greenbaum
Presentation transcript:

CS 61C L13 Combinational Logic (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #13: Combinational Logic & Gates Andy Carle

CS 61C L13 Combinational Logic (2) A Carle, Summer 2005 © UCB 61C What are “Machine Structures”? Coordination of many levels of abstraction I/O systemProcessor Compiler Operating System (MacOS X) Application (Netscape) Digital Design Circuit Design Instruction Set Architecture Datapath & Control transistors Memory Hardware Software Assembler We’ll investigate lower abstraction layers! (contract between HW & SW)

CS 61C L13 Combinational Logic (3) A Carle, Summer 2005 © UCB Below the Program High-level language program (in C) swap int v[], int k){ int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } Assembly language program (for MIPS) swap: sll$2, $5, 2 add$2, $4,$2 lw$15, 0($2) lw$16, 4($2) sw$16, 0($2) sw$15, 4($2) jr$31 Machine (object) code (for MIPS) C compilerassembler ?

CS 61C L13 Combinational Logic (4) A Carle, Summer 2005 © UCB Physical Hardware - PowerPC 750

CS 61C L13 Combinational Logic (5) A Carle, Summer 2005 © UCB Digital Design Basics (1/2) Next 3 weeks: we’ll study how a modern processor is built starting with basic logic elements as building blocks. Why study logic design? Understand what processors can do fast and what they can’t do fast (avoid slow things if you want your code to run fast!) Background for more detailed hardware courses (CS 150, CS 152)

CS 61C L13 Combinational Logic (6) A Carle, Summer 2005 © UCB Digital Design Basics (2/2) ISA is very important abstraction layer Contract between HW and SW Can you peek across abstraction? Can you depend “across abstraction”? Voltages are analog, quantized to 0/1 Circuit delays are fact of life Two types Stateless Combinational Logic (&,|,~) State circuits (e.g., registers)

CS 61C L13 Combinational Logic (7) A Carle, Summer 2005 © UCB Outline Truth Tables Transistors Logic Gates Combinational Logic Boolean Algebra

CS 61C L13 Combinational Logic (8) A Carle, Summer 2005 © UCB Truth Tables (1/6) 0

CS 61C L13 Combinational Logic (9) A Carle, Summer 2005 © UCB TT (2/6) Ex #1: 1 iff one (not both) a,b=1 aby

CS 61C L13 Combinational Logic (10) A Carle, Summer 2005 © UCB TT (3/6): Example #2: 2-bit adder

CS 61C L13 Combinational Logic (11) A Carle, Summer 2005 © UCB TT (4/6): Ex #3: 32-bit unsigned adder

CS 61C L13 Combinational Logic (12) A Carle, Summer 2005 © UCB TT (5/6): Conversion: 3-input majority

CS 61C L13 Combinational Logic (13) A Carle, Summer 2005 © UCB TT (6/6): Conversion: 3-input majority

CS 61C L13 Combinational Logic (14) A Carle, Summer 2005 © UCB Transistors (1/3) CMOSFET Transistors: * Physically exist! * Voltages are quantized * Only 2 Types: - P-channel: 0 on gate -> pull up (1) - N-channel: 1 on gate -> pull down (0) * Undriven otherwise. n: p:

CS 61C L13 Combinational Logic (15) A Carle, Summer 2005 © UCB Transistors (2/3) CMOSFET Transistors: * have delay and require power * can be combined to perform logical operations and maintain state. - logical operations will be our starting point for digital design - state tomorrow

CS 61C L13 Combinational Logic (16) A Carle, Summer 2005 © UCB Transistors (3/3): CMOS  Nand ABC

CS 61C L13 Combinational Logic (17) A Carle, Summer 2005 © UCB Logic Gates (1/4) Transistors are too low level Good for measuring performance, power. Bad for logical design / analysis Gates are collections of transistors wired in a certain way Can represent and reason about gates with truth tables and Boolean algebra We will mainly review the concepts of truth tables and Boolean algebra in this class. It is assumed that you’ve seen these before. Section B.2 in the textbook has a review

CS 61C L13 Combinational Logic (18) A Carle, Summer 2005 © UCB Logic Gates (2/4)

CS 61C L13 Combinational Logic (19) A Carle, Summer 2005 © UCB Logic Gates (3/4) AND Gate C A B SymbolDefinition AN D

CS 61C L13 Combinational Logic (20) A Carle, Summer 2005 © UCB Logic Gates (4/4)

CS 61C L13 Combinational Logic (21) A Carle, Summer 2005 © UCB Boolean Algebra (1/7) 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

CS 61C L13 Combinational Logic (22) A Carle, Summer 2005 © UCB BA (2/7): e.g., majority circuit y = a b + a c + b c

CS 61C L13 Combinational Logic (23) A Carle, Summer 2005 © UCB BA (3/7):Laws of Boolean Algebra

CS 61C L13 Combinational Logic (24) A Carle, Summer 2005 © UCB BA (4/7): Circuit & Algebraic Simplification

CS 61C L13 Combinational Logic (25) A Carle, Summer 2005 © UCB BA (5/7): Simplification Example

CS 61C L13 Combinational Logic (26) A Carle, Summer 2005 © UCB BA (6/7): Canonical forms (1/2) Sum-of-products (ORs of ANDs)

CS 61C L13 Combinational Logic (27) A Carle, Summer 2005 © UCB BA (7/7): Canonical forms (2/2)

CS 61C L13 Combinational Logic (28) A Carle, Summer 2005 © UCB Combinational Logic A combinational logic block is one in which the output is a function only of its current input. Combinational logic cannot have memory. Everything we’ve seen so far is CL CL will have delay ( f(transistors) ) -More later.

CS 61C L13 Combinational Logic (29) A Carle, Summer 2005 © UCB Peer Instruction A. (a+b) (a+b) = b B. N-input gates can be thought of as 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

CS 61C L13 Combinational Logic (30) A Carle, Summer 2005 © UCB “And In conclusion…” Use this table and techniques we learned to transform from 1 to another