• Want to help us with this year's BoS Trials?
    Let us know before 30 June. See this thread for details
  • Looking for HSC notes and resources?
    Check out our Notes & Resources page

Floatign point numbers (1 Viewer)

sasquatch

Member
Joined
Aug 15, 2005
Messages
384
Gender
Male
HSC
2006
Hi i was just wondering if anyone knows whether or not you need to know how to convert decimal fractions into floating point numbers as i find the fat muscle's process of multiplying by two and ect. a little extreme especially without a calculator and under exam condtions...
 

sasquatch

Member
Joined
Aug 15, 2005
Messages
384
Gender
Male
HSC
2006
Ive understood the concept of converting decimal numbers such as 10.2, 1242.12 and ect. into binary floating point numbers, but i am now stuck on another aspect.

In Samuel Davis' SDD book for HSC in chapter 10 q14e), Convert each of the following decimal numbers into their binary IEEE 754 single precision floating-point equivalents:

e) -3.2e+18

How would i go about doing that without rewriting as -3200000000000000000 and then finding the binary equivalent, ect. It seems very daunting...
 
Joined
Feb 7, 2005
Messages
665
Location
Sydney
Gender
Male
HSC
2005
-3.8x10 ^ 18

18 is your exponent.
Add 127 to it.

Its negative so your sign is 1 (-)

and mantissa is 3.8

011.01100110110011011001101100110110011011001101100110110011

Normalise this to 23 bits or whatever and u got ur mantissa.

will end up looking like this:

1 10010011 01101100110110011011001

(this was all done in my head so its probably wrong but u get the idea of what u need to do)
 

rampeh

New Member
Joined
Mar 4, 2006
Messages
3
Gender
Male
HSC
2006
I think you may have plugged in the value of -3.8x10^18, when the actual value is -3.8x2^18

The page will give you a value of the exponent to be 19, because 3.8 is divisible by 2

Also, i believe the mantissa has to be a number between 1 and 2, with a hidden bit of 1. before it so you get

S EEEEEEEE 1.FFFFFFFFFFFFFFFFFFFFFFF

hence the 1.0000000000000000000000 <= mantissa < 10, (1.000000000000000000000 and 10) in binary!!

Anyway, this means yo ucan't have 011.1001000... or whatever Digital fortress had, as the computer has no way of recognising where the decimal point will lie. Instead the exponent is used to determine most of the value of the number

This explains the 19 exponent (3.8 > 2), and the different mantissa gotten from the page

You must rememeber to think in binary with the exponent

Hope i've helped, If i'm wrong Digi, you can correct me.
 

sasquatch

Member
Joined
Aug 15, 2005
Messages
384
Gender
Male
HSC
2006
rampeh said:
I think you may have plugged in the value of -3.8x10^18, when the actual value is -3.8x2^18

The page will give you a value of the exponent to be 19, because 3.8 is divisible by 2

Also, i believe the mantissa has to be a number between 1 and 2, with a hidden bit of 1. before it so you get

S EEEEEEEE 1.FFFFFFFFFFFFFFFFFFFFFFF

hence the 1.0000000000000000000000 <= mantissa < 10, (1.000000000000000000000 and 10) in binary!!

Anyway, this means yo ucan't have 011.1001000... or whatever Digital fortress had, as the computer has no way of recognising where the decimal point will lie. Instead the exponent is used to determine most of the value of the number

This explains the 19 exponent (3.8 > 2), and the different mantissa gotten from the page

You must rememeber to think in binary with the exponent

Hope i've helped, If i'm wrong Digi, you can correct me.
:| You do realise this is a 1 year old post. Anyway it was 10^18... but anyway the questions in that book are undoable. Even in his answers, he says to use excel or something weird like that...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top