The Round and Sticky Bits


Two extra bits are needed for rounding just after normalizing a result significand in order to achieve accurate arithmetic and reduce the hardware: They allow the computer to get the same result as if the intermediate results were calculated to infinite precision and then rounded. Consider the same example of the previous slide using 24 significant bits with and without a guard bit, a round bit, and a sticky bit.

   1.00000000101100010001101 × 25
 – 1.00000000000000010011010 × 2-2 (subtraction)
                      
   1.00000000101100010001101 × 25
 – 0.00000010000000000000001 0011010 × 25 (shift right 7 bits)
The following subtraction is WITHOUT extra bits:
   1.00000000101100010001101 × 25
 1 1.11111101111111111111110 1100110 × 25 (2’s complement) 
 ————————————————————————————————————————— 
 0 0.11111110101100010001011 1100110 × 25 (add significands) 
                      
   1.11111101011000100010110 1100010 × 24 (normalized)
The following subtraction is WITH a guard bit (in red color), a round bit (in blue color), and a sticky bit (in green color):
   1.00000000101100010001101 × 25
 1 1.11111101111111111111110 1 1 00110 × 25 (2’s complement)
 ————————————————————————————————————————— 
 0 0.11111110101100010001011 1 1   1   × 25 (add significands)
                      
   1.11111101011000100010111   1   1   × 24 (normalized)



      “I felt like an animal, and animals don’t know sin, do they?”    
      ― Jess C. Scott, Wicked Lovely