SlideShare a Scribd company logo
1 of 18
FLOATING POINT
REPRESENTATION OF
NUMBERS
WHAT IS COMPUTER
ARITHMETIC ?
COMPUTER ARITHMETIC is a field of
COMPUTER SCIENCE that investigates how
computers should represent numbers &
perform operations on them…
COMPUTER
ARITHMETIC
TWO TYPES OF COMPUTER ARITHMETIC
INTEGER
ARITHMETIC
REAL
ARITHMETIC
INTEGER ARITHMETIC
Arithmetic without fractions. A
computer performing integer arithmetic
ignores any fractions that are derived….
REAL ARITHMETIC
Arithmetic which uses numbers with fractional
parts & is used in most computations…
REAL
ARITHMETIC
TWO TYPES OF REAL ARITHMETIC
FIXED POINT
ARITHMETIC
FLOATING POINT
ARITHMETIC
FIXED POINT ARITHMETIC
In computing, FIXED-POINT number representation is a real
data type for a number. With the help of fixed number
representation ,data is converted into binary form, and then
data is processed, stored & used by the system
Sign bit Integral part Fractional part
1 bit(0 or 1) 9 bits 6 bits
The fixed-point numbers in binary uses a sign bit. A positive
number has a sign bit 0,while a negative number has a sign bit 1
Sign bit
Integral part
The integral part is of different lengths at different places. It
depends on the register’s size, like in an 8-bit register, integral
part is 4 bits…
Fractional part
Fractional part is also of different lengths at different places. It
depends on the register’s size, like in an 8-bit register, integral
part is of 3 bits
8 bits = 1 sign bit + 4 bits (integral) + 3bits (fractional part)
16 bits = 1 sign bit + 9 bits (integral) + 6 bits (fractional part)
•
•
= assigned as sign bit
= assigned as integral part
= assigned as fractional part
• = assigned as assumed binary point
Number is 4.5
Convert the number into binary form ,
4.5 = 100.1
Represent binary number in Fixed point notation
HOW TO WRITE THE NUMBER IN FIXED-POINT
NOTATION
0 0 1 0 0 1 0 0
Magnitude
 the maximum and minimum (in magnitude) numbers that may be
stored are:
111111111.1111112 = (29 - 1) + (1 - 2-6) (Maximum)
= 511.98437510
000000000.0000012 = 2-6 (Minimum)
= 0.01562510
Magnitude of fixed point representation : 0.01562510 to 511.98437510
This range is quite insufficient in practice and so a different rule is
adopted to represent real numbers.
FLOATING POINT REPRESENTATION
FLOATING POINT
NOTATION
SCIENTIFIC
NOTATION
NORMALIZED
NOTATION
Scientific Notation
Method of representing numbers into a× 𝒃𝒆 form. Scientific notation
is further converted into floating point notation because floating
notation only accepts scientific notation.
For example-
Number = 376.423 (its not scientific notation )
Number in scientific notation = 37.6423× 𝟏𝟎𝟏
or 3.76423× 𝟏𝟎𝟐
Normalized Notation
Where m means MANTISSA , b means BASE , e means
EXPONENTIAL
m * 𝒃𝒆
It is a special case of scientific notation. Normalized means The
shifting of the mantissa to the left till its most significant bit is non-
zero.
Normalized notation-
Sign bit
The fixed-point numbers in binary uses a sign bit. A positive number has a sign
bit 0,while a negative number has a sign bit 1. In floating point representation,
sign of a number always depends on mantissa, not on exponent. Hence sign bit
in the format is always for mantissa and not for the exponent.
Mantissa
Mantissa part is of different length at a difference place . It depends on the size
of the register like in 16 bit register, mantissa part is of 9 bits.
Exponent
Exponent is the power of the number. It depends on the registers' size; like in
the 16 bit register , exponent part is 7 bits. Excess 16,64,128,512 are used to
store exponent in this format.
Four things are used to represent a floating point number
Sign of Mantissa
Sign of Exponent
Magnitude of Mantissa
Magnitude of Exponent
The number 1011.0101 x 27
is represented in this notation as-
0.10110101 x 𝟐𝟏𝟏 = 0.10110101E01011
Where mantissa is 0.10110101 & the exponent is 1011
0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1
Mantissa (9 bits) Exponent(7bits)
Sign of
mantissa
Sign of exponent
Implied binary
point
Magnitude
 The range of numbers (magnitude) that may be stored will be:
