Multiplication.

Slides:



Advertisements
Similar presentations
Multiplication and Shift Circuits Dec 2012 Shmuel Wimer Bar Ilan University, Engineering Faculty Technion, EE Faculty 1.
Advertisements

1 ECE 4436ECE 5367 Computer Arithmetic I-II. 2 ECE 4436ECE 5367 Addition concepts 1 bit adder –2 inputs for the operands. –Third input – carry in from.
8085 processor. Bus system in microprocessor.
Using Carry-Save Adders For Radix- 4, Can Be Used to Generate 3a – No Booth’s Slight Delay Penalty from CSA – 3 Gates.
Datapath Functional Units. Outline  Comparators  Shifters  Multi-input Adders  Multipliers.
Multiplication Schemes Continued
UNIVERSITY OF MASSACHUSETTS Dept
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI Circuit Design Lecture 24 - Subsystem.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Copyright 2008 Koren ECE666/Koren Part.6b.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
1 COMP541 Datapaths II Montek Singh Mar 22, 2007.
Chapter 6 Arithmetic. Addition Carry in Carry out
UNIVERSITY OF MASSACHUSETTS Dept
Contemporary Logic Design Arithmetic Circuits © R.H. Katz Lecture #24: Arithmetic Circuits -1 Arithmetic Circuits (Part II) Randy H. Katz University of.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
EE466: VLSI Design Lecture 14: Datapath Functional Units.
Introduction to CMOS VLSI Design Datapath Functional Units
Copyright 2008 Koren ECE666/Koren Part.6a.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
Number Systems Lecture 02.
Binary Number Systems.
ECE 645 – Computer Arithmetic Lecture 10: Fast Dividers ECE 645—Computer Arithmetic 4/15/08.
Lecture 18: Datapath Functional Units
Data Representation – Binary Numbers
ECE 4110– Sequential Logic Design
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
Binary Arithmetic Stephen Boyd March 14, Two's Complement Most significant bit represents sign. 0 = positive 1 = negative Positive numbers behave.
Programmable Logic Circuits: Multipliers Dr. Eng. Amr T. Abdel-Hamid ELECT 90X Fall 2009 Slides based on slides prepared by: B. Parhami, Computer Arithmetic:
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.
Copyright 1995 by Coherence LTD., all rights reserved (Revised: Oct 97 by Rafi Lohev, Oct 99 by Yair Wiseman, Sep 04 Oren Kapah) IBM י ב מ 10-1 The ALU.
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.
L/O/G/O CPU Arithmetic Chapter 7 CS.216 Computer Architecture and Organization.
Multi-operand Addition
Advanced VLSI Design Unit 05: Datapath Units. Slide 2 Outline  Adders  Comparators  Shifters  Multi-input Adders  Multipliers.
Lecture 6: Multiply, Shift, and Divide
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Logic Design: Part 1.
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.
Two’s and one’s complement arithmetic CLOCK ARITHMETIC.
High-Radix Sequential Multipliers Bit-Serial Multipliers Modular Multipliers Lecture 9.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
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.
Reconfigurable Computing - Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
Lecture 18: Datapath Functional Units
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Lecture 18: Datapath Functional Units. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 18: Datapath Functional Units2 Outline  Multipliers.
Combinational Circuits
Multiplier Design [Adapted from Rabaey’s Digital Integrated Circuits, Second Edition, ©2003 J. Rabaey, A. Chandrakasan, B. Nikolic]
MIPS mul/div instructions
Sequential Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Chap 7. Register Transfers and Datapaths
Multipliers Multipliers play an important role in today’s digital signal processing and various other applications. The common multiplication method is.
Wakerly Section 2.4 and further
Radix 2 Sequential Multipliers
Unsigned Multiplication
Arithmetic Logical Unit
ECEG-3202 Computer Architecture and Organization
A.R. Hurson 323 CS Building, Missouri S&T
Montek Singh Mon, Mar 28, 2011 Lecture 11
UNIVERSITY OF MASSACHUSETTS Dept
UNIVERSITY OF MASSACHUSETTS Dept
Combinational Circuits
UNIVERSITY OF MASSACHUSETTS Dept
Sequential Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Booth Recoding: Advantages and Disadvantages
UNIVERSITY OF MASSACHUSETTS Dept
Presentation transcript:

Multiplication

Multiplier Notation Partial Products Logical-AND

Shift and Add Paradigm

Shift and Add Examples

