Computer Architecture Lecture 3 Combinational Circuits Ralph Grishman September 2015 NYU.

Slides:



Advertisements
Similar presentations
ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Advertisements

Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 7 Arithmetic Logic Unit February 19,
Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C.6.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Arithmetic See: P&H Chapter 3.1-3, C.5-6.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
CSE-221 Digital Logic Design (DLD)
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
30 September 2004Comp 120 Fall September 2004 Chapter 4 – Logic Gates Read in Chapter 4 pages , , section 4.8 through top of page.
Modern VLSI Design 2e: Chapter 6 Copyright  1998 Prentice Hall PTR Topics n Shifters. n Adders and ALUs.
Lecture 8 Arithmetic Logic Circuits
1 COMP541 Arithmetic Circuits Montek Singh Mar 20, 2007.
Computer ArchitectureFall 2008 © August 20 th, Introduction to Computer Architecture Lecture 2 – Digital Logic Design.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
ENGIN112 L14: Binary Adder Subtractor October 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 14 Binary Adders and Subtractors.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
 Arithmetic circuit  Addition  Subtraction  Division  Multiplication.
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Basic Arithmetic (adding and subtracting)
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
CS1Q Computer Systems Lecture 9 Simon Gay. Lecture 9CS1Q Computer Systems - Simon Gay2 Addition We want to be able to do arithmetic on computers and therefore.
Using building blocks to make bigger circuits
Digital Arithmetic and Arithmetic Circuits
Power Point Presentation Donald Bearden CS 147 September 13, 2001.
Chapter 6-1 ALU, Adder and Subtractor
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
Basic Arithmetic (adding and subtracting)
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
Computer Architecture Lecture 2 Combinational Circuits Ralph Grishman September 2015 NYU.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
Computer Architecture Lecture 4 Sequential Circuits Ralph Grishman September 2015 NYU.
FPGA-Based System Design: Chapter 4 Copyright  2003 Prentice Hall PTR Topics n Number representation. n Shifters. n Adders and ALUs.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
Binary Adder DesignSpring Binary Adders. Binary Adder DesignSpring n-bit Addition –Ripple Carry Adder –Conditional Sum Adder –(Carry Lookahead.
Logic and computers 2/6/12. Binary Arithmetic /6/ Only two digits: the bits 0 and 1 (Think: 0 = F, 1.
COMP541 Arithmetic Circuits
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
COMP541 Arithmetic Circuits
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
Computer Architecture Mid-term review Ralph Grishman Oct NYU.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
1 IKI20210 Pengantar Organisasi Komputer Kuliah No. 23: Aritmatika 18 Desember 2002 Bobby Nazief Johny Moningka
Computer Architecture Lecture 9 MIPS ALU and Data Paths Ralph Grishman Oct NYU.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Addition, Subtraction, Logic Operations and ALU Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
Number Representation (Part 2) Computer Architecture (Fall 2006)
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
How does a Computer Add ? Logic Gates within chips: AND Gate A B Output OR Gate A B Output A B A B
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Combinational Circuits
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
King Fahd University of Petroleum and Minerals
COMS 361 Computer Organization
Combinational Circuits
Presentation transcript:

Computer Architecture Lecture 3 Combinational Circuits Ralph Grishman September 2015 NYU

Time and Frequency time = 1 / frequency frequency = 1 / time units of time millisecond = second microsecond = second nanosecond = second picosecond = second units of frequency kiloHertz (kHz) = 10 3 cycles / second megaHertz (MHz) = 10 6 cycles / second gigaHertz (GHz) = 10 9 cycles / second 9/14/15Computer Architecture lecture 32

Today’s Problem A typical clock frequency for current PCs is 2 GHz. What is the corresponding clock period? (a) 200 ps (b) 500 ps (c) 2 ns (d) 5 ns 9/14/15Computer Architecture lecture 33

Solution Frequency = 2 GHz = 2 * 10 9 Hz Period = 1 / frequency = 1 / (2 * 10 9 ) sec = (1 / 2) * (1 / 10 9 ) sec = 0.5 * sec = 0.5 ns = 500 * sec = 500 ps 9/14/15Computer Architecture lecture 34

Assignment #1 various short questions about combinational circuits 9/14/15Computer Architecture lecture 35

Design tools see lecture outline 9/14/15Computer Architecture lecture 36

Propagation Delay delay of individual transistor -- how fast it can switch -- determined by physical factors (e.g., size) speed of transistor determines speed of gate 9/14/15Computer Architecture lecture 37 time voltage in out

Propagation Delay the propagation delay (speed) of a combinatorial circuit is the length of time from the moment when all input signals are stable until the moment when all outputs have stabilized 9/14/15Computer Architecture lecture 38

Propagation Delay propagation delay of a combinatorial circuit can be determined as longest path (in number of gates) from any input to any output delay=2 9/14/15Computer Architecture lecture 39

A Very Rough Estimate After transistor switches, it has to charge output wires – this may be a large part of total delay – so assuming all gate delays are the same produces a very rough estimate of circuit delays – but is good enough for understanding principles of circuit design so we will make that assumption in this course 9/14/15Computer Architecture lecture 310

Fan-in sum-of-products form suggests any combinatorial function can be computed in 3 gate delays (one delay for inverters, one for ANDs, one for OR) 9/14/15Computer Architecture lecture 311

Fan-in but gates are limited in their fan-in (number of inputs a gate has) 9/14/15Computer Architecture lecture 312

Fan-in for example, if fan-in is f, it takes log (base f) n gate delays to OR or AND together n inputs log 2 8 = 3 gate delays 9/14/15Computer Architecture lecture 313

Adders The simplest case: adding two one-bit numbers Sum = A xor B Carry = A and B 9/14/15Computer Architecture lecture 314 ABSumCarr y

n-bit Adder adding multi-bit numbers: – have to keep track of a carry out of one bit position and into the next position to the left /14/15Computer Architecture lecture 315

n-bit Adder Do this with full adders, which have 3 inputs: A, B, and C in, and 2 outputs, Sum and C out. 9/14/15Computer Architecture lecture 316 ABCinSumCout

Full Adder We will show the connections of the full adder as follows: 9/14/15Computer Architecture lecture 317 A Sum Cout B Cin

n-bit Adder Then we can draw a 3-bit adder like so: 9/14/15Computer Architecture lecture 318 Cout Cin A2 B2 A1 B1 A0 B0 Sum0 Sum2 Sum1

n-bit adder: delay ripple-carry adder: carry ripples from bit 0 to high-order bit total delay (for large n) = n * delay(Cin  Cout) 9/14/15Computer Architecture lecture 319

Signed Numbers So far we assumed the bits represent positivve numbers: 9/14/15Computer Architecture lecture

Signed Numbers We could use some of the bit patterns to represent negative numbers, like so: 9/14/15Computer Architecture lecture sign and magnitude

Signed Numbers Or like so: 9/14/15Computer Architecture lecture two’s complement

Signed Numbers Or even like so: 9/14/15Computer Architecture lecture

Why do we prefer two’s complement? 9/14/15Computer Architecture lecture 324

Why do we prefer two’s complement? Can use same logic as for unsigned addition 9/14/15Computer Architecture lecture 325

Computing two’s complement Given representation of v, how to compute representation of –v ? 9/14/15Computer Architecture lecture 326

Computing two’s complement Given representation of v, how to compute representation of –v: flip every bit in representation of v add 1 9/14/15Computer Architecture lecture 327

Computing two’s complement 9/14/15Computer Architecture lecture 328 Cout Cin Acomp0 Acomp2 Acomp1 A2 A1 A0

Subtracting B – A = B + (-A) 9/14/15Computer Architecture lecture 329 Cout Cin Acomp0 Acomp2 Acomp1 A2 A1 A0 B2 B1 B0

Can we simplify this? 9/14/15Computer Architecture lecture 330

Subtracting: B – A = B + (-A) 9/14/15Computer Architecture lecture 331 Cout Cin B2 B1 B0 (A-B)0 (A-B)2 (A-B)1 A2 A1 A0 1