Maximum = 0.11111111E0111111
= (1 – 2−8) x 𝟐(𝟐𝟔−𝟏)
≅ 263
Minimum = 0.10000000E1111111
= 2−1 x 𝟐−(𝟐𝟔−𝟏)
= 2−64
Magnitude of floating point representation: 2−64 to 263
This range is much larger than the range 29 to 2-6 obtained with the fixed point
representation
Calculation(mantissa)
n=-8
∑ (2 n)=2 -1 +2 -2 +…+2 -8
n=-1
=(1-2 -8 )
Calculation(exponent)
n=5
∑ (2 n)=2 0 +2 1 +…+2 5
n=5
=(2 6 -1)
THANK
YOU

More Related Content

What's hot

Data types and operators in vb
Data types and operators  in vbData types and operators  in vb
Data types and operators in vballdesign
 
MS-Excel Formulas and Functions
MS-Excel Formulas and FunctionsMS-Excel Formulas and Functions
MS-Excel Formulas and FunctionsP. SUNDARI ARUN
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version Historyvoltaincx
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilersVairavel C
 
Formatted input and output
Formatted input and outputFormatted input and output
Formatted input and outputOnline
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design MAHASREEM
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure pptNalinNishant3
 
Assembly language
Assembly languageAssembly language
Assembly languagegaurav jain
 
LR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingLR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingR Islam
 
String in programming language in c or c++
 String in programming language  in c or c++  String in programming language  in c or c++
String in programming language in c or c++ Samsil Arefin
 
Java Input Output (java.io.*)
Java Input Output (java.io.*)Java Input Output (java.io.*)
Java Input Output (java.io.*)Om Ganesh
 
Lecture 04 syntax analysis
Lecture 04 syntax analysisLecture 04 syntax analysis
Lecture 04 syntax analysisIffat Anjum
 

What's hot (20)

Data types and operators in vb
Data types and operators  in vbData types and operators  in vb
Data types and operators in vb
 
MS-Excel Formulas and Functions
MS-Excel Formulas and FunctionsMS-Excel Formulas and Functions
MS-Excel Formulas and Functions
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version History
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilers
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Formatted input and output
Formatted input and outputFormatted input and output
Formatted input and output
 
Program activation records
Program activation recordsProgram activation records
Program activation records
 
MACRO PROCESSOR
MACRO PROCESSORMACRO PROCESSOR
MACRO PROCESSOR
 
Thread
ThreadThread
Thread
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 
Introduction to data structure ppt
Introduction to data structure pptIntroduction to data structure ppt
Introduction to data structure ppt
 
Compilers
CompilersCompilers
Compilers
 
CS8391 Data Structures 2 mark Questions - Anna University Questions
CS8391 Data Structures 2 mark Questions - Anna University QuestionsCS8391 Data Structures 2 mark Questions - Anna University Questions
CS8391 Data Structures 2 mark Questions - Anna University Questions
 
Assembly language
Assembly languageAssembly language
Assembly language
 
LR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingLR(1) and SLR(1) parsing
LR(1) and SLR(1) parsing
 
Python programming : Control statements
Python programming : Control statementsPython programming : Control statements
Python programming : Control statements
 
String in programming language in c or c++
 String in programming language  in c or c++  String in programming language  in c or c++
String in programming language in c or c++
 
Back patching
Back patchingBack patching
Back patching
 
