SlideShare a Scribd company logo
1 of 33
Computer Organization &Architecture
(CSIT-404)
B.Tech, 4th Sem CSIT
Overview
 Computer Arithmetic's
Addition and Subtraction
Tools compliment Representation
Signed Addition and Subtraction
 Multiplication Algorithms
 Division Algorithms
Booths Algorithm
Division Operation
Floating Point Arithmetic Operation
Design of Arithmetic unit
Unit-2
Computer Arithmetic
Computer Arithmetic’s
 Arithmetic Instruction Manipulate data to produce results necessary for
the solution of computational problem
 Four Basic Arithmetic Operations are – Addition, Subtraction,
Multiplication and Division
An arithmetic processor is the part of a processor unit that executes
arithmetic operations
Arithmetic operations can be performed for following data types
•Fixed point binary data in signed magnitude representation
•Fixed point binary data in signed 2’s complement representation
• Floating Point binary data
• Binary coded decimal data
Find 2’s complement of binary
number 10101110.
Addition and Subtraction
Example: Represent +9 and -9 in 7 bit-binary number
Only one way to represent + 9 ==> 0 001001
Three different ways to represent - 9:
In signed-magnitude: 1 001001
In signed-1's complement: 1 110110
In signed-2's complement: 1 110111
Fixed point numbers are represented either integer part only or fractional part only.
Representation of both positive and negative numbers
- Following 3 representations
Signed magnitude representation
Signed 1's complement representation
Signed 2's complement representation
Addition and Subtraction
Addition and Subtraction with Signed Magnitude Data
Operation Add
Magnitudes
Subtract Magnitudes
A>B A<B A=B
( + A ) + ( +
B )
+ ( A + B )
( + A ) + ( - B
)
+ ( A - B ) - ( B - A ) + ( A - B )
( - A ) + ( + B
)
- ( A - B ) + ( B - A ) + ( A - B )
( - A ) + ( - B ) - ( A + B )
( + A ) - ( + B
)
+ ( A - B ) - ( B - A ) + ( A - B )
( + A ) - ( - B ) + ( A + B )
( - A ) - ( + B ) - ( A + B )
( - A ) - ( - B ) - ( A - B ) + ( B - A ) + ( A - B )
Computer Arithmetic’s
 Addition (subtraction) Algorithm
 When the sign of A and B are identical (different) , add the
magnitudes and attach the sign of A to the result.
When the signs of A and B are different (identical), compare the
magnitudes and subtract the smaller number from the larger.
 Choose the sign of result to be same as A if A>B
 or the complement of sign of A if A<B
 if A=B subtract B from A and make the sign of result positive
Hardware Implementation
B Register
Complementer
Parallel Adder
A Register
Bs
E
AVF
As Load Sum
Input Carry
M (ModeControl)
Output Carry
Flow Chart for Add and Subtract Operation
Signed 2’s Complement Representation
 Addition :
 Addition of two numbers in signed 2’s complement form consists of
adding the numbers with the sign bits treated the same as the other
bits of the number. Carry out of sign bit is discarded
Sum is obtained by adding the content of AC and BR (including the
sign bit). Overflow bit is set to 1 if EX-OR of last two carries if 1
Subtraction :
Here Subtraction consists of first taking the 2’s complement of the
subtrahend and then adding it to minuend
Subtraction done by adding the content of AC to 2’s Complement of
BR.
Signed 2’s Complement Representation
Binary Multiplication
Sign of product determined from sign of Multiplicand and Multiplier , if same +ve else -ve
H/W implementation -Multiplication
For multiplication in hardware, process is slightly changed
1. In place of as Register equal to no. of multiplier bits, use
one adder and one Register
2. Instead of shifting multiplicand to left , partial product is
shifted right
3. When corresponding bit of multiplier is 0, no need to add
zero to partial product
H/W implementation -Multiplication
Flow Chart Binary Multiplication
Booth’s Multiplication Algorithm
Used for multiplication in Signed 2’s complement representation
It operates on the fact that strings of 0’s in the multiplier require no
addition but just shifting
And a string of 1’s in the multiplier from bit weight 2k to 2m can be
treated as 2k+1 – 2m
E.g. +14 (001110 ) here k=3, m=1 represented as 24-21 = 16-2 = 14
Thus M x 14= M x 24 – M x 21
Booth’s Multiplication Algorithm
Used for multiplication in Signed 2’s complement representation
Prior to shifting the multiplicand can be added to the partial product ,
subtracted from the partial product or left unchanged according to the
following rules :
1. The multiplicand is subtracted from partial product upon encountering
the first least significant 1 in the string of 1’s in the multiplier
2. The multiplicand is added to the partial product upon encountering the
first 0 (provided that there was a previous 1) in the string of 0’s in the
multiplier.
3. The partial product does not change when the multiplier bit is identical
to the previous multiplier bit
Booth’s Multiplication Algorithm
Example - Booth’s Multiplication Algorithm
Binary Division
Binary Division
For Division in hardware, process is slightly changed
1. Instead of shifting divisor to right, dividend or partial
remainder is shifted left
2. Subtraction achieved by adding A to 2’s complement of B
3. Information about Relative magnitude is available from
the end carry
Hardware components identical to that of multiplication
Flow Chart - Division
Example - Division
 The floating-point representation can implement operations for high
