SlideShare a Scribd company logo
Convertion of single-precision IEEE
754 number into a floating-point
decimal value
By : NIKHIL ARORA
(www.internetnotes.in)
STEP 1:
First, put the bits in three groups.
1 10000001 10110011001100110011010
31 30 23 22 0
EXAMPLE:
1 10000001 10110011001100110011010
Bit 31 (the leftmost bit) show the sign of the
number.
EXAMPLE:
1 10000001 10110011001100110011010
Bits 23-30 (the next 8 bits) are the exponent.
EXAMPLE:
1 10000001 10110011001100110011010
Bits 0-22 (on the right) give the fraction
STEP 2:
Now, look at the sign bit.
If this bit is a 1, the number is negative.
If it is 0, the number is positive.
1 10000001 10110011001100110011010
This bit is 1, so the number is negative
STEP 3:
• Get the exponent and the correct bias.
The exponent is simply a positive binary
number.
10000001bin = 129ten
Remember that we will have to subtract a bias
from this exponent to find the power of 2.
Since this is a single-precision number, the
bias is 127.
STEP 4:
• Convert the fraction string into base ten.
This is the trickiest step. The binary string represents a fraction, so conversion is a
little different.
Binary fractions look like this:
0.1 = (1/2) = 2-1
0.01 = (1/4) = 2-2
0.001 = (1/8) = 2-3
So, for this example, we multiply each digit by the corresponding power of 2:
0.10110011001100110011010bin = 1*2-1+ 0*2-2 + 1*2-3 + 1*2-4 + 0*2-5 + 0 * 2-6 + ...
0.10110011001100110011010bin = 1/2 + 1/8 + 1/16 + ...
Note that this number is just an approximation on some decimal number. There
will most likely be some error. In this case, the fraction is
about 0.7000000476837158.
STEP 5:
• This is all the information we need. We can
put these numbers in the expression:
(-1)sign bit * (1+fraction) * 2 exponent - bias
= (-1)1 * (1.7000000476837158) * 2 129-127
= -6.8
The answer is approximately -6.8.
THANKYOU
GATE CBSE NET KVS
PREVIOUS YEAR PAPERS SOLVED
WITH EXPLANATION ON
WWW.INTERNETNOTES.IN

More Related Content

What's hot

Representation Of Data
Representation Of DataRepresentation Of Data
Representation Of Data
gavhays
 
Data types
Data typesData types
Data types
gavhays
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 

What's hot (20)

06 floating point
06 floating point06 floating point
06 floating point
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Representation Of Data
Representation Of DataRepresentation Of Data
Representation Of Data
 
Data types
Data typesData types
Data types
 
Representation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarRepresentation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.Sivakumar
 
Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
 
Binary coded decimal r004
Binary coded decimal   r004Binary coded decimal   r004
Binary coded decimal r004
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
 
Code conversion r006
Code conversion r006Code conversion r006
Code conversion r006
 
Fixed Point Conversion
Fixed Point ConversionFixed Point Conversion
Fixed Point Conversion
 
Signed Binary Numbers
Signed Binary NumbersSigned Binary Numbers
Signed Binary Numbers
 
Number systems r002
Number systems  r002Number systems  r002
Number systems r002
 
Binary true ppt
Binary true pptBinary true ppt
Binary true ppt
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
1sand2scomplement r004
1sand2scomplement  r0041sand2scomplement  r004
1sand2scomplement r004
 
Number Systems and Binary Aritmetics
Number Systems and Binary AritmeticsNumber Systems and Binary Aritmetics
Number Systems and Binary Aritmetics
 
1’s and 2’s complements
1’s and 2’s complements1’s and 2’s complements
1’s and 2’s complements
 

Viewers also liked

Power point copello sebastian
Power point copello sebastianPower point copello sebastian
Power point copello sebastian
Sebastian Copello
 
CinematographyNEWUPLOAD
CinematographyNEWUPLOADCinematographyNEWUPLOAD
CinematographyNEWUPLOAD
Adam Green
 
Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...
Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...
Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...
Johana Sanchez
 
Medios de almacenamiento
Medios de almacenamientoMedios de almacenamiento
Medios de almacenamiento
Alam Jamir
 
Trabajo final
Trabajo finalTrabajo final
Trabajo final
terrok9
 

Viewers also liked (20)

critica 2
critica 2critica 2
critica 2
 
Antero Resources Company Overview - January 2016
Antero Resources Company Overview - January 2016Antero Resources Company Overview - January 2016
Antero Resources Company Overview - January 2016
 
Un granamor
Un granamorUn granamor
Un granamor
 
Actividad de victoria
Actividad de victoriaActividad de victoria
Actividad de victoria
 
Power point copello sebastian
Power point copello sebastianPower point copello sebastian
Power point copello sebastian
 
Riesgos de-higiene
Riesgos de-higieneRiesgos de-higiene
Riesgos de-higiene
 
Business Study Trip 2013
Business Study Trip 2013Business Study Trip 2013
Business Study Trip 2013
 
Mobile Website Presentation
Mobile Website PresentationMobile Website Presentation
Mobile Website Presentation
 
Cómo elegir una pagina web
Cómo elegir una pagina webCómo elegir una pagina web
Cómo elegir una pagina web
 
