Pall bearers drop coffin, and hearse drives into the back of a watermelon truck
Comment has been collapsed.
(-1)^(sign) (mantissa) (base)^(exponent), correct?
In binary they're noted as "sign exponent mantissa".
so that means:
sign = -
exponent = 0111111, IBM uses a bias of 64 for the exponent so its 63-64=-1
mantissa = 01110000 00000000 00000000, so that's 0.0111 in binary or 0.4375 in decimal
So if I'm not wrong it's
Now this just makes me wonder where you'd bump into this number and why you want it in binary. I'm guessing I just did your homework for you? ;)
Comment has been collapsed.
I was always under the impression you were dumb. This has changed.
Comment has been collapsed.
Hmmm that's correct, sign is indicated by (-1)^(sign)
Anyway looked it up on wikipedia since I wasn't familiar with this IBM architecture (only ever used IEEE), the exponent has a bias of 64 so it's actually 16^-1. Only off by a factor 16^64, that's not bad right? ;)
The example would be 0.140625^16, exactly 2.25. Pretty confident you got it right with -0.02734375 then!
Comment has been collapsed.
Yeah got the same one now, i borked up on the conversion of the mantissa by being lazy and using windows calculator which as it turns out doesn't support binary fractions. You either have to use some online converter or shift the radix point yourself and then divide by 2^shift again later.
I believe its correct. :)
Also checks out with the 2.25 example you gave.
Comment has been collapsed.
I've got the same number.
sign = 1 -> negative
characteristic = 0111 1111 -> 16^-1
6-digit fraction = 0111 0000 0000 0000 0000 0000 -> 7/16
Solution: -7/256 = -0,02734375
Comment has been collapsed.
brain.exe has quit responding.
(I'm not entering, but thanks for the giveaway!)
Comment has been collapsed.
593 Comments - Last post 11 minutes ago by FateOfOne
116 Comments - Last post 1 hour ago by le4slie
24 Comments - Last post 2 hours ago by reigifts
325 Comments - Last post 2 hours ago by Lugum
71 Comments - Last post 3 hours ago by Luckz
508 Comments - Last post 4 hours ago by Gyhulhu
31 Comments - Last post 7 hours ago by Skwerm
181 Comments - Last post 3 minutes ago by Skwerm
2 Comments - Last post 16 minutes ago by herbesdeprovence
11 Comments - Last post 18 minutes ago by Swordoffury
36 Comments - Last post 31 minutes ago by vigaristti
29 Comments - Last post 34 minutes ago by Tsukeman
109 Comments - Last post 1 hour ago by SyrslyTwitch
15,306 Comments - Last post 1 hour ago by cpj128
So, i've got a floating point number (i think this is from IBM) that uses base 16, one bit for the sign, an exponent of 7 bits in excess 64, and a normalized mantissa of 24 bits.
Which would be this number, in decimal?
1 0111111 01110000 00000000 00000000
I have some problems understanding the base 16 thing. I will try to do the inverse process with another number to see if i understood it, thanks!
Here is a random giveaway though.
Clicky
Comment has been collapsed.