A textbook I'm following says the following in the section 8-Bit Representation of a Number:
"Now consider the two’s complement of an integer n that satisfies the inequality $1 \leq n \leq 128$.
Then,
$$− 1 \geq −n \geq− 128$$
and,
$$2^8 − 1 \geq 2^8 − n \geq 2^8 - 128 $$
But, $2^8 - 128 = 256 - 128 = 128 = 2^7$.
And therefore, $2^7 \leq$ the two's complement of n $ < 2^8$." ---------- (1)
Everything is fine up to here, but now the book drops the bombshell: "It follows that the 8-bit two’s complement of an integer from 1 through 128 has a leading bit of 1."
Well, I can convince myself that such is the case, but I don't see how that follows from result (1) above. My reasoning is as follows:
A number less than or equal to 128 takes 7 bits. This means representations from 0000000 to 1111111 are possible. In the last number, taking two's complement naturally gives a leading 1, while in the rest the existence of at least one 0 'absorbs' the carry within the 7-bit string itself, leaving the original bit unchanged after addition of 1 (which means, the original 0, which is now 1).
I, however, don't see why result (1) points to this. For instance, consider the sequence $2^7 + 1 = 1000001$. This is greater than $2^7$, but the 8-bit representation does not contain a leading one.
Please help!
You are just getting confused by an easy passage.
Recall $p^n$ in base $p$ is written as $1$ followed by $n$ zeros.
To always remember that, keep in mind this example from the familiar base $10$:
$10^2 = 100$ (exponent is 2 $\implies$ 2 zeros $\implies$ 3 digits).
So $2^7$ is written as $10000000$, a leading one followed by $7$ zeros: 8 bits.
Its 8-bit representation starts with a $1$.
And so does $2^7 + 1 = 10000001$
The textbook just gives it for granted that you know that, in base $p$, anything between $p^k$ (included) to $p^{(k+1)}$ (excluded) in base $p$ takes exactly $k+1$ digits with a non-zero leading digit.
For example, in the familiar base 10, everything between $10^1$ (included) and $10^2$ (excluded), i.e. everything from 10 to 99, takes 2 digits including the starting non-zero digit.
So from $2^7 \leq k <2^8$ it does follow, naturally, that $k$ will be written, in base 2, with 8 digits starting with a non-zero digit.