SlideShare a Scribd company logo
1 of 36
Download to read offline
Arithmetic Operation
1
Addition and subtraction of Signed-
magnitude numbers
2
• In the above table, last column is needed to
prevent a negative zero.
• i.e. when 2 equal numbers are subtracted, the
result should be +0 not -0
3
Complement data
• suppose we want to find how -28 would be
expressed in two's complement notation.
• 1st we write out 28 in binary form: 0001 1100
• Then we invert the digits. 0 becomes 1, 1
becomes 0 i.e. 1110 0011
• Then we add 1.
• 1110 0100
• That is how one would write -28 in 8 bit
binary. 4
Complement data
+33 is represented as:
0010 0001
And -33 is represented as:
1101 1111 which is the 2’s complement of
0010 0001
5
Sign Bit
Leftmost bit of a binary number represents
Sign bit
0 for positive
1 for negative
If sign bit is 1, entire number is represented in
2’s complement form
6
Hardware Implementation
7
• Registers A and B
• Sign Flip Flops As and Bs
• Subtraction is done by adding A to the 2’s
complement of B
• Output carry is transferred to flip Flop E
• AVF(Add-overflow Flip Flop) holds overflow
bit when A and B are added.
8
• Addition A+B is done by parallel adder
• S (Sum) output of parallel adder is applied to
input of register A
• Complementer provides Output of B or
Complement of B(depending on state of Mode
control M)
• M signal also applied to input carry of adder.
When M=0, output of B is transferred to
Adder, Input carry is 0, output of adder= sum
A+B
9
• When M=1, 1’s complement of B is applied to
adder, input carry is 1, output S=A+B+1
(i.e equal to A plus 2’s complement of B)
Which is equal to subtraction A-B
10
Addition
• In addition, an augend and an addend are
added to find a sum.
In the following
6 + 3 = 9
6 is the augend,
3 is the addend
and 9 is the sum:
11
Subtraction
• In subtraction, a subtrahend is subtracted
from a minuend to find a difference.
• In the following:
9 – 3 = 6
• 9 is the minuend,
• 3 is the subtrahend,
• and 6 is the difference.
12
Flowchart for Add & Subtract
13
Sign same
Signs
different
Signs
different
Signs same
Flowchart for Add & Subtract:
Explanation
• 2 signs As and Bs are compared by EX-OR gate
• If output =0 , signs are same
• If output=1, signs are different
• If same signs in ADD (i.e. output=0) : Add
magnitudes
• If different signs in SUBTRACT(output=1) then
Add magnitudes as:
EA A+B
Here EA is register that combines E and A 14
• Carry in E after addition constitutes
OVERFLOW if it is =1
• Value of E is transferred to AVF
• If signs are different for ADD, & identical for
SUBTRACT, then MAGNITUDES ARE
SUBTRACTED
• i.e. add A to 2’s complement of B
• AVF cleared to 0(bcoz no overflow occurs in
subtraction)
15
E=1 means
• A>=B
• And number in A is correct result
E=0 means
A<B
Then take 2’s complement of value in A
A A+1
16
Signed 2’s Complement Add & Sub
17
Algo. For adding & subtracting numbers in
signed 2’s complement representation
18
MULTIPLICATION
• Multiplication
In multiplication, a multiplicand and
a multiplier are multiplied to find a product.
e.g. In the following equation,
6 x 3 = 18
6 is the multiplicand,
3 is the multiplier
18 is the product.
19
Multiplication
20
Hardware of multiply operation
21
Flowchart of multiply operation
22
Practice question 1
Question: Multiplicand= 23
Multiplier=19
Show the contents of E, A, Q, SC during
multiplication process.
23
Solution
24
Practice question 2
Show the contents of registers E, A, Q and SC
during the process of multiplication of 2 binary
numbers:
11111(multiplicand) and 10101(multiplier).
The signs are not included.
25
Solution
26
(final result in AQ)
BOOTH ALGORITHM FOR
MULTIPLICATION OF SIGNED 2’s
COMPLEMENT NUMBERS
27
Booth Algorithm
• Check multiplier bits and shift partial
product
• Before shifting, multiplicand may be
added/subtracted from partial product or left
unchanged according to following rules
28
Rules :
29
Hardware for Booth Algorithm
30
Booth Multiplication
31
Practice Question 1
Booth Multiplication
• Given multiplicand= -9 and multiplier= -13.
Show the step by step multiplication using
Booth Algorithm. Show the contents of AC,
QR, Qn+1 and SC.
32
solution
33
Final product stored in AC, QR i.e. 0001110101
Practice Question
Show the step by step multiplication process
using booth algorithm for multiplying following
numbers. Assume 5 bit registers that hold
signed numbers. The multiplicand in both cases
is +15
a. (+15) X (+13)
b. (+15) X (-13)
34
Solution (a)
35
Solution (b)
36

