SlideShare a Scribd company logo
Floating point arithmetic
Representation of floating point
arithmetic
Operations
Normalization
Pit-Falls of floating point arithmetic
 There are two types of arithmetic
operations :-
Integer Arithmetic
Real – floating point arithmetic
Integer Arithmetic :- deals with
integer operands.
i.e. - num without fractional parts
Real Arithmetic :- use number with
fractional parts as operands and is
use
Real no. = mantissa * 10^exponent
COMPUTER
REPRESENTATION OF
FLOATING POINT NUMBERS
In the CPU, a 32-bit floating
point number is represented
using IEEE standard format as
follows:
S | EXPONENT | MANTISSA
where S is one bit, the EXPONENT
is 8 bits, and the MANTISSA is
23 bits.
 The mantissa
 represents the leading
significant bits in the number.
 It is made less than 1 and
greater than or equal to 0.1
 The exponent
 is used to adjust the position
of the binary point (as opposed
to a "decimal" point)
 In power of 10 and multiplies
with mantissa
 Normalization :-
Mantissa and Exponent have
their own independent signs
While storing no. of the
leading digit in the mantissa,
mantissa is always made non-
zero by appropriately shifting
it and adjusting the value of
the exponent
 The shifting of mantissa to the left
till its most significant digit is non-
zero is called normalization.
Arithmetic operations with
normalized floating point
numbers
 Addition
 Subtraction
 Multiplication
 Division
Addition :-
Consider a 4-digit decimal example
 9.999 × 101 + 1.610 × 10–1
1. Align decimal points
 Shift number with smaller exponent
 9.999 × 101 + 0.016 × 101
2. Add significant
 9.999 × 101 + 0.016 × 101 = 10.015 × 101
3. Normalize result & check for
over/underflow
4. Round and renormalize if necessary
Subtraction :-
Consider a 4-digit decimal example
 9.999 × 101 - 1.610 × 10–1
1. Align decimal points
 Shift number with smaller exponent
 9.999 × 101 - 0.016 × 101
2. Subtract significant
 9.999 × 101 - 0.016 × 101 = 9.983 × 101
3. Normalize result & check for
over/underflow
4. Round and renormalize if necessary
Multiplication :-
Consider a 4-digit decimal example
 1.110 × 1010 × 9.200 × 10–5
1. Add exponents
 New exponent = 10 + –5 = 5
2. Multiply significant
 1.110 × 9.200 = 10.212  10.212 × 105
3. Normalize result & check for over/underflow
 1.0212 × 106
4. Round and renormalize if necessary
 1.021 × 106
5. Determine sign of result from signs of
operands
 +1.021 × 106
Division :-
Consider a 4-digit decimal example
 1.110 × 1010 / 9.200 × 10–5
1. Subtract exponents
 New exponent = 10 – (–5) = 15
2. Divide significant
 1.110 / 9.200 = 0.12065  0.12065 ×
1015
3. Normalize result & check for
over/underflow
 1.2065 × 1014
4. Round and renormalize if necessary
5. Determine sign of result from signs of
operands
CBNST PPT, Floating point arithmetic,Normalization

More Related Content

What's hot

Data Structure and Algorithms Binary Search Tree
Data Structure and Algorithms Binary Search TreeData Structure and Algorithms Binary Search Tree
Data Structure and Algorithms Binary Search Tree
ManishPrajapati78
 
Principal source of optimization in compiler design
Principal source of optimization in compiler designPrincipal source of optimization in compiler design
Principal source of optimization in compiler design
Rajkumar R
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
Ankit Garg
 
Syntax-Directed Translation into Three Address Code
Syntax-Directed Translation into Three Address CodeSyntax-Directed Translation into Three Address Code
Syntax-Directed Translation into Three Address Code
sanchi29
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
Ankit Kumar
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
Anuj Modi
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
abdosaidgkv
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
Dr.MAYA NAYAK
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer Architecture
Abu Zaman
 
