Information Representation - Codes
|
Signed integers are positive or negative whole numbers. The first bit of the binary representation of a signed integer is used to represent the sign (positive or negative) of the number. This means that there is one less bit available to represent the value of the number, so the maximum size of the number is reduced. e.g. An unsigned 8 bit integer could go up to 255 while the 7 bits of a signed integer could only go up to 128; the remaining bit of 0 or 1 must indicate the sign. If we take 0 to represent a plus sign and a 1 to represent a minus sign then 01111111 = +128 while 11111111 = -128
This is not really satisfactory. |