SlideShare a Scribd company logo
1 of 25
What are Real Numbers?
Real Numbers include:
 Whole Numbers (like 1,2,3,4, etc)
 Rational Numbers (like 3/4, 0.125, 0.333..., 1.1, etc )
 Irrational Numbers (like π, √3, etc )
 Real Numbers can also be positive, negative or zero
What are Real Numbers?
Real Numbers include:
 Whole Numbers (like 1,2,3,4, etc)
 Rational Numbers (like 3/4, 0.125, 0.333..., 1.1, etc )
 Irrational Numbers (like π, √3, etc )
 Real Numbers can also be positive, negative or zero
15 3148
-272/7
99/10014.75
0.000123
100.159 π
√3
340.1155
22.9
In Computing, real numbers are also known as floating point numbers
Binary Real Numbers
What do real numbers look like in binary?
In binary, the numbers after the decimal point have the following place
values:
1/2 1/4 1/8 1/16 1/32 1/64 1/128
Binary Real Numbers
What do real numbers look like in binary?
In binary, the numbers after the decimal point have the following place
values:
1/2 1/4 1/8 1/16 1/32 1/64 1/128
So, 8.5 could be represented as:
1000 before the decimal point (8)
and 1 after the decimal point (0.5)
8.5 = 1000.1
Binary Real Numbers
What do real numbers look like in binary?
In binary, the numbers after the decimal point have the following place
values:
1/2 1/4 1/8 1/16 1/32 1/64 1/128
So, 14.625 could be represented as:
1110 before the decimal point (14)
and 101 after the decimal point (0.625)
14.625 = 1110.101
Standard Form
Standard form is a scientific notation of representing numbers as a base
number and an exponent.
Standard Form
Standard form is a scientific notation of representing numbers as a base
number and an exponent.
Using this notation:
The decimal number 8674.26 can be represented as
8.67426 x 103
mantissa = 8.67426
base = 10
exponent = 3
Standard Form
Standard form is a scientific notation of representing numbers as a base
number and an exponent.
Using this notation:
The decimal number 753.34 can be represented as
7.5334 x 102
mantissa = 7.5334
base = 10
exponent = 2
Standard Form
Standard form is a scientific notation of representing numbers as a base
number and an exponent.
Using this notation:
The decimal number 0.000634 can be represented as
6.34 x 10-3
mantissa = 6.34
base = 10
exponent = -3
Standard Form
Standard form is a scientific notation of representing numbers as a base
number and an exponent.
Any number can be represented in any number base in the form m x be
Standard Form
Standard form is a scientific notation of representing numbers as a base
number and an exponent.
Any number can be represented in any number base in the form m x be
This also applies to binary numbers, which have a base of 2.
Binary numbers can be represented as m x 2e
Floating Point Notation
In floating point notation, the real number is stored as 2 separate bits of data
A storage location called the mantissa holds the complete number without
the point.
Floating Point Notation
In floating point notation, the real number is stored as 2 separate bits of data
A storage location called the mantissa holds the complete number without
the point.
A storage location called the exponent holds the number of places that the
point must be moved in the original number to place it at the left hand side.
Floating Point Notation
What is the exponent of 10110.110?
The exponent is 5, because the decimal point has to be moved 5 places
to get it to the left hand side.
The exponent would be represented as 0101 in binary
Floating Point Notation
How would 10110.110 be stored using 8 bits for the mantissa and 4 bits for
the exponent?
We have already calculated that the exponent is 5 or 0101.
10110.110 = 10110110 x 25
= 10110110 x 20101
It is not necessary to store the ‘x’ sign or the base because it is always 2.
Mantissa Exponent
Floating Point Notation
How would 24.5 be stored using 8 bits for the mantissa and 4 bits for the
exponent?
Remember, in binary, the numbers after the decimal point have the following
place values:
1/2 1/4 1/8 1/16 1/32 1/64 1/128
24 has the binary value 11000
0.5 (or 1/2) has the binary value .1
24.5 = 0011000.1
Floating Point Notation
How would 0011000.1 be stored using 8 bits for the mantissa and 4 bits for
the exponent?
Floating Point Notation
How would 0011000.1 be stored using 8 bits for the mantissa and 4 bits for
the exponent?
The exponent is 7 because decimal point has to move 7 places to the left
0011000.1 = 00110001 x 27
= 00110001 x 20111
Mantissa Exponent
Accuracy
Store 110.0011001 in floating point representation, using 8 bits for the
mantissa and 4 bits for the exponent.
Mantissa Exponent
The mantissa only holds 8 bits and so cannot store the last two bits
These two bits cannot be stored in the system, and so they are forgotten.
The number stored in the system is 110.00110 which is less accurate that its
initial value.
Accuracy
If the size of the mantissa is increased then the accuracy of the
number held is increased.
Mantissa (10 bits) Exponent
Range
If increasing the size of the mantissa increases the accuracy of the number
held, what will be the effect of increasing the size of the
exponent?
Using two bits for the exponent, the exponent can have the value 0-3
Mantissa Exponent (2 bits)
This means the number stored can be in the range
.00000000 (0)
to
111.11111 (7.96875)
Range
Increasing the exponent to three bits, it can now store the values 0-7
Mantissa Exponent (3 bits)
This means the number stored can be in the range
.00000000 (0)
to
1111111.1 (127.5)
If the size of the exponent is increased then the range of the
numbers which can be stored is increased.
Floating Point Notation
Advantage:
We can store very large and very small numbers using
a small number of bits
Disadvantage:
The accuracy of the number being represented is lost
because numbers get rounded
Credits
Higher Computing – Data Representation – Representation of Real
Numbers
Produced by P. Greene and adapted by R. G. Simpson for the City of
Edinburgh Council 2004
Adapted by M. Cunningham 2010
All images licenced under Creative Commons 3.0
• Happy Pi Day by Mykl Roventine

