Number Representation

Investigate how to represent numbers in any digital machine.

We have learned that the field of digital signal processing manipulates sequences of numbers. In a digital machine, these numbers can only be represented in a binary format. In the case of fixed-point arithmetic, there is a set procedure that converts a decimal number (e.g., a voltage or current signal) into its binary representation for positive numbers. For example, the number 1313 can be written as:

13=1×101+3×100=10+313 = 1\times 10^1 + 3\times 10^0=10+3

Similarly, its binary equivalent 11011101 is written as

13=1×23+1×22+0×21+1×20=8+4+113 = 1\times 2^3+ 1\times 2^2 + 0\times 2^1 +1\times 2^0=8+4+1

There are three major formats in use today when dealing with negative numbers.

Sign magnitude

In this system, the most significant bit (MSB) is used as a sign bit—for example, 0 represents a positive number while a 1 represents a negative number. As a consequence, a negative number can simply be obtained by inverting the sign bit of its positive counterpart. A 3-bit example is as follows:

Get hands-on with 1200+ tech skills courses.