posted 22 years ago
Hi, can anybody help? Thanks in advance.
what i know is to get the binary format of positive numbers, like 25:
25 = 1 + 8 + 16, that is
0000 0001 ///this is one
0000 1000 //this is eight
0001 0000 //this is sixteen
---------
0001 1001 //this is what i want: twenty five in byte type
00000000 00000000 00000000 0001 1001 //is 25 in int type
while, i have no idea how to get -25. as i know it would be different in byte than in int. Is the difference is to add all "one" before the -25 in byte format, which i don't know how to get?