



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Integer 2's Complement Signed Unsigned 5 5 0000 0101 4 4 0000 0100 3 3 0000 0011 2 2 0000 0010 1 1 0000 0001 0 0 0000 0000 -1 255 1111 1111 -2 254 1111 1110 -3 253 1111 1101 -4 252 1111 1100 -5 251 1111 1011
0001 0001(binary 17) 1110 1111(two's complement -17) NOT(0001 0001) = 1110 1110 (Invert bits) 1110 1110 + 0000 0001 = 1110 1111 (Add 1)
Signed Integer 8-bit Representation 16-bit Representation -1 1111 1111^ 1111 1111 1111 1111 +1 0000 0001^ 0000 0000 0000 0001
Largest value for 8-bit integer = 28 = 256 Offset binary zero value = 256 ÷ 2 = (^128) (decimal) = 1000 0000(binary) 1000 0000(offset binary 0) + 0001 0110(binary 22) = 1001 0110(offset binary +22) 1000 0000(offset binary 0) - 0000 0111(binary 7) = 0111 1001(offset binary -7)
Signed Integer Sign Magnitude Offset Binary +5 0000 0101^ 1000 0101 +4 0000 0100^ 1000 0100 +3 0000 0011^ 1000 0011 +2 0000 0010^ 1000 0010 +1 0000 0001^ 1000 0001 0 0000 0000 1000 0000 1000 0000 -1 1000 0001^ 0111 1111 -2 1000 0010^ 0111 1110 -3 1000 0011^ 0111 1101 -4 1000 0100^ 0111 1100 -5 1000 0101^ 0111 1011