More Related Content

What's hot

Number system.pdf
Number system.pdfNumber system.pdf
Number system.pdfDeepuGuna
 
1.1/1.2 Properties of Real Numbers
1.1/1.2 Properties of Real Numbers1.1/1.2 Properties of Real Numbers
1.1/1.2 Properties of Real Numbersleblance
 
Real numbers system
Real numbers systemReal numbers system
Real numbers systemwfmcmillian
 
CBSE Class 10 Mathematics Real Numbers Topic
CBSE Class 10 Mathematics Real Numbers TopicCBSE Class 10 Mathematics Real Numbers Topic
CBSE Class 10 Mathematics Real Numbers TopicEdvie
 
Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)rfant
 
Real Numbers
Real NumbersReal Numbers
Real NumbersSarah525
 
Rational irrational and_real_number_practice
Rational irrational and_real_number_practiceRational irrational and_real_number_practice
Rational irrational and_real_number_practiceeixarc
 
Power point presentation
Power point presentation Power point presentation
Power point presentation saranyavipin222
 
Introduction Combined Number And Dp
Introduction Combined Number And DpIntroduction Combined Number And Dp
Introduction Combined Number And DpAwais Khan
 
Properties of Real Numbers
Properties of Real NumbersProperties of Real Numbers
Properties of Real Numbersrfant
 
Math for 800 03 real numbers
Math for 800   03 real numbersMath for 800   03 real numbers
Math for 800 03 real numbersEdwin Lapuerta
 

What's hot (20)

Number system.pdf
Number system.pdfNumber system.pdf
Number system.pdf
 
The real number system
The real number systemThe real number system
The real number system
 
Real number system
Real number systemReal number system
Real number system
 
1.1/1.2 Properties of Real Numbers
1.1/1.2 Properties of Real Numbers1.1/1.2 Properties of Real Numbers
1.1/1.2 Properties of Real Numbers
 
types of numbers
types of numberstypes of numbers
types of numbers
 
Real numbers system
Real numbers systemReal numbers system
Real numbers system
 
04 real numbers
04   real numbers04   real numbers
04 real numbers
 
CBSE Class 10 Mathematics Real Numbers Topic
CBSE Class 10 Mathematics Real Numbers TopicCBSE Class 10 Mathematics Real Numbers Topic
CBSE Class 10 Mathematics Real Numbers Topic
 
Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)
 
Real Numbers
Real NumbersReal Numbers
Real Numbers
 
Rational irrational and_real_number_practice
Rational irrational and_real_number_practiceRational irrational and_real_number_practice
Rational irrational and_real_number_practice
 
Real numbers
Real numbersReal numbers
Real numbers
 
Power point presentation
Power point presentation Power point presentation
Power point presentation
 
Ppt on real numbers
Ppt on real numbersPpt on real numbers
Ppt on real numbers
 
Introduction Combined Number And Dp
Introduction Combined Number And DpIntroduction Combined Number And Dp
Introduction Combined Number And Dp
 
Realnumbersystems
RealnumbersystemsRealnumbersystems
Realnumbersystems
 
Properties of Real Numbers
Properties of Real NumbersProperties of Real Numbers
Properties of Real Numbers
 
Number system part 1
Number  system part 1Number  system part 1
Number system part 1
 
Real Number System
Real Number SystemReal Number System
Real Number System
 
Math for 800 03 real numbers
Math for 800   03 real numbersMath for 800   03 real numbers
Math for 800 03 real numbers
 

Viewers also liked (15)

SD & D Representing Text
SD & D Representing TextSD & D Representing Text
SD & D Representing Text
 
SD & D Types of programming language
SD & D Types of programming languageSD & D Types of programming language
SD & D Types of programming language
 
