The conversation between human and AI assistant.
What is the highest number representable in 8-bit two's complement encoding?
Why is that the highest number?
In 8-bit two's complement encoding, the leftmost bit represents the sign of the number (0 for positive, 1 for negative) and the remaining 7 bits represent the magnitude. With 8 bits, the largest magnitude that can be represented is 01111111, which is 127 in decimal. An additional bit would make it possible to represent negative numbers with a larger magnitude.