SlideShare a Scribd company logo
6
Most read
9
Most read
12
Most read
Computer Organization And Architecture
Multiplication algorithm, hardware and flowchart
Multiplication (often denoted by x) is the
mathematical operation of scaling one number
by another. It is a basic arithmetic operation.
Example: 3 x 4= 3+3+3+3=12
5 x 3 ½ =5+5+5+(half of 5)= 17.5
The basic idea of multiplication is repeated
addition.
*Paper and pencil example (unsigned):
Multiplicand 1000
Multiplier 1001
1000
0000
0000
1000
Product 01001000
*m bits x n bits = m+n bit product
*Binary makes it easy:
*0 => place 0 ( 0 x multiplicand)
*1 => place a copy ( 1 x multiplicand)
Place a copy
Place 0
*64-bit Multiplicand reg, 64-bit ALU, 64-bit Product reg,
32-bit multiplier reg
Product
Multiplier
Multiplicand
64-bit ALU
Shift Left
Shift Right
Write
Control
32 bits
64 bits
64 bits
*Product Multiplier Multiplicand
0000 0000 0011 0000 0010
*0000 0010 0001 0000 0100
*0000 0110 0000 0000 1000
*0000 0110
3. Shift the Multiplier register right 1 bit.
Done
Yes: 32 repetitions
2. Shift the Multiplicand register left 1 bit.
No: < 32 repetitions
1. Test
Multiplier0
Multiplier0 = 0Multiplier0 = 1
1a. Add multiplicand to product &
place the result in Product register
32nd
repetition?
Start
Multiplication algorithm, hardware and flowchart
*Half of the shifted multiplicand register contains 0. Why
not shift the product right?
*32-bit Multiplicand reg, 32 -bit ALU, 64-bit Product reg,
32-bit Multiplier reg
Product
Multiplier
Multiplican
d
32-bit ALU
Shift Right
Write
Control
32 bits
32 bits
64 bits
Shift Right
3. Shift the Multiplier register right 1 bit.
Done
Yes: 32 repetitions
2. Shift the Product register right 1 bit.
No: < 32 repetitions
1. Test
Multiplier0
Multiplier0 = 0Multiplier0 = 1
1a. Add multiplicand to the left half of product &
place the result in the left half of Product register
32nd
repetition?
Start
° Product Multiplier Multiplicand
0000 0000 0011 0010
*Product Multiplier Multiplicand
0000 0000 0011 0010
*0010 0000
*0001 0000 0001 0010
*0011 0000 0001 0010
*0001 1000 0000 0010
*0000 1100 0000 0010
*0000 0110 0000 0010
3. Shift the Multiplier register right 1 bit.
Done
Yes: 32 repetitions
2. Shift the Product register right 1 bit.
No: < 32 repetitions
1. Test
Multiplier0
Multiplier0 = 0Multiplier0 = 1
1a. Add multiplicand to the left half of product &
place the result in the left half of Product register
32nd
repetition?
Start
Multiplication algorithm, hardware and flowchart
*Combine Multiplier register and Product register
*32-bit Multiplicand reg, 32 -bit ALU, 64-bit Product reg,
(0-bit Multiplier reg)
Product (Multiplier)
Multiplican
d
32-bit ALU
Write
Control
32 bits
64 bits
Shift Right
Multiplicand Product
0010 0000 0011
Done
Yes: 32 repetitions
2. Shift the Product register right 1 bit.
No: < 32 repetitions
1. Test
Product0
Product0 = 0Product0 = 1
1a. Add multiplicand to the left half of product &
place the result in the left half of Product register
32nd
repetition?
Start
Missing Multiplier
Mcand: 0010 P: 0000 0011
1 P=P+Mcand Mcand: 0010 P: 0010 0011
Shr P Mcand: 0010 P: 0001 0001
2 P=P+Mcand Mcand: 0010 P: 0011 0001
Shr P Mcand: 0010 P: 0001 1000
3 0=>nop Mcand: 0010 P: 0001 1000
Shr P Mcand: 0010 P: 0000 1100
4 0=>nop Mcand: 0010 P: 0000 1100
Shr P Mcand: 0010 P: 0000 0110
Multiplication algorithm, hardware and flowchart
Booth algorithm gives a procedure for multiplying binary integers in signed –
2’s complement representation.
I will illustrate the booth algorithm with the following example:
Example, 2 x (- 4)
0010 * 1100
Step 1: Making the Booth table
1. From the two numbers, pick the number with the smallest difference
between a series of consecutive numbers, and make it a multiplier.
i.e., 0010 -- From 0 to 0 no change, 0 to 1 one change, 1 to 0 another
change ,so there are two changes on this one
1100 -- From 1 to 1 no change, 1 to 0 one change, 0 to 0 no change, so
there is only one change on this one.
Therefore, multiplication of 2 x (– 4), where 2 ten (0010 two) is the
multiplicand and (– 4) ten (1100two) is the multiplier.
2. Let X = 1100 (multiplier)
Let Y = 0010 (multiplicand)
Take the 2’s complement of Y and call it –Y
–Y = 1110
3. Load the X value in the table.
4. Load 0 for X-1 value it should be the previous first least significant bit of X
5. Load 0 in U and V rows which will have the product of X and Y at the end of
operation.
6. Make four rows for each cycle; this is because we are multiplying four bits
numbers.
Step 2: Booth Algorithm
Look at the first least significant bits of the multiplier “X”, and the previous least
significant bits of the multiplier “X - 1”.
a. 0 0 Shift only
1 1 Shift only.
0 1 Add Y to U, and shift
1 0 Subtract Y from U, and shift or add (-Y) to U and shift
b. Take U & V together and shift arithmetic right shift which preserves the sign bit of
2’s complement number. Thus a positive number remains positive, and a negative
number remains negative.
c. Shift X circular right shift because this will prevent us from using two registers for
the X value.
Multiplication algorithm, hardware and flowchart
We have finished four cycles, so the answer is shown, in the last rows of U
and V which is: 11111000
Now to easily check our calculations, we take the original question, 2 x -4.
This becomes -8. -8 is the two's compliment of 8. 8 in eight bit binary is
00001000.
Taking the two's compliment by the method previously described, we get the
result 11111000, which is exactly the same as our Booths algorithm answer.
Multiplication algorithm, hardware and flowchart
Questions...

