L10 – Multiplication Division 1 Comp 411 – Fall 2009 10/19/2009 Binary Multipliers × 0123456789 00000000000 10123456789 2024681012141618 30369121518212427.

Slides:



Advertisements
Similar presentations
Multiplication and Division
Advertisements

CMPE 325 Computer Architecture II
Cosc 2150: Computer Organization Chapter 9, Part 2 Integer multiplication and division.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 8 - Multiplication.
Integer division Pencil and paper binary division (dividend)(divisor) 1000.
THE ARITHMETIC-LOGIC UNIT. BINARY HALF-ADDER BINARY HALF-ADDER condt Half adder InputOutput XYSC
Division CPSC 321 Computer Architecture Andreas Klappenecker.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
361 div.1 Computer Architecture ECE 361 Lecture 7: ALU Design : Division.
Chapter 6 Arithmetic. Addition Carry in Carry out
L9 – Arithmetic Circuits 1 Comp 411 – Fall /14/09 Arithmetic Circuits Didn’t I learn how to do addition in the second grade?
Integer Multiplication and Division ICS 233 Computer Architecture and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering.
Computer Organization Multiplication and Division Feb 2005 Reading: Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann.
Chap 3.3~3.5 Construction an Arithmetic Logic Unit (ALU) Jen-Chang Liu, Spring 2006.
Contemporary Logic Design Arithmetic Circuits © R.H. Katz Lecture #24: Arithmetic Circuits -1 Arithmetic Circuits (Part II) Randy H. Katz University of.
ECE 301 – Digital Electronics
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
1 Lecture 4: Arithmetic for Computers (Part 4) CS 447 Jason Bakos.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
ECE 4110– Sequential Logic Design
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
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.
Chapter # 5: Arithmetic Circuits
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Spring 2002EECS150 - Lec12-cl3 Page 1 EECS150 - Digital Design Lecture 12 - Combinational Logic Circuits Part 3 March 4, 2002 John Wawrzynek.
Multiplication of signed-operands
Digital Kommunikationselektronik TNE027 Lecture 2 1 FA x n –1 c n c n1- y n1– s n1– FA x 1 c 2 y 1 s 1 c 1 x 0 y 0 s 0 c 0 MSB positionLSB position Ripple-Carry.
Computer Organization and Design More Arithmetic: Multiplication, Division & Floating-Point Montek Singh Mon, Nov 5, 2012 Lecture 13.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Lecture 6: Multiply, Shift, and Divide
1 Arithmetic Logic Unit ALU. 2 The Bus Concept 3 CPU Building Blocks  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
Cs 152 l6 Multiply 1 DAP Fa 97 © U.C.B. ECE Computer Architecture Lecture Notes Multiply, Shift, Divide Shantanu Dutt Univ. of Illinois at.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Digital Logic Design (CSNB163)
Integer Multiplication and Division ICS 233 Computer Architecture and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering.
Csci 136 Computer Architecture II – Multiplication and Division
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Arithmetic: Part II.
CPEN Digital System Design
Division Quotient Divisor Dividend – – Remainder.
Integer Multiplication and Division COE 301 Computer Organization Dr. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University.
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.
Multipliers. More complicated than addition accomplished via shifting and addition More time and more area Multiplication What should be the length of.
Integer Multiplication and Division ICS 233 Computer Architecture & Assembly Language Prof. Muhamed Mudawar College of Computer Sciences and Engineering.
Montek Singh Apr 8, 2016 Lecture 12
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Week 1(Number System) Muhammad Ammad uddin Logic Design Lab I (CEN211)
William Stallings Computer Organization and Architecture 8th Edition
More Binary Arithmetic - Multiplication
Multiplication and Division basics
Integer Multiplication and Division
MIPS mul/div instructions
Morgan Kaufmann Publishers
Multiplication & Division
Multipliers Multipliers play an important role in today’s digital signal processing and various other applications. The common multiplication method is.
King Fahd University of Petroleum and Minerals
CSCI206 - Computer Organization & Programming
Topic 3c Integer Multiply and Divide
Unsigned Multiplication
Computer Organization and Design
Reading: Study Chapter (including Booth coding)
October 15 Chapter 4 – Multiplication/Division Go to the State Fair!
Montek Singh Mon, Mar 28, 2011 Lecture 11
October 5 Register to vote! Go to the State Fair! (15-24 October)
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Presentation transcript:

