Signed -> unsigned [closes #12]

This commit is contained in:
Antti H S Laaksonen 2017-02-28 20:00:15 +02:00
parent 5ef149a618
commit 639db602eb
1 changed files with 2 additions and 2 deletions

View File

@ -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$.