Tuesday 15 February 2011

binary - 32 bit mantissa representation of 2455.1152 -


If I want to represent -2455152 as 32 bit, then I know that the first bit 1 (negative signal) But I am not sure as to binary 10010010111 from 2455, but for partial part. .1152 can have an infinite number of fractional parts. Would it mean that only partial portion is used only up to 23 bit? So 2445 to 11 bits are used, bits are for 11 to 0 partial parts?

For binary representation I have 10010010111.00011101001, exponent is 10. Binary 10001001 as 10 + 127 = 137 137.

The full representation will be:

1 10001001 1001001011100011101001

Is that correct?

It seems that you are trying to prepare your floating point presentation, Tag, so I'll tell you the number for the actual one of your actual fixed point presentation first, you have to decide how many bits will be used to represent partial part of the number. For the sake of discussion, we say that 16 bits will be used for partial part, 15 bits for integer part, and one bit reserved for signature bit. Now, multiply the actual number of full value 2 ^ {16}: 2455.1152 * 65536 = 160898429.747. You can either round in the nearest integer or just be small, let's suppose that we just sort out in 1608 9 893. To convert it into hexadecimal, we get 0x09971D7D to make it negative, invert it and add 1 to LSB, and the end result is 0xF668E283.

To convert back to the real numbers, simply reverse the process, take the full value of the representation of the fixed point and divide it by 2 ^ {16}. In this case we will find that the fixed-point representation is equal to the actual number -2455.1151886. Instead of transacting, the integer can be improved accurately, by changing from real to fixed-point or allowing more bits for partial part.

No comments:

Post a Comment