CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.

Slides:



Advertisements
Similar presentations
1 Integer Multipliers. 2 Multipliers A must have circuit in most DSP applications A variety of multipliers exists that can be chosen based on their performance.
Advertisements

ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Using Carry-Save Adders For Radix- 4, Can Be Used to Generate 3a – No Booth’s Slight Delay Penalty from CSA – 3 Gates.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 2.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 6.
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
Copyright 2008 Koren ECE666/Koren Part.6b.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
EECS Components and Design Techniques for Digital Systems Lec 18 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 4.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 10 Thursday 02/19/02.
VLSI Design Spring03 UCSC By Prof Scott Wakefield Final Project By Shaoming Ding Jun Hu
Chapter 6 Arithmetic. Addition Carry in Carry out
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions.
CSE 246: Computer Arithmetic Algorithms and Hardware Design
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 1.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 10 Floating Point Number Rounding, Polynomial.
What You Have Always Wanted to Know about FP Hardware Implementation (But Were Afraid to Ask) Acknowledgements: Based on Prof. Shaaban lecture notes, Prof.
Contemporary Logic Design Arithmetic Circuits © R.H. Katz Lecture #24: Arithmetic Circuits -1 Arithmetic Circuits (Part II) Randy H. Katz University of.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 9.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2005 Lecture 1: Numbers.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 4.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 8: Division.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 1: Introduction and Numbers.
Copyright 2008 Koren ECE666/Koren Part.6a.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Prof Chung-Kuan Cheng Lecture 3.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 8.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 7.
Multiplication.
Multiplication CPSC 252 Computer Organization Ellen Walker, Hiram College.
Aug Shift Operations Source: David Harris. Aug Shifter Implementation Regular layout, can be compact, use transmission gates to avoid threshold.
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
ECE 645 – Computer Arithmetic Lecture 7: Tree and Array Multipliers ECE 645—Computer Arithmetic 3/18/08.
Reconfigurable Computing - Multipliers: Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on.
Sequential Multipliers Lecture 9. Required Reading Chapter 9, Basic Multiplication Scheme Chapter 10, High-Radix Multipliers Chapter 12.3, Bit-Serial.
Multi-operand Addition
Full Tree Multipliers All k PPs Produced Simultaneously Input to k-input Multioperand Tree Multiples of a (Binary, High-Radix or Recoded) Formed at Top.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 7 Division.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
Multioperand Addition
CSE 8351 Computer Arithmetic Fall 2005 Instructors: Peter-Michael Seidel.
Application of Addition Algorithms Joe Cavallaro.
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
UNIT 2. ADDITION & SUBTRACTION OF SIGNED NUMBERS.
Reconfigurable Computing - Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
Full Adder Truth Table Conjugate Symmetry A B C CARRY SUM
Tree and Array Multipliers Lecture 8. Required Reading Chapter 11, Tree and Array Multipliers Chapter 12.5, The special case of squaring Note errata at:
Morgan Kaufmann Publishers
Sequential Multipliers
Multipliers Multipliers play an important role in today’s digital signal processing and various other applications. The common multiplication method is.
CprE 583 – Reconfigurable Computing
Chap. 8 Datapath Units: Multiplier Design
Radix 2 Sequential Multipliers
Lecture 5 Multiplication and Division
Unsigned Multiplication
Computer Organization and Design
CPU Design & Computer Arithmetic
Instructor: Prof. Chung-Kuan Cheng
Multiprocessor & Multicomputer
Topics Multipliers..
CSE 140 Lecture 14 Standard Combinational Modules
UNIVERSITY OF MASSACHUSETTS Dept
Booth's Algorithm for 2's Complement Multiplication
UNIVERSITY OF MASSACHUSETTS Dept
UNIVERSITY OF MASSACHUSETTS Dept
Lecture 9 Digital VLSI System Design Laboratory
Sequential Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Booth Recoding: Advantages and Disadvantages
UNIVERSITY OF MASSACHUSETTS Dept
Presentation transcript:

CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5

CSE 2462 Topics: False Path: Cycles Multi-Operands Addition  Carry Save Addition Multiplication  2 ’ s Complement  Booth Recoding

CSE 2463 False Path: Cycles  Cycles of False Paths: Eg. 1 ’ s complement number addition Positive: x Negative: (2 n -1)-x  Addition (2 n -1)-x + (2 n -1)-y = 2 n +(2 n -1)-(x+y)-1 C out A 3,0 B 3,0 S 3,0 Adder C in

CSE 2464 Example  -3-5 =  0+0=

CSE 2465 Multi-Operand Addition  Carry save adder: a (3,2) counter

CSE 2466 Example  A (3,2) counter compresses X rows to 2/3X rows each time  Tree structure in implementation