More Related Content

Similar to Arithmatic Ch 10 (4).pdf

Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfTamiratDejene1
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...mayurjagdale4
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...mayurjagdale4
 
Arithmetic Microoperation.pdf
Arithmetic Microoperation.pdfArithmetic Microoperation.pdf
Arithmetic Microoperation.pdfHarshitJ4
 
Integer represention
Integer representionInteger represention
Integer representionSaif Ullah
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...Arti Parab Academics
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual Shankar Gangaju
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9wajanga
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.pptRavikumarR77
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rulesstudent
 
Multiplication algorithm
Multiplication algorithmMultiplication algorithm
Multiplication algorithmGaurav Subham
 

Similar to Arithmatic Ch 10 (4).pdf (20)

Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...
 
Arithmetic Microoperation.pdf
Arithmetic Microoperation.pdfArithmetic Microoperation.pdf
Arithmetic Microoperation.pdf
 
Integer represention
Integer representionInteger represention
Integer represention
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
 
Ch_10.pptx.pdf
Ch_10.pptx.pdfCh_10.pptx.pdf
Ch_10.pptx.pdf
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual
 
Half & Full Adder
Half &  Full AdderHalf &  Full Adder
Half & Full Adder
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9
 
2's complement
2's complement2's complement
2's complement
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
 
Multiplication algorithm
Multiplication algorithmMultiplication algorithm
Multiplication algorithm
 
unit 3.pptx
unit 3.pptxunit 3.pptx
unit 3.pptx
 
Basics of K map
Basics of K mapBasics of K map
Basics of K map
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 

Recently uploaded

Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Voces Mineras
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...ThinkInnovation
 
Predictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesPredictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesBoston Institute of Analytics
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样wsppdmt
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token PredictionNABLAS株式会社
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeBoston Institute of Analytics
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...yulianti213969
 
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...rightmanforbloodline
 
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...varanasisatyanvesh
 
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontangobat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontangsiskavia95
 
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTSDBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTSSnehalVinod
 
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...Payal Garg #K09
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024patrickdtherriault
 
bams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxbams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxJocylDuran
 

Recently uploaded (20)

Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
 
Predictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesPredictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting Techniques
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
 
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
 
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontangobat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
 
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTSDBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
 
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
bams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxbams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptx
 