More Related Content

PPTX
Quick tutorial on IEEE 754 FLOATING POINT representation
PDF
Problem Characteristics in Artificial Intelligence
PPTX
Chapter 5: Cominational Logic with MSI and LSI
PPTX
Computer Arithmetic
PPT
chap4_Parametric_Methods.ppt
PPTX
Conditional branches
PDF
22CS201 COA
PPTX
Advanced computer architecture
Quick tutorial on IEEE 754 FLOATING POINT representation
Problem Characteristics in Artificial Intelligence
Chapter 5: Cominational Logic with MSI and LSI
Computer Arithmetic
chap4_Parametric_Methods.ppt
Conditional branches
22CS201 COA
Advanced computer architecture

What's hot (20)

PPTX
Register transfer and micro-operation
PPTX
Memory mapped I/O and Isolated I/O
PPTX
Registers
PPTX
Basic Computer Organization and Design
DOC
Digital logic circuits important question and answers for 5 units
PPTX
bus and memory tranfer (computer organaization)
PPTX
Addressing modes
PPTX
K - Map
PPTX
Boolean Function Forms
DOC
Dma transfer
PPTX
Basic Computer Organization and Design
PPTX
Timing and control
PPTX
Pentium processor
PPTX
Microprogrammed Control Unit
PPT
PPTX
Computer arithmetic
PDF
Bit pair recoding
PPTX
Addressing Modes
PPT
Architecture of 8086 Microprocessor
PPT
Arithmetic Logic Unit (ALU)
Register transfer and micro-operation
Memory mapped I/O and Isolated I/O
Registers
Basic Computer Organization and Design
Digital logic circuits important question and answers for 5 units
bus and memory tranfer (computer organaization)
Addressing modes
K - Map
Boolean Function Forms
Dma transfer
Basic Computer Organization and Design
Timing and control
Pentium processor
Microprogrammed Control Unit
Computer arithmetic
Bit pair recoding
Addressing Modes
Architecture of 8086 Microprocessor
Arithmetic Logic Unit (ALU)
Ad

Similar to Multiplication algorithm, hardware and flowchart (20)

