The fraction eld frac is interpreted as representing

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: Û Û Û Û Û 66 CHAPTER 2. REPRESENTING AND MANIPULATING INFORMATION We compiled this code for particular values of M and N. The compiler optimized the multiplication and division using the methods we have discussed. The following is a translation of the generated machine code back into C: /* Translation of assembly code for arith */ int optarith(int x, int y) { int t = x; x <<= 4; x -= t; if (y < 0) y += 3; y >>= 2; /* Arithmetic shift */ return x+y; } What are the values of M and N? 2.4 Floating Point Floating-point representation encodes rational numbers of the form Î Ü ¢ ¾Ý . It is useful for performing computations involving very large numbers ( Î ¼), numbers very close to 0 ( Î ½), and more generally as an approximation to real arithmetic. Up until the 1980s, every computer manufacturer devised its own conventions for how floating-point numbers were represented and the details of the operations performed on them. In addition, they often did not worry too much about the accur...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online