In: Computer Science
Q1.Convert C46C000016 into a 32-bit single-precision IEEE floating-point binary number.
Hexadecimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Use this table to convert from hexadecimal to binary
Converting C46C0000 to binary
C => 1100
4 => 0100
6 => 0110
C => 1100
0 => 0000
0 => 0000
0 => 0000
0 => 0000
So, in binary C46C0000 is 11000100011011000000000000000000
1 10001000 11011000000000000000000
sign bit is 1(-ve)
exp bits are 10001000
Converting 10001000 to decimal
10001000
=>
1x2^7+0x2^6+0x2^5+0x2^4+1x2^3+0x2^2+0x2^1+0x2^0
=> 1x128+0x64+0x32+0x16+1x8+0x4+0x2+0x1
=> 128+0+0+0+8+0+0+0
=> 136
in decimal it is 136
so, exponent/bias is 136-127 = 9
frac bits are 11011
IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1.11011 * 2^9
1.11011 in decimal is 1.84375
=> 1.11011
=> 1x2^0+1x2^-1+1x2^-2+0x2^-3+1x2^-4+1x2^-5
=>
1x1+1x0.5+1x0.25+0x0.125+1x0.0625+1x0.03125
=> 1+0.5+0.25+0.0+0.0625+0.03125
=> 1.84375
so, 1.84375 * 2^9 in decimal is 944.0
so, 11000100011011000000000000000000 in IEEE-754 single precision
format is -944.0
Answer: -944.0