Mail Archives: djgpp/2000/08/18/11:30:36
On Fri, 18 Aug 2000 16:51:12 +0200, "Florent"
<florent AT oih DOT rwth-aachen DOT de> wrote:
>>You cause quite some confusion, here, by using the wrong term. The
>>thing you're talking about is usually called 'two's-complement'. It's
>>the way negative numbers are represented in integers, on almost all
>>existing types of computers.
>
>Yes that's right and this is the name that I have learn in France, but I
>quite newbye in computering and the documents I got from the controller I
>have to control, use the term 'twin complement'. Is it something else or
>really the 'two's-complement' ?
The operation that takes 0x123 and returns 0xfffffedd is, indeed, the
two's complement, and is represented in C on binary computers by the
prefix operator - (a hyphen or minus sign).
0xfffffedd == -0x123
Whether the two's complement is actually what your device returns is a
good candidate for some printf() debugging.
--
Damian Yerrick
"I refuse to listen to those who refuse to listen to reason."
See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses. http://www.mcafee.com/
- Raw text -