IEEE-754 Single precision format
$Sign(S)$ |
$Biased\ exponent(BE)$ |
$Mantissa(M)$ |
$1-bit$ |
$8-bit$ |
$23-bit$ |
$BE=AE+Bias(+(2^{n-1}-1))$
$where\ n=BE\ field\ size$
$0x42200000:0|100\ \ \ 0010\ \ \ 0|010\ \ \ 0000\ \ \ 0000\ \ \ 0000\ \ \ 0000\ \ \ 0000$
$AE=BE-Bias=132-127=5$
$Mantissa=010....0000$
$\downarrow$
$+.0100000...0000\times 2^{+5}$
$\downarrow de-normalizaton$
$+.10100000...0000\times 2^{+6}$
$\downarrow$
$+101000.0000...0000=+40$
$0xC1200000:1|100\ \ \ 0001\ \ \ 0|010\ \ \ 0000\ \ \ 0000\ \ \ 0000\ \ \ 0000\ \ \ 0000$
$AE=BE-Bias=130-127=3$
$Mantissa=010....0000$
$\downarrow$
$-.0100000...0000\times 2^{+3}$
$\downarrow de-normalizaton$
$-.10100000...0000\times 2^{+4}$
$\downarrow$
$-1010.000000...0000=-10$
$R3=-4=-100.0000....000$
$\downarrow Normalization$
$-1.0000.....0000\times 2^{+2}$
$BE=AE+Bias=2+127=129=10000001$
$1|100\ \ \ 0000\ \ \ 1|000\ \ \ 0000\ \ \ 0000\ \ \ 0000\ \ \ 0000\ \ \ 0000$
$Ans:0xC0800000$