Unit 3 dsa LINKED LIST
Unit 3 dsa LINKED LISTUnit 3 dsa LINKED LIST
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
Mr McAlpine
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
Ameer Mehmood
 
Computer registers
Computer registersComputer registers
Computer registers
Jatin Grover
 
Access to non local names
Access to non local namesAccess to non local names
Access to non local names
Varsha Kumar
 
Indexing Data Structure
Indexing Data StructureIndexing Data Structure
Indexing Data Structure
Vivek Kantariya
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
Dr. C.V. Suresh Babu
 
Semantic Networks
Semantic NetworksSemantic Networks
Semantic Networks
Jenny Galino
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
lavanya marichamy
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
Ankit Surti
 

What's hot (20)

Data Structure and Algorithms Binary Search Tree
Data Structure and Algorithms Binary Search TreeData Structure and Algorithms Binary Search Tree
Data Structure and Algorithms Binary Search Tree
 
Principal source of optimization in compiler design
Principal source of optimization in compiler designPrincipal source of optimization in compiler design
Principal source of optimization in compiler design
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Syntax-Directed Translation into Three Address Code
Syntax-Directed Translation into Three Address CodeSyntax-Directed Translation into Three Address Code
Syntax-Directed Translation into Three Address Code
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
Datapath Design of Computer Architecture
Datapath Design of Computer ArchitectureDatapath Design of Computer Architecture
Datapath Design of Computer Architecture
 
Unit 3 dsa LINKED LIST
Unit 3 dsa LINKED LISTUnit 3 dsa LINKED LIST
Unit 3 dsa LINKED LIST
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
 
Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
 
Computer registers
Computer registersComputer registers
Computer registers
 
Access to non local names
Access to non local namesAccess to non local names
Access to non local names
 
Indexing Data Structure
Indexing Data StructureIndexing Data Structure
Indexing Data Structure
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Semantic Networks
Semantic NetworksSemantic Networks
Semantic Networks
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
 

Similar to CBNST PPT, Floating point arithmetic,Normalization

Floating Point Representation premium.pptx
Floating Point Representation premium.pptxFloating Point Representation premium.pptx
Floating Point Representation premium.pptx
shomikishpa
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
Aman anand kumar
 
number system: Floating Point representation.ppt
number system: Floating Point representation.pptnumber system: Floating Point representation.ppt
number system: Floating Point representation.ppt
NARENDRAKUMARCHAURAS1
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
Jeanie Delos Arcos
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
Forrester High School
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
cs19club
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
ececourse
 
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcBOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
Abhishek Rajpoot
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
gavhays
 
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsvDFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
vishalduriseti2
 
Counit2
Counit2Counit2
Counit2
Himanshu Dua
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
Janki Shah
 
Computer Representation of Numbers and.pptx
Computer Representation of Numbers and.pptxComputer Representation of Numbers and.pptx
Computer Representation of Numbers and.pptx
Temesgen Geta
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
MariaJoseph591921
 
SD & D Real Numbers
SD & D Real NumbersSD & D Real Numbers
SD & D Real Numbers
Forrester High School
 
IEEE Floating Point
IEEE Floating PointIEEE Floating Point
IEEE Floating Point
Jason Ricardo Thomas
 
