Endianness

  • Endianness pertains to the manner in which we store a sequence of bytes in digital data in memory .
  • A Big Endian system stores the most significant byte at the smallest address. The memory layout ends up storing the number backwards
  • A Little Endian system stores the least significant byte at the smallest memory address. The memory layout ends up storing the number in reading order.

Number Representations

NaN

  • A Not a Number results denotes an entity which cannot be particular format (i.e., because of indeterminate forms)
    • A signaling NaN is a special form of NaN which should raise an invalid operation exception when consumed by most operations.
    • A quiet NaN is a NaN which does not raise any additional exceptions as it propagates through must operations.

Extensions

  • Extension pertains to the process of representing a number that was in bits to another number in bits, where .

    We have two possible definitions of extensions

    • Signed Extension involves repeatedly adding leading ’s if the number is positive and leading ’s if the number is negative.
    • Zero extension involves adding leading s.

Coded Decimals

  • Unpacked Binary Coded Decimal encodes the number by representing the digit with its equivalent -bit number in binary.

  • Packed BCD removes the first four MSb.

    Each digit’s representation is shown in the table below

    digitUBCDPacked BCD
    00000 00000000
    10000 00010001
    20000 00100010
    30000 00110011
    40000 01000100
    50000 01010101
    60000 01100110
    70000 01110111
    80000 10001000
    90000 10011001

Floating Point Standard

  • Defines the standard for representing floating point numbers.

  • Let be the sign bit be the stored exponent be the mantissa. be the number of bits to be used - the number of bits for the exponent the number of bits for the mantissa.

  • The format is given as

 1   |    b_e   |   b_m
sign | exponent | mantissa
  • The real number is to be represented as

    must be normalized to ensure canonical representation. Thus, we have an implied

  • The sign bit represents the sign of . is positive, is negative

  • The stored exponent is calculated as

  • The mantissa represents the remaining bits and store the significand .

Special Values

  • Note that and denote numbers arbitrarily close to but not .

Infinity

  • (all one’s)

  • Infinity denotes the largest magnitude number representable within the format

Subnormal Numbers

These numbers are of the form , where in binary

Not a Number

  • is any value.
  • (all one’s)
  • begins with for Signaling NaN
  • begins with for Quiet NaN

Links

How floating point works