CSE 2467 Other Counters  (5,3) counter CaCa CbCb S0S0  (7,3) counter S0S0 S2S2 S1S1  Design of (5,3) counter using full adders CaCa CbCb S0S0 CaCa CbCb S0S0

CSE 2468 Multiplication  Examples * * ’ s complement of -5

CSE 2469 Multiplication  Examples (Cont.) * * ’ s complement of 5 Sign bits

CSE Multiplication a 3 a 2 a 1 a 0 * b 3 b 2 b 1 b 0 -a 3 b 0 a 2 b 0 a 1 b 0 a 0 b 0 -a 3 b 1 a 2 b 1 a 1 b 1 a 0 b 1 -a 3 b 2 a 2 b 2 a 1 b 2 a 0 b 2 a 3 b 3 -a 2 b 3 -a 1 b 3 -a 0 b 3  Traditional multiplication of negative numbers

CSE Multiplication a 3 a 2 a 1 a 0 * b 3 b 2 b 1 b 0 a 3 b 0 a 2 b 0 a 1 b 0 a 0 b 0 a 3 b 1 a 2 b 1 a 1 b 1 a 0 b 1 a 3 b 2 a 2 b 2 a 1 b 2 a 0 b 2 a 3 b 3 a 2 b 3 a 1 b 3 a 0 b 3 0 -a 3 -a 3 -a 3 0 -a 2 -a 1 -a 0  -xy = x(1-y)-x = xy-x

CSE Multiplication a 3 a 2 a 1 a 0 * b 3 b 2 b 1 b 0 a 3 b 0 a 2 b 0 a 1 b 0 a 0 b 0 a 3 b 1 a 2 b 1 a 1 b 1 a 0 b 1 a 3 b 2 a 2 b 2 a 1 b 2 a 0 b 2 a 3 b 3 a 2 b 3 a 1 b 3 a 0 b 3 0 -a 3 -a 3 -a 3 0 -b 3 -b 3 -b 3  -xy = xy-x = xy-y

CSE Multiplication a 3 a 2 a 1 a 0 * b 3 b 2 b 1 b 0 a 3 b 0 a 2 b 0 a 1 b 0 a 0 b 0 a 3 b 1 a 2 b 1 a 1 b 1 a 0 b 1 a 3 b 2 a 2 b 2 a 1 b 2 a 0 b 2 a 3 b 3 a 2 b 3 a 1 b 3 a 0 b 3 a a 3 b b 3  Replay 0 -a -a -a by a 0 0 a

CSE Multiplication a 3 a 2 a 1 a 0 * b 3 b 2 b 1 b 0 a 3 b 0 a 2 b 0 a 1 b 0 a 0 b 0 a 3 b 1 a 2 b 1 a 1 b 1 a 0 b 1 a 3 b 2 a 2 b 2 a 1 b 2 a 0 b 2 a 3 b 3 a 2 b 3 a 1 b 3 a 0 b 3 a a 3 -1 b b 3  Fast multiplication: we avoid calculating the 2 ’ s complement of multiplicand, which means a potential long carry chain

CSE Booth Recoding  Multiplication: n rows by 2n-1 column matrix for addition  Objective: try to reduce n rows to log n rows  Radix 2 booth recoding  Radix 4 booth recoding

CSE Radix 2 Booth Recoding  Use 1,0,-1 to recode  Recoding table idxixi x i-1 y i =(x i-1 -x i ) 0000No change 1011End of string of 1 ’ s 210Begin of string of 1 ’ s 3110No change

CSE Example Assume here is 0 x 5 x 4 x 3 x 2 x 1 -x 5 x 4 -x 4 x 3 -x 3 x 2 -x 2 x 1 -x 1 x 4 -x 5 x 3 -x 4 x 2 -x 3 x 1 -x 2 0-x 1 y 5 y 4 y 3 y 2 y 1

CSE Radix 4 Booth Recoding  Use 2,1,0,-1,-2 to recode (z i/2 =2y i+1 +y i ) idx i+ 1 xixi x i-1 y i+1 yiyi z i/ No string of 1 ’ s End of string of 1 ’ s Isolated End of string of 1 ’ s Begin of string of 1 ’ s End of one string, begin new string Begin of string of 1 ’ s String of all 1 ’ s

CSE Examples Bin 0 1, 1 1, Radix 4: 2, 0, -1 2* = 31 2x 6 2x 4 2x 2 x 5 x 3 x 1 -2x 6 +x 5 +x 4 -2x 4 +x 3 +x 2 -2x 2 +x 1 +x 0 x 6 x 5 x 4 x 3 x 2 x 1 x 0