Multiplication and Division Lab 9. Multiplication 13 x11 13 143 = 8Fh 1101 x1011 1101 100111 0000 100111 1101 10001111.

Slides:



Advertisements
Similar presentations
WHYP Test Files Lab 9. y1 The WC16 WHYP Core Modifications for Multiplication and Division.
Advertisements

Introduction to Computer Engineering by Richard E. Haskell Multiplication and Division Instructions Module M16.4 Section 10.4.
HCS12 Arithmetic Lecture HC12 Arithmetic Addition and Subtraction Shift and Rotate Instructions Multiplication Division.
Integer division Pencil and paper binary division (dividend)(divisor) 1000.
HOW TO DIVIDE FRACTIONS
Remainder and Factor Theorems
Polynomial Division with a Box. Polynomial Multiplication: Area Method x + 5 x 2 x 3 5x25x2 -4x 2 -4x-4x -20x x +1 5 Multiply (x + 5)(x 2 – 4x + 1) x.
Divider Discussion D7.3 Example 20.
Multiplication Discussion Multiplier Binary Multiplication 4 x 4 Multiplier.
Integer Multiplication and DivisionICS 233 – KFUPM © Muhamed Mudawar slide 1 Multiplicand and HI are sign-extended  Sign is the sign of the result Signed.
Project Done By: Apurva Patel Vrajesh Patel Swapna Kalakonda.
Multi-Base Calculator CSE378 Final Project By Matthew Lehn & Yanqing Zhu December 17, 2001 Professor Haskell.
For Multiplication of Signed Numbers
Division Lecture L6.3. Division
The FC16 Forth Core Lab 7 Module F4.1. Lab 7 Hex OpcodeNameFunction 0000NOP No operation 0001DUP Duplicate T and push data stack. N
Division Discussion D11.3. Division
Sequential Multiplication Lecture L6.4. Multiplication 13 x = 8Fh 1101 x
Arithmetic Logic Unit (ALU) Discussion D4.6. ALU N = negative flag (N=1 if y(n)=0 Z = zero flag (Z = 1 if Y = 0) V = overflow flag C = carry flag.
1 Arithmetic and Logical Operations - Part II. Unsigned Numbers Addition in unsigned numbers is the same regardless of the base. Given a pair of bit sequences.
Lesson 5-6 Example Find 312 ÷ 8. Use short division. Step 1Look at the first digit in the dividend. Since the divisor is greater than the first digit,
 Long division of polynomials works just like the long (numerical) division you did back in elementary school, except that now you're dividing with variables.
Polynomial Division and the Remainder Theorem Section 9.4.
Ch 11.5 Dividing Polynomials
5. Divide 4723 by 5. Long Division: Steps in Dividing Whole Numbers Example: 4716  5 STEPS 1. The dividend is The divisor is 5. Write.
Division Harder Than Multiplication Because Quotient Digit Selection/Estimation Can Have Overflow Condition – Divide by Small Number OR even Worse – Divide.
Whole Numbers Multiplying Whole Numbers. Properties of Multiplication Commutative Property of Multiplication Multiplication Properties of 0 and 1 Associative.
Partial Quotients.
PARTIAL QUOTIENT DIVISION
Partial Quotient Method In this division algorithm the children record on the right side of the problem. The first thing they do is divide. They ask themselves.
6.3 Dividing Polynomials (Day 1)
Warm up Objective: To divide polynomials Lesson 6-7 Polynomial Long Division.
Long Division Does McDonald’s Sell Cheese Burgers?
DIVISION. Standards G4.1M.C2.PO4A. Use multiple strategies to divide whole numbers using 4-digit dividends and divisors from 1 to 12 with remainders.
CDA 3101 Spring 2016 Introduction to Computer Organization
Integer Operations Computer Organization and Assembly Language: Module 5.
Let’s look at how to do this using the example: In order to use synthetic division these two things must happen: There must be a coefficient for every.
Products and Factors of Polynomials (part 2 of 2) Section 440 beginning on page 442.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
= 91 sum operation augend addend NOTE: Sometimes both the augend and addend are called addends. Sometimes the sum is called the total. Addition.
Copyright © Cengage Learning. All rights reserved. Functions 1 Basic Concepts.
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
More Binary Arithmetic - Multiplication
Multiplication and Division basics
Synthetic Division.
Dividing Fractions
Polynomial Division.
Division Using “Lucky Seven”
CDA 3101 Summer 2007 Introduction to Computer Organization
HOW TO DIVIDE FRACTIONS
CSCI206 - Computer Organization & Programming
Unit 1. Day 8..
Unit 1. Day 7..
DIVISION AS SHARING.
Partial Quotients Help Students build on multiplies of ten and find easy multiples of the divisor.
Do Now  .
Logical Operations Boy who sow wild oats better hope for crop failure.
Multiplication Discussion 11.1.
Dividison & Overflow Given a dividend X and a divisor D, generate a quotient Q and a remainder R X = Q  D + R (with R  D-1) X = Q  D + R  Q 
Unit 1. Day 8..
Partial Quotients Help Students build on multiplies of ten and find easy multiples of the divisor.
Synthetic Division.
Long Division Family.
Dividing polynomials This PowerPoint presentation demonstrates two different methods of polynomial division. Click here to see algebraic long division.
Multiplying and Dividing Integers
Synthetic Division.
divide dividend divisor inverse operations quotient
Division Opposite of multiplication.
Logical Operations Boy who sow wild oats better hope for crop failure.
1 Lecture 5Multiplication and Division ECE 0142 Computer Organization.
Presentation transcript:

Multiplication and Division Lab 9

Multiplication 13 x = 8Fh 1101 x

Multiplication 1101 x adsh adsh sh adsh

Multiplication UM* ( u1 u2 -- upL upH ) TN N2 mpp (multiply partial product) if N(0) = 1 then adsh else sh end if; : UM* ( u1 u2 -- ud) LIT 0 mpp mpp ROT DROP ; All other signed and unsigned multiplication can be derived from UM*

y1 Modifications for Multiplication and Division

variable AVector: STD_LOGIC_VECTOR (width downto 0); variable BVector: STD_LOGIC_VECTOR (width downto 0); variable CVector: STD_LOGIC_VECTOR (width downto 0); variable yVector: STD_LOGIC_VECTOR (width downto 0); variable y1_tmp: STD_LOGIC_VECTOR (width-1 downto 0); AVector := '0' & a; BVector := '0' & b; CVector := '0' & c; y1_tmp := false; yVector := '0' & false; begin

when "011101" =>-- mpp if b(0) = '1' then yVector := AVector + CVector; else yVector := AVector; end if; y <= yVector(width downto 1); y1 <= yVector(0) & b(width-1 downto 1); mpp (multiply partial product) if N(0) = 1 then adsh else sh end if; TN N2

: UM* ( u1 u2 - upL upH ) 0 mpp mpp ROT_DROP ; 16 x 16 = 32 Multiplication

Division

Division 8-bit/4-bit = 4: _ numer[8:0] denom[3:0] If denom < numer[7:4] then overflow (quotient won’t fit in 4 bits) Let T = numer[8:4] N = numer[3:0] N2 = denom[3:0]

Division 8-bit/4-bit = 4: sll TN N2 for I in 0 to 3 loop sll T & N; if T[8:4] > N2 then T := T - (0 & N2); N(0) := ‘1’; end if; end loop;

Division 8-bit/4-bit = 4: sll TN N sub1sll sll sub1sll rem quot

Division : UM/MOD ( unumL unumH udenom -- urem uquot ) All other signed and unsigned division operations can be derived as WHYP words from UM/MOD TN N2 TN -ROT\ udenom unumL unumH SHLDC SHLDC \ denom quot rem ROT_DROP_SWAP ;

when "011110" =>-- shldc yVector := a & b(width-1); y1_tmp := b(width-2 downto 0) & '0'; if yVector > CVector then yVector := yVector - CVector; y1_tmp(0) := '1'; end if; for I in 0 to 3 loop sll T & N; if T[8:4] > N2 then T := T - (0 & N2); N(0) := ‘1’; end if; end loop; sll TN N2 y <= yVector(width-1 downto 0); y1 <= y1_tmp;

32 / 16 = 16:16 Division : UM/MOD ( unL unH ud -- ur uq ) -ROT shldc shldc ROT_DROP_SWAP ;

Hex Division EE BC2F C C x E = A8 C x E = A8 + A = B2 B28 9AF A

Hex Division EE BC2F C A x E = 8C A x E = 8C + 8 = 94 B28 9AF A 94C 63 Dividend = BC2F Divisor = EE Quotient = CA Remainder = 63