number-representation:

Binary Numbers

For a 8-bit number, there are two ways to represent number: unsigned values 0 to 255 signed values range from -128 (-2^8 = 10000000) to 127 (2^8 - 1) signed -128 = 10000000 signed -127 = 10000001 signed -1 = 11111111 signed 0 = 00000000 signed 127 = 01111111 signed 127 + (-127) = 10000001 + 01111111 = 0 If a number is assigned with value that is too big for it to hold, overflowing would happen, 2^32 = 4,294,967,296 is the largest unsigned 32 bit value.

by lek tin in "computing" access_time 1-min read