SD &D Binary Units
SD &D Binary UnitsSD &D Binary Units
SD &D Binary Units
 
Vector graphics
Vector graphicsVector graphics
Vector graphics
 
Introduction to web design
Introduction to web designIntroduction to web design
Introduction to web design
 
SD & D Documentation
SD & D  DocumentationSD & D  Documentation
SD & D Documentation
 
Audio and Video
Audio and VideoAudio and Video
Audio and Video
 
ISDD Testing
ISDD TestingISDD Testing
ISDD Testing
 
SD & D analysis
SD & D analysisSD & D analysis
SD & D analysis
 
SD & D Testing
SD & D TestingSD & D Testing
SD & D Testing
 
Bitmap graphics
Bitmap graphicsBitmap graphics
Bitmap graphics
 
Joke task
Joke taskJoke task
Joke task
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Virtual machines, emulators and mobile devices
Virtual machines, emulators and mobile devicesVirtual machines, emulators and mobile devices
Virtual machines, emulators and mobile devices
 
SD & D High and low level languages
SD & D High and low level languagesSD & D High and low level languages
SD & D High and low level languages
 

Similar to SD & D Real Numbers (20)

Floating Point Representation premium.pptx
Floating Point Representation premium.pptxFloating Point Representation premium.pptx
Floating Point Representation premium.pptx
 
Ch 4
Ch 4Ch 4
Ch 4
 
decimals-comp-packet.pdf
decimals-comp-packet.pdfdecimals-comp-packet.pdf
decimals-comp-packet.pdf
 
Digital electronics number system notes
Digital electronics number system notesDigital electronics number system notes
Digital electronics number system notes
 
Number system
Number systemNumber system
Number system
 
Numsys
NumsysNumsys
Numsys
 
Number System
Number SystemNumber System
Number System
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Number bases
Number basesNumber bases
Number bases
 
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptxLEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
 
NUMBER SYSTEM.pptx
NUMBER  SYSTEM.pptxNUMBER  SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
Grade5(Test 2).pptx
Grade5(Test 2).pptxGrade5(Test 2).pptx
Grade5(Test 2).pptx
 
Number+system (1)
Number+system (1)Number+system (1)
Number+system (1)
 
Secondary Lecture
Secondary LectureSecondary Lecture
Secondary Lecture
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Data representation
Data representationData representation
Data representation
 
Es272 ch2
Es272 ch2Es272 ch2
Es272 ch2
 
Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
 

More from Forrester High School (20)

Program Design
Program DesignProgram Design
Program Design
 
Database Evaluation
Database EvaluationDatabase Evaluation
Database Evaluation
 
Testing SQL
Testing SQLTesting SQL
Testing SQL
 
SQL
SQLSQL
SQL
 
Database Query Design
Database Query DesignDatabase Query Design
Database Query Design
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
Compound Keys
Compound KeysCompound Keys
Compound Keys
 
Entity Occurrence Diagrams
Entity Occurrence DiagramsEntity Occurrence Diagrams
Entity Occurrence Diagrams
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Standard Algorithms
Standard AlgorithmsStandard Algorithms
Standard Algorithms
 
File Handling
File HandlingFile Handling
File Handling
 
Python Predefined Functions
Python Predefined FunctionsPython Predefined Functions
Python Predefined Functions
 
Python Substrings
Python SubstringsPython Substrings
Python Substrings
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
 
Sub-programs
Sub-programsSub-programs
Sub-programs
 
Records in Python
Records in PythonRecords in Python
Records in Python
 
Parallel arrays in python
Parallel arrays in pythonParallel arrays in python
Parallel arrays in python
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

