Fix unsigned upper bound [closes #56]
This commit is contained in:
parent
1049e0c02b
commit
5dd049c3a2
|
@ -77,7 +77,7 @@ of the bit representation, the number will overflow.
|
||||||
In a signed representation,
|
In a signed representation,
|
||||||
the next number after $2^{n-1}-1$ is $-2^{n-1}$,
|
the next number after $2^{n-1}-1$ is $-2^{n-1}$,
|
||||||
and in an unsigned representation,
|
and in an unsigned representation,
|
||||||
the next number after $2^{n-1}$ is $0$.
|
the next number after $2^n-1$ is $0$.
|
||||||
For example, consider the following code:
|
For example, consider the following code:
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
int x = 2147483647
|
int x = 2147483647
|
||||||
|
|
Loading…
Reference in New Issue