## 3.2 INTEGERS

The most natural way of representing an integer is the *sign-magnitude representation system*. Nevertheless, it is not the most convenient for executing arithmetic operations. Several representation methods are now described.

### 3.2.1 Sign-Magnitude Representation

Any integer can be represented in the form +*x* or − *x*, where *x* is a natural number. The natural number *x* can be represented in base *B* (Theorem 3.1), and instead of using the ‘+’ and ‘−’ symbols, an additional (sign) digit equal to 0 (nonnegative number) or 1 (negative number) is added:

**Definition 3.2** The integer represented in the form *x*_{n−1} *x*_{n−2} … *x*_{1} *x*_{0}, where *x*_{n−1} is the sign bit, is

The range of represented numbers is −*B*^{n−1} < *x* < *B*^{n−1}.

**Comment 3.2** The number of vectors (*x*_{n−1} *x*_{n−2} … *x*_{1} *x*_{0}), where *x*_{n−1} is the sign bit, is equal to 2.*B*^{n−1}, while the range −*B*^{n−1} < *x* < *B*^{n−1} only includes 2.*B*^{n−1} − 1 integers. The difference is due to the fact that the vector (100 … 0) does not represent any number (*zero* is a natural number so that its sign bit should always be equal to 0). Nevertheless, the integer *zero* could also be accepted with two representations, namely, 000 … 0 (plus zero) and 100 … 0 (minus zero).

### 3.2.2 Excess-*E* Representation

Another way of representing a negative number *x* consists in associating a natural number *R*(*x*) to *x*, where *R* is a one-to-one function, and *R*(*x*) is represented in base *B*.

**Definition 3.3**