PDF
Booth multiplication
PPT
ece552_08_integer_mccccccccccultiply.ppt
PPT
integers multipliers and their functioning
PPT
ece552_08_integer_multiply.ppt
PPT
ece552_08_integer_multiply.ppt
PPT
ece552_08_integer_multiply.ppt
PPTX
COA(Unit_3.pptx)
PDF
Encoding Schemes for Multipliers
PDF
Ijetr011743
PPT
Booths Multiplication Algorithm
PPT
Booths Multiplication Algorithm
PPTX
chapter 3.pptx
PPT
Computer organization and architecture arithmetic.ppt
PPTX
Multiplier architectures_computer architecture.pptx
PDF
COMPUTER ORGANIZATION NOTES Unit 6
PPTX
Multiplication algorithm
PPTX
1.COMPUTER ARITHMETIC which is related to coa.pptx
PDF
Computer arithmetic
PPTX
Sequential multiplication
PDF
Digital Logic 06Booith Algorithm (1).pdf
Booth multiplication
ece552_08_integer_mccccccccccultiply.ppt
integers multipliers and their functioning
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
ece552_08_integer_multiply.ppt
COA(Unit_3.pptx)
Encoding Schemes for Multipliers
Ijetr011743
Booths Multiplication Algorithm
Booths Multiplication Algorithm
chapter 3.pptx
Computer organization and architecture arithmetic.ppt
Multiplier architectures_computer architecture.pptx
COMPUTER ORGANIZATION NOTES Unit 6
Multiplication algorithm
1.COMPUTER ARITHMETIC which is related to coa.pptx
Computer arithmetic
Sequential multiplication
Digital Logic 06Booith Algorithm (1).pdf
Ad

More from Tanjarul Islam Mishu (11)

PDF
Vulnerabilities of Fingerprint Authentication Systems and Their Securities
PPTX
Dynamic time wrapping
PDF
Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
PPTX
A presentation on windowing
PPTX
PPTX
Mobile satellite communication
PPTX
Shop management system
PDF
E health system design
PPTX
Rules of Karnaugh Map
PPSX
Implement Fingerprint authentication for employee automation system
PDF
Implement fingerprint authentication for employee automation system
Vulnerabilities of Fingerprint Authentication Systems and Their Securities
Dynamic time wrapping
Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
A presentation on windowing
Mobile satellite communication
Shop management system
E health system design
Rules of Karnaugh Map
Implement Fingerprint authentication for employee automation system
Implement fingerprint authentication for employee automation system

Recently uploaded (20)

PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Classroom Observation Tools for Teachers
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
Weekly quiz Compilation Jan -July 25.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
master seminar digital applications in india
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Lesson notes of climatology university.
O7-L3 Supply Chain Operations - ICLT Program
Classroom Observation Tools for Teachers
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Complications of Minimal Access Surgery at WLH
Yogi Goddess Pres Conference Studio Updates
Weekly quiz Compilation Jan -July 25.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
VCE English Exam - Section C Student Revision Booklet
O5-L3 Freight Transport Ops (International) V1.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
FourierSeries-QuestionsWithAnswers(Part-A).pdf
master seminar digital applications in india
Final Presentation General Medicine 03-08-2024.pptx
Lesson notes of climatology university.

