3 ms·
Assuming 4-byte integers, 0000 is 0 0001 is 1 0010 is 2 0011 is 3 0100 is 4 0101 is 5 0110 is 6 0111 is 7 1111 is -1 1110 is -2 1101 is -3 1100 is -
by School-Cotton 2y ago
Assuming 4-byte integers,
0000 is 0
0001 is 1
0010 is 2
0011 is 3
0100 is 4
0101 is 5
0110 is 6
0111 is 7
1111 is -1
1110 is -2
1101 is -3
1100 is -4
1011 is -5
1010 is -6
1001 is -7
1000 is -8
The highest bit is always 1 when the sign is negative.
- School-Cotton 2y agoToo late to edit, but I meant 4-bit, not 4-byte.
- fuzztester 2y agoWhat is the edit window in hours?
- jb1991 2y agoUseful example, thanks.