-3

I am having trouble understanding 16-bit floating points for an upcoming exam. I'm having the following digits in binary(after conversion);

+11100.1110002 = 28.8752. I got 28 easily, but how do I get '875' ?

Thanks

johannes
  • 7,262
  • 5
  • 38
  • 57
Chris Arom
  • 9
  • 1
  • 6

2 Answers2

1

In a number, the value of a digit is multiplied by a constant, depending on the position. Let's take an example for a decimal number:

ab.cd10 = a*101 + b*100 + c*10-1 + d*10-2

It works similarly for binary numbers. For the portion to the right of the binary point in your example:

0.1110002 = 2-1 + 2-2 + 2-3 = 0.5 + 0.25 + 0.125 = 0.875.

David Alber
  • 17,624
  • 6
  • 65
  • 71
1

Left side of the . is multiply by 2, right side is divide by 2.

So you got 0.1110

0.1 = 0.5
0.01 = 0.25
0.001 = 0.125
----------------+
0.875

Niels
  • 48,601
  • 4
  • 62
  • 81