FloatingPointRepresentation

For example consider computing x y with x 102 20 and

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mputing x ; y with x = (1:0)2 20 and y = (1:1111 : : : 1)2 2;1 , where the fraction eld for y contains 23 ones after the binary point. (Notice that y is only slightly smaller than x in fact it is the next oating point number smaller than x.) Aligning the signi cands, we obtain: ( 1:00000000000000000000000j )2 20 ; ( 0:11111111111111111111111j1 )2 20 = ( 0:00000000000000000000000j1 )2 20: This is an example of cancellation, since almost all the bits in the two numbers cancel each other. The result is (1:0)2 2;24 , which is a oating point number, but in order to obtain this correct result we must be sure to carry out the subtraction using an extra bit, called a guard bit, which is shown after the vertical line following the b23 position. When the IBM 360 was rst released, it did not have a guard bit, and it was only after the strenuous objections of certain computer scientists that later versions of the machine incorporated a guard bit. Twenty- ve years later, the Cray supercomputer still does not have a guard bit. When the operation just...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online