range values. The numerical evaluations are carried out using
floating-point values. It can create calculations easy, scientific
numbers are described as follows −
 The number 5,600,000 can be described as 0.56 * 107.
 Therefore, 0.56 is the mantissa and 7 is the value of the exponent.
 Binary numbers can also be described in exponential form. The
description of binary numbers in the exponential form is called
floating-point representation. The floating-point representation
breaks the number into two parts, the left-hand side is a signed.
fixed-point number known as a mantissa and the right-hand side of
the number is known as the exponent. The floating-point values are
also authorized with a sign; 0 denoting the positive value and 1
denoting the negative value.
 The general structure of floating-point representation of a binary
number −
x=(x0*20+x1*21+x2*22±−−∓b−(n−1)*2−(n−1) )
mantissa*2Exponent
In the following syntax, the decimal point is transferred left for negative
exponents of two and right for positive exponents of two. Both the mantissa and
the exponent are signed values enabling negative numbers and negative
exponents commonly.
Example − Convert 111101.1000110 into floating-point value.
111101.1000110 = 1.111011000110 * 25Converted to floating-point
value
→ Denotes negative sign value
 In this example, the integer value is converted to a floating-point
value by changing the radix point next to the signed integer and
scaling up the number to the exponential form by multiplying the
value with the base 2. The value remains unaltered and this phase
is known as the normalized method.
 Numbers too large for standard integer
representations or that have fractional
components are usually represented in
scientific notation, a form used commonly
by scientists and engineers.
• Examples:
4.25 ´ 101 10-3
-3.35 ´ 3 -1.42 ´ 102
Computer Architecture refers to those attributes of a system that have a direct impact on. the logical execution of a program.

More Related Content

Similar to Computer Architecture refers to those attributes of a system that have a direct impact on. the logical execution of a program.

Arithmetic Process in Computer Systems
Arithmetic Process in Computer SystemsArithmetic Process in Computer Systems
Arithmetic Process in Computer SystemsS N M P Simamora
 
Computer arithmetic operations.pptx
Computer arithmetic operations.pptxComputer arithmetic operations.pptx
Computer arithmetic operations.pptxssusera6fdd5
 
Integer represention
Integer representionInteger represention
Integer representionSaif Ullah
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptskatiarrahaman
 
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)IIUM
 
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
 
2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx
2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx
2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptxMtikuTadesse
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.pptzorogoh2
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptxbmangesh
 
Unit ii ca--arithmetic
Unit ii ca--arithmeticUnit ii ca--arithmetic
Unit ii ca--arithmeticPraba haran
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptSuryaKumarSahani
 
Arithmetic Microoperation.pdf
Arithmetic Microoperation.pdfArithmetic Microoperation.pdf
Arithmetic Microoperation.pdfHarshitJ4
 
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdfCS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdfAsst.prof M.Gokilavani
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionSuryaKumarSahani
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03thearticlenow
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsArti Parab Academics
 

Similar to Computer Architecture refers to those attributes of a system that have a direct impact on. the logical execution of a program. (20)

Arithmetic Process in Computer Systems
Arithmetic Process in Computer SystemsArithmetic Process in Computer Systems
Arithmetic Process in Computer Systems
 
Arithmetic circuits
Arithmetic circuitsArithmetic circuits
Arithmetic circuits
 
Computer arithmetic operations.pptx
Computer arithmetic operations.pptxComputer arithmetic operations.pptx
Computer arithmetic operations.pptx
 
Integer represention
Integer representionInteger represention
Integer represention
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Unit 2 Arithmetic
Unit 2 ArithmeticUnit 2 Arithmetic
Unit 2 Arithmetic
 
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual
 
