69 242 ieee floating point representation positional

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: epresented by the low-order bits Ü ½ ܼ . By a similar analysis as the unsigned case, we have Ü ¾ ܼ · ܼ¼ , and ¼ ܼ¼ ¾ , giving ܼ Ü ¾ . Furthermore, observe that shifting bit vector ÜÛ ½ ÜÛ ¾ ܼ right arithmetically by yields a bit vector Ü ½ Ü ¾ Ü ½ Ü ¾ Ü Ü¼ by yields bit vector ¼ . That is, integer division should round negative results upward integer ¼ such that ¼ ½ toward zero. For example the C expression -5/2 yields -2. Thus, right shifting a negative number by is not equivalent to dividing it by ¾ when rounding occurs. For example, the four-bit representation of is ½¼½½ . If we shift it right by one arithmetically we get ½½¼½ , which is the two’s complement representation of ¿. We can correct for this improper rounding by “biasing” the value before shifting. This technique exploits the property that Ü Ý ´Ü · Ý ½µ Ý for integers Ü and Ý such that Ý ¼. Thus, for Ü ¼, if we first add ¾ ½ to Ü before right shifting, we will get a correctly rounded result. This analysis shows that for a two’s...
View Full Document

Ask a homework question - tutors are online