<<< Integer data types - unsigned integers | Index | Signed Magnitude Data Types >>> |
We also need to be able to represent negative quantities.
In arithmetics, a minus sign is used as a prefix in notation of negative numbers.
In a combination of bits, a leftmost bit could indicate the sign.
Therefore,
one half of integer numbers could represent positive numbers,
another half - negative numbers.
Decision to make: what codes should we assign to what values?
Positive numbers and zero can be presented in a straightforward positional scheme.
For example, largest positive member of a 5-bit pattern is 01111, or decimal 15.
<<< Integer data types - unsigned integers | Index | Signed Magnitude Data Types >>> |