# Floating point number,Mantissa,Exponent

In this computer, numbers are stored in $$12$$-bits. We will also assume that for a floating point (real) number, $$6$$ bits of these bits are reserved for the mantissa (or significand) with $$2^{k-1}-1$$ as the exponent bias (where $$k$$ is the number of bits for the characteristic).

$$011100100110010111110011$$

What pair of floating point numbers could be represented by these $$24$$-bits?

I have gone this far:

As described above that each number is of $$12$$ bit so we get each number

$$011100100110$$

First one is $$0$$ bit so it is positive and

Mantissa will be $$100110$$

Exponent will be $$11100b=28$$

my unbiased exponent will be $$2^{28-15}=2^{13}$$

How to find the floating point number from here?

Usually the mantissa is considered to have a binary point after the first bit, so your mantissa would be $1.1100_2=\frac 74=1.75_{10}$. Sometimes a leading $1$ is assumed, so your mantissa would be $(1).11100_2=\frac{15}8=1.875_{10}$ This gives one more bit of precision. To find the exponent, you subtract the offset from the stored value. You probably meant $2^{k-1}-1$ as the offset. Can you do that?

• Yes I did a mistake there.It will be 2^(k-1)-1. Apr 5, 2015 at 17:20
• Can you please show the calculations for the first one? I will do it for the second one. Apr 5, 2015 at 17:22
• What is $k$? Can you compute $2^{k-1}-1$ and subtract it from $38$? That is the power of $2$ to multiply your mantissa by. Apr 5, 2015 at 17:26
• k is 5 here.So I need to multiply it (38-15) ie 23. Apr 5, 2015 at 17:29
• It looks to me like $k=6$-you have six bits of exponent. The point of the offset is that six bits of unsigned binary ranges from 0 to 63. With an offset of $2^{6-1}-1=31$ you get a range from $2^{-31}$ to $2^{32}$, which is (reasonably) logarithmically centered around $1$. You need to subtract this number from $38$ (the opposite sense of your last comment) to get $5$, so you multiply the mantissa by $2^5$ Apr 5, 2015 at 17:33

The 12-bit coding should be in this format:

1. Bit 11, the sign
2. Bit 10-6, the exponent
3. Bit 5-0, the mantissa

Notes:

1. As far as I know the exponent is not represented with sign but as 2’s complement
2. The mantissa has the most significant bit (bit 5, the far-left) as $$2^{-1}$$ and the least significant bit (bit 0) as $$2^{-6}$$.

Now the first code: $$011100100110$$

1. Bit 11=0: positive number
2. Exponent: $$11100_2=12$$
3. Mantissa: $$100110\rightarrow 1.100110_2=1\frac{19}{32}$$
4. Final answer:$$1\frac{19}{32}\cdot 2^{12}\approx 6528.$$

Second code:$$010111110011$$

1. Bit 11=0: positive number
2. Exponent: $$10111_2=7$$
3. Mantissa: $$110011\rightarrow 1.110011_2=1\frac{51}{64}$$
4. Final answer: $$1\frac{51}{64}\cdot 2^7=\frac{115}{32768}\approx 230.$$