NOMINATION: Dirk Van de moortel for VVFWS
The Ghost In The Machine writes:
In sci.math, Androcles
So just what is
1000 0000 0000 0000 0000 0000 0000 0000
in modern processors with only one representation for 0?
Assuming 16-bit signed integers, represented in hex:
Of course it's not the highest integer; there is no such.
It's the highest positive integer that can be crammed into
16 bits, given current sign conventions.
Not quite.
0x8000 is the smallest (most negative) 16-bit integer
under those conditions,
You are not exactly being consistent.
and has some odd properties; for starters 2 * 0x8000 = [overflow] 0,
as you've already noticed. Of course 2 * 0x7fff = 0xfffe =
[overflow] -2.
That's all pretty harmless. The really appalling thing is that you
can't negate the number without causing overflow: the number stays the
same.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
|