Thursday, September 13, 2012

Internal Representation of Fixed-Point Binary Data

The following figure shows the internal representation of fixed-point binary data. Storage for fixed-point binary variables is always allocated in a byte, word, or longword. For any fixed-point binary value:
  • If p is in the range 1 through 7, a byte is allocated.
  • If p is in the range 8 through 15, a word is allocated.
  • If p is in the range 16 through 31, a longword is allocated.
The binary digits of the stored value go from right to left in order of increasing significance; for example, bit 6 of a FIXED BINARY (7) value is the most significant bit, and bit 0 is the least signficant. In all cases, the high-order bit (7, 15, or 31) represents the sign.   Figure: Internal Representation of Fixed-Point Binary Data