#81847 - 2003-09-15 03:52 PM
Re: DecToBin() and BinToDec()
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Heh, no, that actually ignores the issue
What I'm talking about is (for example) binary representation of a negative number. Normally twos-complement - I don't think ones-complement is much used.
For example the offset for time zones is sometimes negative, which is stored in the registry as a twos-complement value.
That's why in my recommendation there is an optional word size - you need to know how wide the target is to construct a twos-complement value.
|
Top
|
|
|
|
Moderator: Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 581 anonymous users online.
|
|
|