peterworth
Programmer
is it 2's compliment when signed and plain binary when unsigned?
the problem is that i am reading the first 4 bytes from a buffer like this:
DWORD ret = *lpBufComp;
and this comes out as 4294967168 which i believe is 0x7FFFFFFF. however, i'm sure it should be (in binary) 100000000..... sure enough, if i replace this line with:
UCHAR ret = *lpBufComp;
the ret comes out as 128 = 10000000 in base 2. why would the DWORD be the exact inversion of the actual bit values in the buffer?
the problem is that i am reading the first 4 bytes from a buffer like this:
DWORD ret = *lpBufComp;
and this comes out as 4294967168 which i believe is 0x7FFFFFFF. however, i'm sure it should be (in binary) 100000000..... sure enough, if i replace this line with:
UCHAR ret = *lpBufComp;
the ret comes out as 128 = 10000000 in base 2. why would the DWORD be the exact inversion of the actual bit values in the buffer?