1
$\begingroup$

In standard computer arithmetic, there are two sets of numbers.

  • N-bit unsigned numbers. The elements are natural numbers in $(0, 2^N]$. Arithmetic operations is defined as for the natural numbers except all operations are modulo $2^N$.

  • N-bit signed numbers. The elements are integers in $(-2^{N-1}, 2^{N-1}]$. Arithmetic operations rules for complement [1] [2] arithmetic are more complex than a simple modulo.

    • For example, $-2^{N-1} = --2^{N-1} = 2^{N-1}-1 + 1$.

What are these two sets (and their elements) called?

I understand these sets of numbers and their corresponding operational semantics completely, but I want to know how these sets and their elements are correctly named from a mathematical perspective. For example: the generic concept "unsigned numbers" and their arithmetic operations is more correctly (or usually) called something like "the field of natural numbers".

  • 3
    Aren't unsigned numbers the the integers (avoiding the question of whether $0$ is a natural) in $[0,2^N)$? I thought $0$ was allowed and the largest was $2^N-1$. Similarly for signed, though it depends on whether you use sign-magnitude, two's complement or one's complement. In two's complement you can express $-2^{N-1}$, but not $2^{N-1}$. You seem interested in these details.2011-06-19

1 Answers 1