View Single Post
  #41  
Old September 10th 05 posted to sci.math,sci.physics,sci.physics.relativity
David Kastrup
external usenet poster
 
Posts: 146
Default 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
Ads
 

Credit Card Consolidation - Loans - Loans - Mortgage - Instant online payday loan