Computer Achitecture and org- Fixed point Multiplication- Saritha, Study notes of Computer Architecture and Organization

The slides covers Binary and booth multiplication and how is that implemented on hardware. There is a detailed explanation with example of Flow chart for Multiplication and its representation.

Typology: Study notes

2010/2011

Uploaded on 08/25/2011

hamit1990
hamit1990 ๐Ÿ‡ฎ๐Ÿ‡ณ

4.3

(76)

95 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Binary Multiplication
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Computer Achitecture and org- Fixed point Multiplication- Saritha and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Binary Multiplication

Some general observations

  • (^) Multiplication involves the generation of partial

products โ€“ one for each digit in the multiplier.

  • (^) Partial products are summed to produce the final

product.

  • (^) Partial products are very simple to define for binary

multiplication. If the digit is a โ€˜oneโ€™ the partial product

is the multicand, otherwise the partial product is zero.

  • (^) The total product is the sum of the partial products.

Each successive partial product is shifted one position

to the left.

  • (^) The multiplication of two n-bit binary numbers results in

a product of up to 2n bits in length.

Simplifying Multiplication

โ€ข The processor can keep a running product

rather than summing at the end.

โ€ข For each โ€˜1โ€™ in the multiplier we can apply

an add and a shift.

โ€ข For each โ€˜0โ€™ only a shift is needed.

Hardware Implementation for Signed-Magnitude Multiplication

Flow chart for Multiplication (Signed Magnitude Representation)

Multiply Operation Multiplicand in B Multiplier in Q AS โ† QS + BS QS โ† QS + BS A โ† 0, E โ† 0 SC โ† n โ€“ 1 Qn โ‰  0 = 0 EA โ† A + B Shr EAQ SC โ† SC โ€“ 1 SC END (Product is in AQ) = 0 = 1 E A Q SC 0 00000 10011 101 10111 10111 0 01011 11001 100 10111 00010 0 10001 01100 011 1 0 01000 10110 010 0 00100 01011 001 10111 11011 0 01101 10101 000 Add Add Add Shift Shift Shift Shift Shift 23 ร— 19 = 437 Q = 19 (10011), B = 23 (10111)

Group Exercise: Group 1: 3 X 7, Group 2: -3 X 7, Group 3: 3 X -7, Group 4: -3 X -

E

Example: 11 ร— 13

Observation

M X (00011110) = M X (

4

3

2

1

= M X (16 + 8 + 4 + 2)

= M X 30

The number of operations can be reduced to two if we

observe that:

n

n-

n-k

n+

  • 2 n-k

M X (00011110) = M X (

5

  • 2 1

= M X (32 - 2)

= M X 30

14 = 01110 = 2^4 โ€“ 2^1 = 16 โ€“ 2 25 = 011001 = - 0

  • 2 1
  • 2 3 + 2 5 = -1 + 2 โ€“ 8 + 32 = 1 โ€“ 8 + 32 = -7 + 32

Booth Multiplication Algorithm (2โ€™ complement multiplication) 7 ร— 3 = 21 0111 multiplicand = 7 ร— 0011(0) multiplier = 3 11111001 bit-pair 10, add -7 in twoโ€™s compl. bit-pair 11, do nothing 000111 bit-pair 01, add 7 bit-pair 00, do nothing 00010101 21

  • (^) -7 ร— 3 = - 1001 multiplicand = -7 in twoโ€™s com. ร—0011(0) multiplier = 3 00000111 bit-pair 10, add 7 bit-pair 11, do nothing 111001 bit-pair 01, add - bit-pair 00, do nothing 11101011 -

Booth Advantage

ร— 00011110 30

00000000 ________

ร— 00011110 30


0000001001011000 600 Serial addition Booth algorithm Four partial product additions Two partial product additions

Flowchart for Booth Multiplication Multiply Multiplicand in BR Multiplier in QR AC โ† 0 Qn+1 โ† 0 SC โ† n QnQn+ AC โ† AC + BR + 1 AC โ† AC + BR ashr (AC & QR) SC โ† SC โ€“ 1 SC โ‰  (^0) = 0 = 10 = 01 = 00 = 11 END Comment AC QR Qn+1 SC Example: -9 ร— -13 = 117 BR = 10111, BR + 1 = 01001 00000 10011 01001 01001 00100 11001 00010 01100 10111 11001 11100 10110 11110 01011 01001 00111 00011 10101

Subtract BR Add BR Subtract BR Ashr Ashr Ashr Ashr Ashr

Exercise

โ€ข Show the step by step multiplication

process using Booth algorithm when the

following binary numbers are multiplied.

Assume 5-bit registers that hold signed

numbers. The multiplicand in both cases is

(+15) ร— (+13)

(+15) ร— (-13)