Java Input Output (java.io.*)
Java Input Output (java.io.*)Java Input Output (java.io.*)
Java Input Output (java.io.*)
 
Lecture 04 syntax analysis
Lecture 04 syntax analysisLecture 04 syntax analysis
Lecture 04 syntax analysis
 

Similar to Floating Point Representation premium.pptx

Neumerical Methods.pptx
Neumerical Methods.pptxNeumerical Methods.pptx
Neumerical Methods.pptxPayelDalal
 
CBNST PPT, Floating point arithmetic,Normalization
CBNST PPT, Floating point arithmetic,NormalizationCBNST PPT, Floating point arithmetic,Normalization
CBNST PPT, Floating point arithmetic,NormalizationAmberSinghal1
 
Representation of numbers.pptx
Representation of numbers.pptxRepresentation of numbers.pptx
Representation of numbers.pptxssuserb7effa
 
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
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdfmiftah88
 
data representation
 data representation data representation
data representationHaroon_007
 
dtei-180910104911-converted.pptx
dtei-180910104911-converted.pptxdtei-180910104911-converted.pptx
dtei-180910104911-converted.pptxdeepaMS4
 
Data representation
Data representationData representation
Data representationManish Kumar
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental Aman anand kumar
 
Data Reprersentation
Data Reprersentation  Data Reprersentation
Data Reprersentation Kamal Acharya
 

Similar to Floating Point Representation premium.pptx (20)

Neumerical Methods.pptx
Neumerical Methods.pptxNeumerical Methods.pptx
Neumerical Methods.pptx
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Unit 2 Arithmetic
Unit 2 ArithmeticUnit 2 Arithmetic
Unit 2 Arithmetic
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
SD & D Real Numbers
SD & D Real NumbersSD & D Real Numbers
SD & D Real Numbers
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
CBNST PPT, Floating point arithmetic,Normalization
CBNST PPT, Floating point arithmetic,NormalizationCBNST PPT, Floating point arithmetic,Normalization
CBNST PPT, Floating point arithmetic,Normalization
 
Representation of numbers.pptx
Representation of numbers.pptxRepresentation of numbers.pptx
Representation of numbers.pptx
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Number System
Number SystemNumber System
Number System
 
Number system part 1
Number  system part 1Number  system part 1
Number system part 1
 
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
 
Module 2_Data representations.pdf
Module 2_Data representations.pdfModule 2_Data representations.pdf
Module 2_Data representations.pdf
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
data representation
 data representation data representation
data representation
 
dtei-180910104911-converted.pptx
dtei-180910104911-converted.pptxdtei-180910104911-converted.pptx
dtei-180910104911-converted.pptx
 
Data representation
Data representationData representation
Data representation
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
Data Reprersentation
Data Reprersentation  Data Reprersentation
Data Reprersentation
 

Recently uploaded

BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 

Recently uploaded (20)

BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 

