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.
14 Comments - Last post 3 minutes ago by andreeeeeww
442 Comments - Last post 5 minutes ago by BanjoBearLV
8,605 Comments - Last post 13 minutes ago by Dayannah
89 Comments - Last post 56 minutes ago by devotee
159 Comments - Last post 2 hours ago by CR7CAMIAO
47,171 Comments - Last post 2 hours ago by Calibr3
468 Comments - Last post 4 hours ago by Wasari
25 Comments - Last post 46 seconds ago by Filipi
118 Comments - Last post 2 minutes ago by aez76
21 Comments - Last post 9 minutes ago by Vee79
78 Comments - Last post 12 minutes ago by ConanOLion
125 Comments - Last post 13 minutes ago by ShroudOfLethe
21 Comments - Last post 31 minutes ago by Snake994
219 Comments - Last post 43 minutes ago by ayuinaba
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.