Multiplication algorithm, hardware and flowchart

  • 3. Multiplication (often denoted by x) is the mathematical operation of scaling one number by another. It is a basic arithmetic operation. Example: 3 x 4= 3+3+3+3=12 5 x 3 ½ =5+5+5+(half of 5)= 17.5 The basic idea of multiplication is repeated addition.
  • 4. *Paper and pencil example (unsigned): Multiplicand 1000 Multiplier 1001 1000 0000 0000 1000 Product 01001000 *m bits x n bits = m+n bit product *Binary makes it easy: *0 => place 0 ( 0 x multiplicand) *1 => place a copy ( 1 x multiplicand) Place a copy Place 0
  • 5. *64-bit Multiplicand reg, 64-bit ALU, 64-bit Product reg, 32-bit multiplier reg Product Multiplier Multiplicand 64-bit ALU Shift Left Shift Right Write Control 32 bits 64 bits 64 bits
  • 6. *Product Multiplier Multiplicand 0000 0000 0011 0000 0010 *0000 0010 0001 0000 0100 *0000 0110 0000 0000 1000 *0000 0110 3. Shift the Multiplier register right 1 bit. Done Yes: 32 repetitions 2. Shift the Multiplicand register left 1 bit. No: < 32 repetitions 1. Test Multiplier0 Multiplier0 = 0Multiplier0 = 1 1a. Add multiplicand to product & place the result in Product register 32nd repetition? Start
  • 8. *Half of the shifted multiplicand register contains 0. Why not shift the product right? *32-bit Multiplicand reg, 32 -bit ALU, 64-bit Product reg, 32-bit Multiplier reg Product Multiplier Multiplican d 32-bit ALU Shift Right Write Control 32 bits 32 bits 64 bits Shift Right
  • 9. 3. Shift the Multiplier register right 1 bit. Done Yes: 32 repetitions 2. Shift the Product register right 1 bit. No: < 32 repetitions 1. Test Multiplier0 Multiplier0 = 0Multiplier0 = 1 1a. Add multiplicand to the left half of product & place the result in the left half of Product register 32nd repetition? Start ° Product Multiplier Multiplicand 0000 0000 0011 0010
  • 10. *Product Multiplier Multiplicand 0000 0000 0011 0010 *0010 0000 *0001 0000 0001 0010 *0011 0000 0001 0010 *0001 1000 0000 0010 *0000 1100 0000 0010 *0000 0110 0000 0010 3. Shift the Multiplier register right 1 bit. Done Yes: 32 repetitions 2. Shift the Product register right 1 bit. No: < 32 repetitions 1. Test Multiplier0 Multiplier0 = 0Multiplier0 = 1 1a. Add multiplicand to the left half of product & place the result in the left half of Product register 32nd repetition? Start
  • 12. *Combine Multiplier register and Product register *32-bit Multiplicand reg, 32 -bit ALU, 64-bit Product reg, (0-bit Multiplier reg) Product (Multiplier) Multiplican d 32-bit ALU Write Control 32 bits 64 bits Shift Right
  • 13. Multiplicand Product 0010 0000 0011 Done Yes: 32 repetitions 2. Shift the Product register right 1 bit. No: < 32 repetitions 1. Test Product0 Product0 = 0Product0 = 1 1a. Add multiplicand to the left half of product & place the result in the left half of Product register 32nd repetition? Start Missing Multiplier
  • 14. Mcand: 0010 P: 0000 0011 1 P=P+Mcand Mcand: 0010 P: 0010 0011 Shr P Mcand: 0010 P: 0001 0001 2 P=P+Mcand Mcand: 0010 P: 0011 0001 Shr P Mcand: 0010 P: 0001 1000 3 0=>nop Mcand: 0010 P: 0001 1000 Shr P Mcand: 0010 P: 0000 1100 4 0=>nop Mcand: 0010 P: 0000 1100 Shr P Mcand: 0010 P: 0000 0110
  • 16. Booth algorithm gives a procedure for multiplying binary integers in signed – 2’s complement representation. I will illustrate the booth algorithm with the following example: Example, 2 x (- 4) 0010 * 1100 Step 1: Making the Booth table 1. From the two numbers, pick the number with the smallest difference between a series of consecutive numbers, and make it a multiplier. i.e., 0010 -- From 0 to 0 no change, 0 to 1 one change, 1 to 0 another change ,so there are two changes on this one 1100 -- From 1 to 1 no change, 1 to 0 one change, 0 to 0 no change, so there is only one change on this one. Therefore, multiplication of 2 x (– 4), where 2 ten (0010 two) is the multiplicand and (– 4) ten (1100two) is the multiplier.
  • 17. 2. Let X = 1100 (multiplier) Let Y = 0010 (multiplicand) Take the 2’s complement of Y and call it –Y –Y = 1110 3. Load the X value in the table. 4. Load 0 for X-1 value it should be the previous first least significant bit of X 5. Load 0 in U and V rows which will have the product of X and Y at the end of operation. 6. Make four rows for each cycle; this is because we are multiplying four bits numbers.
  • 18. Step 2: Booth Algorithm Look at the first least significant bits of the multiplier “X”, and the previous least significant bits of the multiplier “X - 1”. a. 0 0 Shift only 1 1 Shift only. 0 1 Add Y to U, and shift 1 0 Subtract Y from U, and shift or add (-Y) to U and shift b. Take U & V together and shift arithmetic right shift which preserves the sign bit of 2’s complement number. Thus a positive number remains positive, and a negative number remains negative. c. Shift X circular right shift because this will prevent us from using two registers for the X value.
  • 20. We have finished four cycles, so the answer is shown, in the last rows of U and V which is: 11111000 Now to easily check our calculations, we take the original question, 2 x -4. This becomes -8. -8 is the two's compliment of 8. 8 in eight bit binary is 00001000. Taking the two's compliment by the method previously described, we get the result 11111000, which is exactly the same as our Booths algorithm answer.