A floating-point adder (IEEE 754 floating-point.pptx
A floating-point adder (IEEE 754 floating-point.pptxA floating-point adder (IEEE 754 floating-point.pptx
A floating-point adder (IEEE 754 floating-point.pptx
NiveditaAcharyya2035
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
skatiarrahaman
 
Chapter 6
Chapter 6Chapter 6
Chapter 02
Chapter 02Chapter 02
Chapter 02
mn_mikaelian
 

Similar to CBNST PPT, Floating point arithmetic,Normalization (20)

Floating Point Representation premium.pptx
Floating Point Representation premium.pptxFloating Point Representation premium.pptx
Floating Point Representation premium.pptx
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
number system: Floating Point representation.ppt
number system: Floating Point representation.pptnumber system: Floating Point representation.ppt
number system: Floating Point representation.ppt
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcBOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etc
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsvDFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
DFP Unit-3.pptdddddghsdjcbsjjhsjsvdcsvnbsv
 
Counit2
Counit2Counit2
Counit2
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Computer Representation of Numbers and.pptx
Computer Representation of Numbers and.pptxComputer Representation of Numbers and.pptx
Computer Representation of Numbers and.pptx
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
 
SD & D Real Numbers
SD & D Real NumbersSD & D Real Numbers
SD & D Real Numbers
 
IEEE Floating Point
IEEE Floating PointIEEE Floating Point
IEEE Floating Point
 
A floating-point adder (IEEE 754 floating-point.pptx
A floating-point adder (IEEE 754 floating-point.pptxA floating-point adder (IEEE 754 floating-point.pptx
A floating-point adder (IEEE 754 floating-point.pptx
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Chapter 02
Chapter 02Chapter 02
Chapter 02
 

Recently uploaded

Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...
IJECEIAES
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
ravindarpurohit26
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 

Recently uploaded (20)

Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 

CBNST PPT, Floating point arithmetic,Normalization

  • 1. Floating point arithmetic Representation of floating point arithmetic Operations Normalization Pit-Falls of floating point arithmetic
  • 2.  There are two types of arithmetic operations :- Integer Arithmetic Real – floating point arithmetic Integer Arithmetic :- deals with integer operands. i.e. - num without fractional parts Real Arithmetic :- use number with fractional parts as operands and is use Real no. = mantissa * 10^exponent
  • 3. COMPUTER REPRESENTATION OF FLOATING POINT NUMBERS In the CPU, a 32-bit floating point number is represented using IEEE standard format as follows: S | EXPONENT | MANTISSA where S is one bit, the EXPONENT is 8 bits, and the MANTISSA is 23 bits.
  • 4.  The mantissa  represents the leading significant bits in the number.  It is made less than 1 and greater than or equal to 0.1  The exponent  is used to adjust the position of the binary point (as opposed to a "decimal" point)  In power of 10 and multiplies with mantissa
  • 5.  Normalization :- Mantissa and Exponent have their own independent signs While storing no. of the leading digit in the mantissa, mantissa is always made non- zero by appropriately shifting it and adjusting the value of the exponent  The shifting of mantissa to the left till its most significant digit is non- zero is called normalization.
  • 6. Arithmetic operations with normalized floating point numbers  Addition  Subtraction  Multiplication  Division
  • 7. Addition :- Consider a 4-digit decimal example  9.999 × 101 + 1.610 × 10–1 1. Align decimal points  Shift number with smaller exponent  9.999 × 101 + 0.016 × 101 2. Add significant  9.999 × 101 + 0.016 × 101 = 10.015 × 101 3. Normalize result & check for over/underflow 4. Round and renormalize if necessary
  • 8. Subtraction :- Consider a 4-digit decimal example  9.999 × 101 - 1.610 × 10–1 1. Align decimal points  Shift number with smaller exponent  9.999 × 101 - 0.016 × 101 2. Subtract significant  9.999 × 101 - 0.016 × 101 = 9.983 × 101 3. Normalize result & check for over/underflow 4. Round and renormalize if necessary
  • 9. Multiplication :- Consider a 4-digit decimal example  1.110 × 1010 × 9.200 × 10–5 1. Add exponents  New exponent = 10 + –5 = 5 2. Multiply significant  1.110 × 9.200 = 10.212  10.212 × 105 3. Normalize result & check for over/underflow  1.0212 × 106 4. Round and renormalize if necessary  1.021 × 106 5. Determine sign of result from signs of operands  +1.021 × 106
  • 10. Division :- Consider a 4-digit decimal example  1.110 × 1010 / 9.200 × 10–5 1. Subtract exponents  New exponent = 10 – (–5) = 15 2. Divide significant  1.110 / 9.200 = 0.12065  0.12065 × 1015 3. Normalize result & check for over/underflow  1.2065 × 1014 4. Round and renormalize if necessary 5. Determine sign of result from signs of operands