L10 – Multiplication Division 1 Comp 411 – Fall /19/2009 Binary Multipliers × Reading: Study Chapter (including Booth coding) × You’ve got to be kidding… It can’t be that easy The key trick of multiplication is memorizing a digit-to-digit table… Everything else was just adding

L10 – Multiplication Division 2 Comp 411 – Fall /19/2009 Binary Multiplication A0A0 A1A1 A2A2 A3A3 B0B0 B1B1 B2B2 B3B3 A0B0A0B0 A1B0A1B0 A2B0A2B0 A3B0A3B0 A0B1A0B1 A1B1A1B1 A2B1A2B1 A3B1A3B1 A0B2A0B2 A1B2A1B2 A2B2A2B2 A3B2A3B2 A0B3A0B3 A1B3A1B3 A2B3A2B3 A3B3A3B3 x + A j B i is a “partial product” Multiplying N-digit number by M-digit number gives (N+M)-digit result Easy part: forming partial products (just an AND gate since B I is either 0 or 1) Hard part: adding M, N-bit partial products X The “Binary” Multiplication Table Hey, that looks like an AND gate Binary multiplication is implemented using the same basic longhand algorithm that you learned in grade school.

L10 – Multiplication Division 3 Comp 411 – Fall /19/2009 Multiplication: Implementation t 32nd repetition? Start Multiplier0 = 0Multiplier0 = 1 No: < 32 repetitions Yes: 32 repetitions

L10 – Multiplication Division 4 Comp 411 – Fall /19/2009 Second Version Multiplier Shift right Write 32 bits 64 bits 32 bits Shift right Multiplicand 32-bit ALU ProductControl test ift the Multiplier register right 1 bit 32nd repetition? Start Multiplier0 = 0Multiplier0 = 1 No: < 32 repetitions Yes: 32 repetitions

L10 – Multiplication Division 5 Comp 411 – Fall /19/2009 Example for second version Test true shift right Test false shift right Test true shift right Test true shift right Initial0 ProductMultiplicandMultiplierStepIteration

L10 – Multiplication Division 6 Comp 411 – Fall /19/2009 Final Version Control test Write 32 bits 64 bits Shift right Product Multiplicand 32-bit ALU epetition? Start Product0 = 0Product0 = 1 No: < 32 repetitions Yes: 32 repetitions The trick is to use the lower half of the product to hold the multiplier during the operation.

L10 – Multiplication Division 7 Comp 411 – Fall /19/2009 What about the sign? Positive numbers are easy. How about negative numbers? Please read Booth coding in textbook

L10 – Multiplication Division 8 Comp 411 – Fall /19/2009 Faster Multiply A1 & BA0 & B A2 & B A3 & B A31 & B P1P2P0 P31 P32-P63

L10 – Multiplication Division 9 Comp 411 – Fall /19/2009 Simple Combinational Multiplier t PD = 10 * t PD,FA not 16 NB: this circuit only works for nonnegative operands Components N * HA N(N-1) * FA The Logic of a Half- Adder CO A B S HA A Co B S HA A Co B S HA A Co B S HA A Co B S t PD = (2*(N-1) + N) * t PD,FA

L10 – Multiplication Division 10 Comp 411 – Fall /19/2009 Carry-Save Combinational Multiplier t PD = 8 * t PD,FA Components N * HA N 2 * FA Observation: Rather than propagating the sums across each row, the carries can instead be forwarded onto the next column of the following row This small improvement in performance hardly seems worth the effort, however, this design is easier to pipeline. These Adders can be removed, and the AND gate outputs tied directly to the Carry inputs of the next stage. t PD = (N+N) * t PD,FA

L10 – Multiplication Division 11 Comp 411 – Fall /19/2009 Division Start 1. Subtract Divisor from the Remainder leave the result in the Remainder Test Remainder Shift Quotient to the left set its rightmost bit = 1 Restore Remainder by adding Divisor Shift Quotient to the left set its rightmost bit = 0 Shift Divisor Register right 1 bit Repeat 33 times >=0<0