Signed -> unsigned [closes #12]
This commit is contained in:
parent
5ef149a618
commit
639db602eb
|
@ -54,9 +54,9 @@ For example, the bit representation of $-43$
|
||||||
as an \texttt{int} number is as follows:
|
as an \texttt{int} number is as follows:
|
||||||
\[11111111111111111111111111010101\]
|
\[11111111111111111111111111010101\]
|
||||||
|
|
||||||
In a signed representation, only nonnegative
|
In an unsigned representation, only nonnegative
|
||||||
numbers can be used, but the upper bound of the numbers is larger.
|
numbers can be used, but the upper bound of the numbers is larger.
|
||||||
A signed number of $n$ bits can contain any
|
An unsigned number of $n$ bits can contain any
|
||||||
integer between $0$ and $2^n-1$.
|
integer between $0$ and $2^n-1$.
|
||||||
For example, the \texttt{unsigned int} type in C++
|
For example, the \texttt{unsigned int} type in C++
|
||||||
can contain any integer between $0$ and $2^{32}-1$.
|
can contain any integer between $0$ and $2^{32}-1$.
|
||||||
|
|
Loading…
Reference in New Issue