2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx
2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx
2 Computer Arithmetic_hhbyhbjhhjjjjjb41.pptx
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
Unit ii ca--arithmetic
Unit ii ca--arithmeticUnit ii ca--arithmetic
Unit ii ca--arithmetic
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) ppt
 
Arithmetic Microoperation.pdf
Arithmetic Microoperation.pdfArithmetic Microoperation.pdf
Arithmetic Microoperation.pdf
 
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdfCS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf version
 
Operators and it's type
Operators and it's type Operators and it's type
Operators and it's type
 
Datarepresentation2
Datarepresentation2Datarepresentation2
Datarepresentation2
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
 

Recently uploaded

Twin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxTwin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxEran Akiva Sinbar
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayZachary Labe
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Heredity: Inheritance and Variation of Traits
Heredity: Inheritance and Variation of TraitsHeredity: Inheritance and Variation of Traits
Heredity: Inheritance and Variation of TraitsCharlene Llagas
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
insect anatomy and insect body wall and their physiology
insect anatomy and insect body wall and their  physiologyinsect anatomy and insect body wall and their  physiology
insect anatomy and insect body wall and their physiologyDrAnita Sharma
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxFarihaAbdulRasheed
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
TOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxTOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxdharshini369nike
 
Forest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are importantForest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are importantadityabhardwaj282
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 

Recently uploaded (20)

Twin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxTwin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Welcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work DayWelcome to GFDL for Take Your Child To Work Day
Welcome to GFDL for Take Your Child To Work Day
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Heredity: Inheritance and Variation of Traits
Heredity: Inheritance and Variation of TraitsHeredity: Inheritance and Variation of Traits
Heredity: Inheritance and Variation of Traits
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
insect anatomy and insect body wall and their physiology
insect anatomy and insect body wall and their  physiologyinsect anatomy and insect body wall and their  physiology
insect anatomy and insect body wall and their physiology
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
TOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptxTOTAL CHOLESTEROL (lipid profile test).pptx
TOTAL CHOLESTEROL (lipid profile test).pptx
 
Forest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are importantForest laws, Indian forest laws, why they are important
Forest laws, Indian forest laws, why they are important
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 