SD & D Real Numbers

  • 1.
  • 2. What are Real Numbers? Real Numbers include:  Whole Numbers (like 1,2,3,4, etc)  Rational Numbers (like 3/4, 0.125, 0.333..., 1.1, etc )  Irrational Numbers (like π, √3, etc )  Real Numbers can also be positive, negative or zero
  • 3. What are Real Numbers? Real Numbers include:  Whole Numbers (like 1,2,3,4, etc)  Rational Numbers (like 3/4, 0.125, 0.333..., 1.1, etc )  Irrational Numbers (like π, √3, etc )  Real Numbers can also be positive, negative or zero 15 3148 -272/7 99/10014.75 0.000123 100.159 π √3 340.1155 22.9 In Computing, real numbers are also known as floating point numbers
  • 4. Binary Real Numbers What do real numbers look like in binary? In binary, the numbers after the decimal point have the following place values: 1/2 1/4 1/8 1/16 1/32 1/64 1/128
  • 5. Binary Real Numbers What do real numbers look like in binary? In binary, the numbers after the decimal point have the following place values: 1/2 1/4 1/8 1/16 1/32 1/64 1/128 So, 8.5 could be represented as: 1000 before the decimal point (8) and 1 after the decimal point (0.5) 8.5 = 1000.1
  • 6. Binary Real Numbers What do real numbers look like in binary? In binary, the numbers after the decimal point have the following place values: 1/2 1/4 1/8 1/16 1/32 1/64 1/128 So, 14.625 could be represented as: 1110 before the decimal point (14) and 101 after the decimal point (0.625) 14.625 = 1110.101
  • 7. Standard Form Standard form is a scientific notation of representing numbers as a base number and an exponent.
  • 8. Standard Form Standard form is a scientific notation of representing numbers as a base number and an exponent. Using this notation: The decimal number 8674.26 can be represented as 8.67426 x 103 mantissa = 8.67426 base = 10 exponent = 3
  • 9. Standard Form Standard form is a scientific notation of representing numbers as a base number and an exponent. Using this notation: The decimal number 753.34 can be represented as 7.5334 x 102 mantissa = 7.5334 base = 10 exponent = 2
  • 10. Standard Form Standard form is a scientific notation of representing numbers as a base number and an exponent. Using this notation: The decimal number 0.000634 can be represented as 6.34 x 10-3 mantissa = 6.34 base = 10 exponent = -3
  • 11. Standard Form Standard form is a scientific notation of representing numbers as a base number and an exponent. Any number can be represented in any number base in the form m x be
  • 12. Standard Form Standard form is a scientific notation of representing numbers as a base number and an exponent. Any number can be represented in any number base in the form m x be This also applies to binary numbers, which have a base of 2. Binary numbers can be represented as m x 2e
  • 13. Floating Point Notation In floating point notation, the real number is stored as 2 separate bits of data A storage location called the mantissa holds the complete number without the point.
  • 14. Floating Point Notation In floating point notation, the real number is stored as 2 separate bits of data A storage location called the mantissa holds the complete number without the point. A storage location called the exponent holds the number of places that the point must be moved in the original number to place it at the left hand side.
  • 15. Floating Point Notation What is the exponent of 10110.110? The exponent is 5, because the decimal point has to be moved 5 places to get it to the left hand side. The exponent would be represented as 0101 in binary
  • 16. Floating Point Notation How would 10110.110 be stored using 8 bits for the mantissa and 4 bits for the exponent? We have already calculated that the exponent is 5 or 0101. 10110.110 = 10110110 x 25 = 10110110 x 20101 It is not necessary to store the ‘x’ sign or the base because it is always 2. Mantissa Exponent
  • 17. Floating Point Notation How would 24.5 be stored using 8 bits for the mantissa and 4 bits for the exponent? Remember, in binary, the numbers after the decimal point have the following place values: 1/2 1/4 1/8 1/16 1/32 1/64 1/128 24 has the binary value 11000 0.5 (or 1/2) has the binary value .1 24.5 = 0011000.1
  • 18. Floating Point Notation How would 0011000.1 be stored using 8 bits for the mantissa and 4 bits for the exponent?
  • 19. Floating Point Notation How would 0011000.1 be stored using 8 bits for the mantissa and 4 bits for the exponent? The exponent is 7 because decimal point has to move 7 places to the left 0011000.1 = 00110001 x 27 = 00110001 x 20111 Mantissa Exponent
  • 20. Accuracy Store 110.0011001 in floating point representation, using 8 bits for the mantissa and 4 bits for the exponent. Mantissa Exponent The mantissa only holds 8 bits and so cannot store the last two bits These two bits cannot be stored in the system, and so they are forgotten. The number stored in the system is 110.00110 which is less accurate that its initial value.
  • 21. Accuracy If the size of the mantissa is increased then the accuracy of the number held is increased. Mantissa (10 bits) Exponent
  • 22. Range If increasing the size of the mantissa increases the accuracy of the number held, what will be the effect of increasing the size of the exponent? Using two bits for the exponent, the exponent can have the value 0-3 Mantissa Exponent (2 bits) This means the number stored can be in the range .00000000 (0) to 111.11111 (7.96875)
  • 23. Range Increasing the exponent to three bits, it can now store the values 0-7 Mantissa Exponent (3 bits) This means the number stored can be in the range .00000000 (0) to 1111111.1 (127.5) If the size of the exponent is increased then the range of the numbers which can be stored is increased.
  • 24. Floating Point Notation Advantage: We can store very large and very small numbers using a small number of bits Disadvantage: The accuracy of the number being represented is lost because numbers get rounded
  • 25. Credits Higher Computing – Data Representation – Representation of Real Numbers Produced by P. Greene and adapted by R. G. Simpson for the City of Edinburgh Council 2004 Adapted by M. Cunningham 2010 All images licenced under Creative Commons 3.0 • Happy Pi Day by Mykl Roventine