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

11 years ago*

Comment has been collapsed.

I have no idea how to help you, sorry D:

But thanks for TB :)

11 years ago
Permalink

Comment has been collapsed.

^ Super bump to the rescue

11 years ago
Permalink

Comment has been collapsed.

Na na na na na na na na na na na na na na na na Bumpman!

:D

11 years ago
Permalink

Comment has been collapsed.

"To the Bumpmobile!"

11 years ago
Permalink

Comment has been collapsed.

Erma Ghurd!

Runs towards Bumpmobile with excitement

Trips over a rock

11 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 3 years ago.

11 years ago
Permalink

Comment has been collapsed.

Pall bearers drop coffin, and hearse drives into the back of a watermelon truck

11 years ago
Permalink

Comment has been collapsed.

A wild banana appears

11 years ago
Permalink

Comment has been collapsed.

boo

11 years ago
Permalink

Comment has been collapsed.

hoo

11 years ago
Permalink

Comment has been collapsed.

mmmh.. idk.. :|

btw, thanks for random ga ;)

11 years ago
Permalink

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

  • 0.4375 * 16^-1 ~= -0.02734375

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? ;)

11 years ago
Permalink

Comment has been collapsed.

I was always under the impression you were dumb. This has changed.

11 years ago
Permalink

Comment has been collapsed.

Tssk tssk Tony, you should know better than to judge a book by its cover.

11 years ago
Permalink

Comment has been collapsed.

I dont think it's that high, and it also has a 1 as sign, which means negative.

Around here says 2.25 (base 10) is

0 1000001 001001000000000000000000

So i dont think that result is accurate D:

11 years ago
Permalink

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!

11 years ago
Permalink

Comment has been collapsed.

He editted it xP

11 years ago
Permalink

Comment has been collapsed.

Yep and nobody would ever know if it wasn't for you meddling kids!!!!

11 years ago
Permalink

Comment has been collapsed.

I think the number is -0.02734375 (base 10) if anyone can confirm.

11 years ago
Permalink

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.

11 years ago
Permalink

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

11 years ago
Permalink

Comment has been collapsed.

I guess i got it then, many thanks :P

Lets start with IEEE 754 now

11 years ago
Permalink

Comment has been collapsed.

brain.exe has quit responding.

(I'm not entering, but thanks for the giveaway!)

11 years ago
Permalink

Comment has been collapsed.

Closed 11 years ago by RaidOn.