Реликвие вещи
Реликвие  вещиРеликвие  вещи
Реликвие вещи
 
Photoshoot plan
Photoshoot planPhotoshoot plan
Photoshoot plan
 
CinematographyNEWUPLOAD
CinematographyNEWUPLOADCinematographyNEWUPLOAD
CinematographyNEWUPLOAD
 
Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...
Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...
Grupo alberto,johana,paulo,victor,roger 05 estados financieros consolidados 3...
 
Alan spring into success presentation
Alan   spring into success presentationAlan   spring into success presentation
Alan spring into success presentation
 
El abrazo
El abrazoEl abrazo
El abrazo
 
Costume Design
Costume DesignCostume Design
Costume Design
 
Etiskafonder2002
Etiskafonder2002Etiskafonder2002
Etiskafonder2002
 
Medios de almacenamiento
Medios de almacenamientoMedios de almacenamiento
Medios de almacenamiento
 
Trabajo final
Trabajo finalTrabajo final
Trabajo final
 
Definiciones
DefinicionesDefiniciones
Definiciones
 

Similar to Convertion of single precision

3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
RavikumarR77
 
Chapter 02 Data Types
Chapter 02   Data TypesChapter 02   Data Types
Chapter 02 Data Types
Nathan Yeung
 
Alu1
Alu1Alu1
Binary octal
Binary octalBinary octal
Binary octal
drdipo4
 
Binary reference guide csit vn1202
Binary reference guide csit vn1202Binary reference guide csit vn1202
Binary reference guide csit vn1202
jrwalker2012
 

Similar to Convertion of single precision (20)

3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
2's complement
2's complement2's complement
2's complement
 
Floating_point_representation.pdf
Floating_point_representation.pdfFloating_point_representation.pdf
Floating_point_representation.pdf
 
Number system
Number systemNumber system
Number system
 
Chapter 02 Data Types
Chapter 02   Data TypesChapter 02   Data Types
Chapter 02 Data Types
 
Alu1
Alu1Alu1
Alu1
 
Data representation
Data representationData representation
Data representation
 
lec2_BinaryArithmetic.ppt
lec2_BinaryArithmetic.pptlec2_BinaryArithmetic.ppt
lec2_BinaryArithmetic.ppt
 
Binary
BinaryBinary
Binary
 
Ncp computer appls num sys1 pramod
Ncp computer appls  num sys1 pramodNcp computer appls  num sys1 pramod
Ncp computer appls num sys1 pramod
 
Binary octal
Binary octalBinary octal
Binary octal
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Data types - things you have to know!
Data types - things you have to know!Data types - things you have to know!
Data types - things you have to know!
 
1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy
1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy
1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy
 
Binary reference guide csit vn1202
Binary reference guide csit vn1202Binary reference guide csit vn1202
Binary reference guide csit vn1202
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
 
Binary operations
 Binary operations Binary operations
Binary operations
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
YibeltalNibretu
 

Recently uploaded (20)

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 

Convertion of single precision

  • 1. Convertion of single-precision IEEE 754 number into a floating-point decimal value By : NIKHIL ARORA (www.internetnotes.in)
  • 2. STEP 1: First, put the bits in three groups. 1 10000001 10110011001100110011010 31 30 23 22 0
  • 3. EXAMPLE: 1 10000001 10110011001100110011010 Bit 31 (the leftmost bit) show the sign of the number.
  • 4. EXAMPLE: 1 10000001 10110011001100110011010 Bits 23-30 (the next 8 bits) are the exponent.
  • 5. EXAMPLE: 1 10000001 10110011001100110011010 Bits 0-22 (on the right) give the fraction
  • 6. STEP 2: Now, look at the sign bit. If this bit is a 1, the number is negative. If it is 0, the number is positive. 1 10000001 10110011001100110011010 This bit is 1, so the number is negative
  • 7. STEP 3: • Get the exponent and the correct bias. The exponent is simply a positive binary number. 10000001bin = 129ten Remember that we will have to subtract a bias from this exponent to find the power of 2. Since this is a single-precision number, the bias is 127.
  • 8. STEP 4: • Convert the fraction string into base ten. This is the trickiest step. The binary string represents a fraction, so conversion is a little different. Binary fractions look like this: 0.1 = (1/2) = 2-1 0.01 = (1/4) = 2-2 0.001 = (1/8) = 2-3 So, for this example, we multiply each digit by the corresponding power of 2: 0.10110011001100110011010bin = 1*2-1+ 0*2-2 + 1*2-3 + 1*2-4 + 0*2-5 + 0 * 2-6 + ... 0.10110011001100110011010bin = 1/2 + 1/8 + 1/16 + ... Note that this number is just an approximation on some decimal number. There will most likely be some error. In this case, the fraction is about 0.7000000476837158.
  • 9. STEP 5: • This is all the information we need. We can put these numbers in the expression: (-1)sign bit * (1+fraction) * 2 exponent - bias = (-1)1 * (1.7000000476837158) * 2 129-127 = -6.8 The answer is approximately -6.8.
  • 10.
  • 11. THANKYOU GATE CBSE NET KVS PREVIOUS YEAR PAPERS SOLVED WITH EXPLANATION ON WWW.INTERNETNOTES.IN