In two's complement arithmetic of 8-bit numbers, the binary numbers 00000000 to 01111111 represent the decimal numbers 0 to 127 and the binary numbers 10000000 to 11111111 represent the decimal numbers -128 to -1. In particular 10011111 represents -97. (128 + 31 - 2^8)

In two's complement arithmetic of 32-bit numbers, the binary numbers 00000000 00000000 00000000 0000000 to 00000000 00000000 00000000 11111111 represent the decimal numbers 0 to 255. In particular 00000000 00000000 00000000 10011111 represents 159. (128 + 31) [ October 17, 2004: Message edited by: Marlene Miller ]

M Jay
Ranch Hand

Joined: Sep 21, 2004
Posts: 66

posted

0

Hey Marlene,

Thank you so much, now it makes more sense Is there a way for me to read these values in and print them out in their simple form... i.e. 159 ??? readInt() doesn't seem to do it

Thanks

subject: -97 is the total length of each record ???