Arithmatic Ch 10 (4).pdf

  • 2. Addition and subtraction of Signed- magnitude numbers 2
  • 3. • In the above table, last column is needed to prevent a negative zero. • i.e. when 2 equal numbers are subtracted, the result should be +0 not -0 3
  • 4. Complement data • suppose we want to find how -28 would be expressed in two's complement notation. • 1st we write out 28 in binary form: 0001 1100 • Then we invert the digits. 0 becomes 1, 1 becomes 0 i.e. 1110 0011 • Then we add 1. • 1110 0100 • That is how one would write -28 in 8 bit binary. 4
  • 5. Complement data +33 is represented as: 0010 0001 And -33 is represented as: 1101 1111 which is the 2’s complement of 0010 0001 5
  • 6. Sign Bit Leftmost bit of a binary number represents Sign bit 0 for positive 1 for negative If sign bit is 1, entire number is represented in 2’s complement form 6
  • 8. • Registers A and B • Sign Flip Flops As and Bs • Subtraction is done by adding A to the 2’s complement of B • Output carry is transferred to flip Flop E • AVF(Add-overflow Flip Flop) holds overflow bit when A and B are added. 8
  • 9. • Addition A+B is done by parallel adder • S (Sum) output of parallel adder is applied to input of register A • Complementer provides Output of B or Complement of B(depending on state of Mode control M) • M signal also applied to input carry of adder. When M=0, output of B is transferred to Adder, Input carry is 0, output of adder= sum A+B 9
  • 10. • When M=1, 1’s complement of B is applied to adder, input carry is 1, output S=A+B+1 (i.e equal to A plus 2’s complement of B) Which is equal to subtraction A-B 10
  • 11. Addition • In addition, an augend and an addend are added to find a sum. In the following 6 + 3 = 9 6 is the augend, 3 is the addend and 9 is the sum: 11
  • 12. Subtraction • In subtraction, a subtrahend is subtracted from a minuend to find a difference. • In the following: 9 – 3 = 6 • 9 is the minuend, • 3 is the subtrahend, • and 6 is the difference. 12
  • 13. Flowchart for Add & Subtract 13 Sign same Signs different Signs different Signs same
  • 14. Flowchart for Add & Subtract: Explanation • 2 signs As and Bs are compared by EX-OR gate • If output =0 , signs are same • If output=1, signs are different • If same signs in ADD (i.e. output=0) : Add magnitudes • If different signs in SUBTRACT(output=1) then Add magnitudes as: EA A+B Here EA is register that combines E and A 14
  • 15. • Carry in E after addition constitutes OVERFLOW if it is =1 • Value of E is transferred to AVF • If signs are different for ADD, & identical for SUBTRACT, then MAGNITUDES ARE SUBTRACTED • i.e. add A to 2’s complement of B • AVF cleared to 0(bcoz no overflow occurs in subtraction) 15
  • 16. E=1 means • A>=B • And number in A is correct result E=0 means A<B Then take 2’s complement of value in A A A+1 16
  • 17. Signed 2’s Complement Add & Sub 17
  • 18. Algo. For adding & subtracting numbers in signed 2’s complement representation 18
  • 19. MULTIPLICATION • Multiplication In multiplication, a multiplicand and a multiplier are multiplied to find a product. e.g. In the following equation, 6 x 3 = 18 6 is the multiplicand, 3 is the multiplier 18 is the product. 19
  • 21. Hardware of multiply operation 21
  • 22. Flowchart of multiply operation 22
  • 23. Practice question 1 Question: Multiplicand= 23 Multiplier=19 Show the contents of E, A, Q, SC during multiplication process. 23
  • 25. Practice question 2 Show the contents of registers E, A, Q and SC during the process of multiplication of 2 binary numbers: 11111(multiplicand) and 10101(multiplier). The signs are not included. 25
  • 27. BOOTH ALGORITHM FOR MULTIPLICATION OF SIGNED 2’s COMPLEMENT NUMBERS 27
  • 28. Booth Algorithm • Check multiplier bits and shift partial product • Before shifting, multiplicand may be added/subtracted from partial product or left unchanged according to following rules 28
  • 30. Hardware for Booth Algorithm 30
  • 32. Practice Question 1 Booth Multiplication • Given multiplicand= -9 and multiplier= -13. Show the step by step multiplication using Booth Algorithm. Show the contents of AC, QR, Qn+1 and SC. 32
  • 33. solution 33 Final product stored in AC, QR i.e. 0001110101
  • 34. Practice Question Show the step by step multiplication process using booth algorithm for multiplying following numbers. Assume 5 bit registers that hold signed numbers. The multiplicand in both cases is +15 a. (+15) X (+13) b. (+15) X (-13) 34