SlideShare a Scribd company logo
1 of 14
Storing Real Number
Representation of numbers
• There are two major approaches to store real numbers (i.e.,
numbers with fractional component) in modern computing.
• These are (i) Fixed Point Notation and (ii) Floating Point
Notation.
• In fixed point notation, there are a fixed number of digits after
the decimal point, whereas floating point number allows for a
varying number of digits after the decimal point.
Fixed-Point Representation −
• This representation has fixed number of bits for integer part and
for fractional part.
• For example, if given fixed-point representation is IIII.FFFF, then
you can store minimum value is 0000.0001 and maximum value
is 9999.9999.
• There are three parts of a fixed-point number representation:
• the sign field,
• integer field, and
• fractional field.
We can represent these numbers using:
•Signed representation:
•1’s complement representation:
•2’s complementation representation:
•-14 can be represented as:
• Example −Assume number is using 32-bit format which reserve
1 bit for the sign, 15 bits for the integer part and 16 bits for the
fractional part.
• Then, -43.625 is represented as following:
• Where, 0 is used to represent + and 1 is used to represent -
• 000000000101011 is 15 bit binary value for decimal 43 and
1010000000000000 is 16 bit binary value for fractional 0.625.
• The advantage of using a fixed-point representation is
performance and disadvantage is relatively limited range of values
that they can represent.
• So, it is usually inadequate for numerical analysis as it does not
allow enough numbers and accuracy. A number whose
representation exceeds 32 bits would have to be stored inexactly
Floating-Point Representation −
• This representation does not reserve a specific number of bits
for the integer part or the fractional part.
• Instead it reserves
• a certain number of bits for the number (called the mantissa or
significand) and
• a certain number of bits to say where within that number the decimal
place sits (called the exponent).
• The floating number representation of a number has two part:
• the first part represents a signed fixed point number called mantissa.
• The second part of designates the position of the decimal (or binary)
point and is called the exponent.
• The fixed point mantissa may be fraction or an integer.
• Floating -point is always interpreted to represent a number in the
following form: Mxre.
•
• Only the mantissa m and the exponent e are physically
represented in the register (including their sign).
• A floating-point binary number is represented in a similar
manner except that is uses base 2 for the exponent.
• A floating-point number is said to be normalized if the most
significant digit of the mantissa is 1.
• Example −Suppose number is using 32-bit format:
• the 1 bit sign bit,
• 8 bits for signed exponent,
• 23 bits for the fractional part.
• The leading bit 1 is not stored (as it is always 1 for a normalized
number) and is referred to as a “hidden bit”.
• Then −53.5 is normalized as -53.5=(-110101.1)2=(-
1.101011)x25 , which is represented as following below,

More Related Content

Similar to Representation of numbers.pptx

Similar to Representation of numbers.pptx (20)

Lecture 1
Lecture 1Lecture 1
Lecture 1
 
CS304PC:Computer Organization and Architecture Session 17 Complements and fix...
CS304PC:Computer Organization and Architecture Session 17 Complements and fix...CS304PC:Computer Organization and Architecture Session 17 Complements and fix...
CS304PC:Computer Organization and Architecture Session 17 Complements and fix...
 
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
 
Constant, variables, data types
Constant, variables, data typesConstant, variables, data types
Constant, variables, data types
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
 
Memory management of datatypes
Memory management of datatypesMemory management of datatypes
Memory management of datatypes
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
Computerarchitecture by csa
Computerarchitecture by csaComputerarchitecture by csa
Computerarchitecture by csa
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
 
Ieee+floating
Ieee+floatingIeee+floating
Ieee+floating
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
Bca 2nd sem-u-1.9 digital logic circuits, digital component floting and fixed...
Bca 2nd sem-u-1.9 digital logic circuits, digital component floting and fixed...Bca 2nd sem-u-1.9 digital logic circuits, digital component floting and fixed...
Bca 2nd sem-u-1.9 digital logic circuits, digital component floting and fixed...
 
Chapter 9.pdf
Chapter 9.pdfChapter 9.pdf
Chapter 9.pdf
 
Introduction to Binary Arithmetic
Introduction to Binary ArithmeticIntroduction to Binary Arithmetic
Introduction to Binary Arithmetic
 
B.sc cs-ii-u-1.9 digital logic circuits, digital component floting and fixed ...
B.sc cs-ii-u-1.9 digital logic circuits, digital component floting and fixed ...B.sc cs-ii-u-1.9 digital logic circuits, digital component floting and fixed ...
B.sc cs-ii-u-1.9 digital logic circuits, digital component floting and fixed ...
 
Number system part 1
Number  system part 1Number  system part 1
Number system part 1
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 

Recently uploaded

Recently uploaded (20)

Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
How to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in PakistanHow to Check GPS Location with a Live Tracker in Pakistan
How to Check GPS Location with a Live Tracker in Pakistan
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 

Representation of numbers.pptx

  • 1.
  • 3. Representation of numbers • There are two major approaches to store real numbers (i.e., numbers with fractional component) in modern computing. • These are (i) Fixed Point Notation and (ii) Floating Point Notation. • In fixed point notation, there are a fixed number of digits after the decimal point, whereas floating point number allows for a varying number of digits after the decimal point.
  • 4. Fixed-Point Representation − • This representation has fixed number of bits for integer part and for fractional part. • For example, if given fixed-point representation is IIII.FFFF, then you can store minimum value is 0000.0001 and maximum value is 9999.9999. • There are three parts of a fixed-point number representation: • the sign field, • integer field, and • fractional field.
  • 5. We can represent these numbers using: •Signed representation: •1’s complement representation: •2’s complementation representation: •-14 can be represented as:
  • 6. • Example −Assume number is using 32-bit format which reserve 1 bit for the sign, 15 bits for the integer part and 16 bits for the fractional part. • Then, -43.625 is represented as following:
  • 7. • Where, 0 is used to represent + and 1 is used to represent - • 000000000101011 is 15 bit binary value for decimal 43 and 1010000000000000 is 16 bit binary value for fractional 0.625. • The advantage of using a fixed-point representation is performance and disadvantage is relatively limited range of values that they can represent. • So, it is usually inadequate for numerical analysis as it does not allow enough numbers and accuracy. A number whose representation exceeds 32 bits would have to be stored inexactly
  • 8.
  • 9. Floating-Point Representation − • This representation does not reserve a specific number of bits for the integer part or the fractional part. • Instead it reserves • a certain number of bits for the number (called the mantissa or significand) and • a certain number of bits to say where within that number the decimal place sits (called the exponent).
  • 10. • The floating number representation of a number has two part: • the first part represents a signed fixed point number called mantissa. • The second part of designates the position of the decimal (or binary) point and is called the exponent. • The fixed point mantissa may be fraction or an integer. • Floating -point is always interpreted to represent a number in the following form: Mxre. •
  • 11. • Only the mantissa m and the exponent e are physically represented in the register (including their sign). • A floating-point binary number is represented in a similar manner except that is uses base 2 for the exponent. • A floating-point number is said to be normalized if the most significant digit of the mantissa is 1.
  • 12.
  • 13. • Example −Suppose number is using 32-bit format: • the 1 bit sign bit, • 8 bits for signed exponent, • 23 bits for the fractional part. • The leading bit 1 is not stored (as it is always 1 for a normalized number) and is referred to as a “hidden bit”.
  • 14. • Then −53.5 is normalized as -53.5=(-110101.1)2=(- 1.101011)x25 , which is represented as following below,