FloatingPointRepresentation

Thus 110 2123 011001100 2 2126 is stored as 0

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: 0) 2;123 = (0:11001100 : : :)2 2;126 is stored as 0 00000000 11001100110011001100110 while (1=10) 2;133 = (0:11001100 : : :)2 2;136 is stored as 0 00000000 00000000001100110011001 : Exercise 4 Determine the IEEE single precision oating point representation of the following numbers: 2, 1000, 23/4, (23=4) 2100, (23=4) 2;100, (23=4) 2;135, 1=5, 1024=5, (1=10) 2;140. Exercise 5 Write down an algorithm that tests whether a oating point number x is less than, equal to or greater than another oating point number y , by simply comparing their oating point representations bitwise from left to right, stopping as soon as the rst di ering bit is encountered. The fact that this can be done easily is the main motivation for biased exponent notation. Exercise 6 Suppose x and y are single precision oating point numbers. Is it true 4 that round(x ; y ) = 0 only when x = y ? Illustrate your answer with some examples. Do you get the same answer if subnormal numbers are not allowed, i.e. subnormal results are rounded to zero? Again, illu...
View Full Document

Ask a homework question - tutors are online