Floating Point Representation premium.pptx

  • 2. WHAT IS COMPUTER ARITHMETIC ? COMPUTER ARITHMETIC is a field of COMPUTER SCIENCE that investigates how computers should represent numbers & perform operations on them…
  • 3. COMPUTER ARITHMETIC TWO TYPES OF COMPUTER ARITHMETIC INTEGER ARITHMETIC REAL ARITHMETIC
  • 4. INTEGER ARITHMETIC Arithmetic without fractions. A computer performing integer arithmetic ignores any fractions that are derived…. REAL ARITHMETIC Arithmetic which uses numbers with fractional parts & is used in most computations…
  • 5. REAL ARITHMETIC TWO TYPES OF REAL ARITHMETIC FIXED POINT ARITHMETIC FLOATING POINT ARITHMETIC
  • 6. FIXED POINT ARITHMETIC In computing, FIXED-POINT number representation is a real data type for a number. With the help of fixed number representation ,data is converted into binary form, and then data is processed, stored & used by the system Sign bit Integral part Fractional part 1 bit(0 or 1) 9 bits 6 bits
  • 7. The fixed-point numbers in binary uses a sign bit. A positive number has a sign bit 0,while a negative number has a sign bit 1 Sign bit Integral part The integral part is of different lengths at different places. It depends on the register’s size, like in an 8-bit register, integral part is 4 bits… Fractional part Fractional part is also of different lengths at different places. It depends on the register’s size, like in an 8-bit register, integral part is of 3 bits
  • 8. 8 bits = 1 sign bit + 4 bits (integral) + 3bits (fractional part) 16 bits = 1 sign bit + 9 bits (integral) + 6 bits (fractional part) • • = assigned as sign bit = assigned as integral part = assigned as fractional part • = assigned as assumed binary point
  • 9. Number is 4.5 Convert the number into binary form , 4.5 = 100.1 Represent binary number in Fixed point notation HOW TO WRITE THE NUMBER IN FIXED-POINT NOTATION 0 0 1 0 0 1 0 0
  • 10. Magnitude  the maximum and minimum (in magnitude) numbers that may be stored are: 111111111.1111112 = (29 - 1) + (1 - 2-6) (Maximum) = 511.98437510 000000000.0000012 = 2-6 (Minimum) = 0.01562510 Magnitude of fixed point representation : 0.01562510 to 511.98437510 This range is quite insufficient in practice and so a different rule is adopted to represent real numbers.
  • 11. FLOATING POINT REPRESENTATION FLOATING POINT NOTATION SCIENTIFIC NOTATION NORMALIZED NOTATION
  • 12. Scientific Notation Method of representing numbers into a× 𝒃𝒆 form. Scientific notation is further converted into floating point notation because floating notation only accepts scientific notation. For example- Number = 376.423 (its not scientific notation ) Number in scientific notation = 37.6423× 𝟏𝟎𝟏 or 3.76423× 𝟏𝟎𝟐
  • 13. Normalized Notation Where m means MANTISSA , b means BASE , e means EXPONENTIAL m * 𝒃𝒆 It is a special case of scientific notation. Normalized means The shifting of the mantissa to the left till its most significant bit is non- zero. Normalized notation-
  • 14. Sign bit The fixed-point numbers in binary uses a sign bit. A positive number has a sign bit 0,while a negative number has a sign bit 1. In floating point representation, sign of a number always depends on mantissa, not on exponent. Hence sign bit in the format is always for mantissa and not for the exponent. Mantissa Mantissa part is of different length at a difference place . It depends on the size of the register like in 16 bit register, mantissa part is of 9 bits. Exponent Exponent is the power of the number. It depends on the registers' size; like in the 16 bit register , exponent part is 7 bits. Excess 16,64,128,512 are used to store exponent in this format.
  • 15. Four things are used to represent a floating point number Sign of Mantissa Sign of Exponent Magnitude of Mantissa Magnitude of Exponent
  • 16. The number 1011.0101 x 27 is represented in this notation as- 0.10110101 x 𝟐𝟏𝟏 = 0.10110101E01011 Where mantissa is 0.10110101 & the exponent is 1011 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 Mantissa (9 bits) Exponent(7bits) Sign of mantissa Sign of exponent Implied binary point
  • 17. Magnitude  The range of numbers (magnitude) that may be stored will be: Maximum = 0.11111111E0111111 = (1 – 2−8) x 𝟐(𝟐𝟔−𝟏) ≅ 263 Minimum = 0.10000000E1111111 = 2−1 x 𝟐−(𝟐𝟔−𝟏) = 2−64 Magnitude of floating point representation: 2−64 to 263 This range is much larger than the range 29 to 2-6 obtained with the fixed point representation Calculation(mantissa) n=-8 ∑ (2 n)=2 -1 +2 -2 +…+2 -8 n=-1 =(1-2 -8 ) Calculation(exponent) n=5 ∑ (2 n)=2 0 +2 1 +…+2 5 n=5 =(2 6 -1)