我在阅读我的笔记时发现了以下内容:
For every real number there are various ways of representing
it in such a way. Therefore, computers fix two parameters (so
they do not need to be stored, and arithmetic is more
convenient):
- the base b (normally, it is 2, 10 or 16) and
- the position of the decimal (or binary) point (by normalising
the mantissa such that it satisfies 1/b ≤ m < 1)
Example: Normalised representations for r := 12.25 are,
- for b = 2, r = 1 × 0.110001 × 2^4,
- for b = 10, r = 1 × 0.1225 × 10^2 and,
- for b = 16, r = 1 × 0.C4 × 16^1.
如何计算十进制数12.25的二进制、十进制和十六进制浮点数?我不太确定讲师是如何得出b=2、b=10和b=16的答案的。