Programmed Multiplication

Programmed Multiplication (cont.)

Hardware Shift and Add (right)

Hardware Shift and Add

Hardware Shift and Add (left)

Signed Number Multiplication (positive case)

Signed Number Multiplication (negative case)

Booth’s Recoding (or encoding) Developed for Speeding Up Multiplication in Early Computers When a Partial Product of 0 Occurs, Can Skip Addition and Just Shift Doesn’t Help Multipliers Where Datapaths Go Through Adder Such as Previous Examples Does Help Designs for Asynchronous Implementation or Microprogramming Since Shifting is Faster Than Addition Variable Delay – Depends on Number of One’s in Booth Observed that a String of 1’s May be Replaced as:

Booth’s Recoding Example xn xn-1 ... xi xi-1 ... x0 (0) yi=xi-1 - xi yn ... yi ... y0 EXAMPLE 0011110011(0) 0100010101

Booth’s Recoding Maps Words With Digit Set [0,1] to Those With [-1,1]

Sequential Multiplication X 1101 (-310) Y 0111 (recoded) (-1) Add –A 0101 Shift 00101 (+1) Add +A 1011 11011 Shift 111011 001111 Shift 0001111 (+1510)

Booth Multiplier Example

Booth’s Recoding Drawbacks Number of add/sub Operations are Variable Some Inefficiencies EXAMPLE 001010101(0) 011111111 Can Use Modified Booth’s Recoding to Prevent Will Look at This in Later Class

Sign Extension Consider 6-bit 2’s Complement Number s=0 Positive Value; s=1 Negative Value Show Sign Extension Works: Definition of 2’s Complement

Sign Extension Example Y 010101 (recoding) 11111101010 (neg. A) 0000000000 (0 A) 111101010 (neg. A) 00000000 (0 A) 0010110 (neg. A) 000000 (0 A) 00011110010 (24210)

Sign Extension Example Same Trick as Before, Complement Original Sign Bit Add 1 to Column 5 1 001010 (neg. A) 100000 (0 A) 001010 (neg. A) 100000 (0 A) 110110 (neg. A) 100000 (0 A) 00011110010 (24210)

Methods for Fast Multiplication Reduce Number of Partial Products to be Added Group Multiplier Bits Together Higher Radix Multiplier Add the Partial Products Faster

Radix-r Shift and Add

Radix-4 Multiplication Shifter is Multi-bit No Longer a Simple AND of xi with a Need 4:1 MUX with 0, a, 2a, 3a as Inputs

Partial Product Selection 0, a and 2a are easy 3a=a+2a  Requies an Adder! Need a Way to Compute 3a Efficiently

Example With 3a Availability

Computing 3a One Way is to Precompute 3a and Store in Register Initially Another Way is When 3a Occurs Add -a Send Carry of 1 to Next into Next Radix-4 Digit of Multiplier Causes Incoming Multiple to be [0,4] Versus [0,3] – 4 Because incoming carry to 112 Causes Digit 1002 Multiples 0, 1, 2 Handled Easily Multiple 3 Converted to –1 With Outgoing Carry of 1 Multiple 4 Converted to 0 With Outgoing Carry of 1 Requires Extra Cycle of Computation Since MSD May Have Carry

Example With 3a Availability

Using Radices >4 Could Also Use Radices of 8, 16, ... Bit Groupings of Size 3, 4, ... Multiple Generation Hardware Becomes More Complex Must Precompute 3a, 5a, 7a, .... Or Use 3a With a Carry Scheme Carry Scheme Converts Multipliers 5a, 6a, 7a to –3a, -2a, -a, etc. Carry Digit in This Form Becomes a 1

Booth Recoding Modern Arithmetic Circuits DO NOT Apply Booth Recoding Directly Useful in Understanding Higher-radix Versions of Booth Recoding No Consecutive 1’s or –1’s Occur Using Previously Seen Booth Recoding Booth Recoding in Radix-4 Results in the Following: Only Multiples of a or 2a are Required These are Easily Obtained Using Shifting and Complementation

Modified Booth Recoding Booth Recoding Results From xi and xi-1 Radix-4 Multiplier Digits Implies Booth Recoding Based on xi+1, xi and xi-1 Similar to Classical Booth Recoding, Modified Booth Recoding Encodes Multipliers into [-2,2]

Modified Booth Recoding

Example Modified Booth Recoding

Example Multiplication with MBR

Hardware MBR Example