SlideShare a Scribd company logo
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).pdf
TamiratDejene1
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
Balakrishna Chowdary
 
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.pdf
HarshitJ4
 
Integer represention
Integer representionInteger represention
Integer represention
Saif Ullah
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
janani thirupathi
 
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
 
Ch_10.pptx.pdf
Ch_10.pptx.pdfCh_10.pptx.pdf
Ch_10.pptx.pdf
SujanTimalsina5
 
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
 
Half & Full Adder
Half &  Full AdderHalf &  Full Adder
Half & Full Adder
Habibur Rahman
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9
wajanga
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
RavikumarR77
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
student
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
Sayan Chakraborty
 
Multiplication algorithm
Multiplication algorithmMultiplication algorithm
Multiplication algorithm
Gaurav Subham
 
unit 3.pptx
unit 3.pptxunit 3.pptx
unit 3.pptx
ragu nath
 
Basics of K map
Basics of K mapBasics of K map
Basics of K map
yogeshvaidya13
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
Krishnavenimanickam2
 

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

standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
2023240532
 

Recently uploaded (20)

standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
 

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