Representation of Numeric Formats

Figure 1 shows what the decimal number 21544 looks like in various formats.

Figure 1. Representation of the Number 21544 in each of the Numeric Formats
Representation of the Number 21544 in each of the Numeric Formats
Note the following about the representations in the figure.
  • To obtain the numeric value of a positive binary or integer number, unsigned number, add the values of the bits that are on (1), but do not include the sign bit (if present). For an unsigned number, add the values of the bits that are on, including the leftmost bit.
  • The value 21544 cannot be represented in a 2-byte binary field even though it only uses bits in the low-order two bytes. A 2-byte binary field can only hold up to 4 digits, and 21544 has 5 digits.

Figure 2 shows the number -21544 in integer format.

Figure 2. Integer Representation of the Number -21544
Integer Representation of the Number -21544