Computer Architecture refers to those attributes of a system that have a direct impact on. the logical execution of a program.

  • 2. Overview  Computer Arithmetic's Addition and Subtraction Tools compliment Representation Signed Addition and Subtraction  Multiplication Algorithms  Division Algorithms Booths Algorithm Division Operation Floating Point Arithmetic Operation Design of Arithmetic unit Unit-2 Computer Arithmetic
  • 3. Computer Arithmetic’s  Arithmetic Instruction Manipulate data to produce results necessary for the solution of computational problem  Four Basic Arithmetic Operations are – Addition, Subtraction, Multiplication and Division An arithmetic processor is the part of a processor unit that executes arithmetic operations Arithmetic operations can be performed for following data types •Fixed point binary data in signed magnitude representation •Fixed point binary data in signed 2’s complement representation • Floating Point binary data • Binary coded decimal data
  • 4. Find 2’s complement of binary number 10101110.
  • 5.
  • 6.
  • 7.
  • 8. Addition and Subtraction Example: Represent +9 and -9 in 7 bit-binary number Only one way to represent + 9 ==> 0 001001 Three different ways to represent - 9: In signed-magnitude: 1 001001 In signed-1's complement: 1 110110 In signed-2's complement: 1 110111 Fixed point numbers are represented either integer part only or fractional part only. Representation of both positive and negative numbers - Following 3 representations Signed magnitude representation Signed 1's complement representation Signed 2's complement representation
  • 9. Addition and Subtraction Addition and Subtraction with Signed Magnitude Data Operation Add Magnitudes Subtract Magnitudes A>B A<B A=B ( + A ) + ( + B ) + ( A + B ) ( + A ) + ( - B ) + ( A - B ) - ( B - A ) + ( A - B ) ( - A ) + ( + B ) - ( A - B ) + ( B - A ) + ( A - B ) ( - A ) + ( - B ) - ( A + B ) ( + A ) - ( + B ) + ( A - B ) - ( B - A ) + ( A - B ) ( + A ) - ( - B ) + ( A + B ) ( - A ) - ( + B ) - ( A + B ) ( - A ) - ( - B ) - ( A - B ) + ( B - A ) + ( A - B )
  • 10. Computer Arithmetic’s  Addition (subtraction) Algorithm  When the sign of A and B are identical (different) , add the magnitudes and attach the sign of A to the result. When the signs of A and B are different (identical), compare the magnitudes and subtract the smaller number from the larger.  Choose the sign of result to be same as A if A>B  or the complement of sign of A if A<B  if A=B subtract B from A and make the sign of result positive
  • 11. Hardware Implementation B Register Complementer Parallel Adder A Register Bs E AVF As Load Sum Input Carry M (ModeControl) Output Carry
  • 12. Flow Chart for Add and Subtract Operation
  • 13. Signed 2’s Complement Representation  Addition :  Addition of two numbers in signed 2’s complement form consists of adding the numbers with the sign bits treated the same as the other bits of the number. Carry out of sign bit is discarded Sum is obtained by adding the content of AC and BR (including the sign bit). Overflow bit is set to 1 if EX-OR of last two carries if 1 Subtraction : Here Subtraction consists of first taking the 2’s complement of the subtrahend and then adding it to minuend Subtraction done by adding the content of AC to 2’s Complement of BR.
  • 14.
  • 15. Signed 2’s Complement Representation
  • 16. Binary Multiplication Sign of product determined from sign of Multiplicand and Multiplier , if same +ve else -ve
  • 17.
  • 18. H/W implementation -Multiplication For multiplication in hardware, process is slightly changed 1. In place of as Register equal to no. of multiplier bits, use one adder and one Register 2. Instead of shifting multiplicand to left , partial product is shifted right 3. When corresponding bit of multiplier is 0, no need to add zero to partial product
  • 20. Flow Chart Binary Multiplication
  • 21.
  • 22. Booth’s Multiplication Algorithm Used for multiplication in Signed 2’s complement representation It operates on the fact that strings of 0’s in the multiplier require no addition but just shifting And a string of 1’s in the multiplier from bit weight 2k to 2m can be treated as 2k+1 – 2m E.g. +14 (001110 ) here k=3, m=1 represented as 24-21 = 16-2 = 14 Thus M x 14= M x 24 – M x 21
  • 23. Booth’s Multiplication Algorithm Used for multiplication in Signed 2’s complement representation Prior to shifting the multiplicand can be added to the partial product , subtracted from the partial product or left unchanged according to the following rules : 1. The multiplicand is subtracted from partial product upon encountering the first least significant 1 in the string of 1’s in the multiplier 2. The multiplicand is added to the partial product upon encountering the first 0 (provided that there was a previous 1) in the string of 0’s in the multiplier. 3. The partial product does not change when the multiplier bit is identical to the previous multiplier bit
  • 24.
  • 26. Example - Booth’s Multiplication Algorithm
  • 28. Binary Division For Division in hardware, process is slightly changed 1. Instead of shifting divisor to right, dividend or partial remainder is shifted left 2. Subtraction achieved by adding A to 2’s complement of B 3. Information about Relative magnitude is available from the end carry Hardware components identical to that of multiplication
  • 29. Flow Chart - Division
  • 31.  The floating-point representation can implement operations for high range values. The numerical evaluations are carried out using floating-point values. It can create calculations easy, scientific numbers are described as follows −  The number 5,600,000 can be described as 0.56 * 107.  Therefore, 0.56 is the mantissa and 7 is the value of the exponent.  Binary numbers can also be described in exponential form. The description of binary numbers in the exponential form is called floating-point representation. The floating-point representation breaks the number into two parts, the left-hand side is a signed. fixed-point number known as a mantissa and the right-hand side of the number is known as the exponent. The floating-point values are also authorized with a sign; 0 denoting the positive value and 1 denoting the negative value.  The general structure of floating-point representation of a binary number − x=(x0*20+x1*21+x2*22±−−∓b−(n−1)*2−(n−1) ) mantissa*2Exponent In the following syntax, the decimal point is transferred left for negative exponents of two and right for positive exponents of two. Both the mantissa and the exponent are signed values enabling negative numbers and negative exponents commonly.
  • 32. Example − Convert 111101.1000110 into floating-point value. 111101.1000110 = 1.111011000110 * 25Converted to floating-point value → Denotes negative sign value  In this example, the integer value is converted to a floating-point value by changing the radix point next to the signed integer and scaling up the number to the exponential form by multiplying the value with the base 2. The value remains unaltered and this phase is known as the normalized method.  Numbers too large for standard integer representations or that have fractional components are usually represented in scientific notation, a form used commonly by scientists and engineers. • Examples: 4.25 ´ 101 10-3 -3.35 ´ 3 -1.42 ´ 102

Editor's Notes

  1. Addition: for identical signs, add magnitude (+A)+(+B),(-A)+(-B) for different signs, compare magnitude and subtract small num from larger one. (+A) +(-B), (-A) +(+B