{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

One way would be to input the decimal string 01

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: uld be to input the decimal string 0.1 directly, either in the program itself or in the input to the program. The compiler or interpreter then calls a standard input-handling procedure which generates machine instructions to 15 convert the decimal string to its binary representation and store the correctly rounded result in memory or a register. Alternatively, the integers 1 and 10 might be input to the program and the ratio 1/10 generated by a division operation. In this case too, the input-handling program must be called to read the integer strings 1 and 10 and convert them to binary representation. Either integer or oating point format might be used for storing these values in memory, depending on the type of the variables used in the program, but these values must be converted to oating point format before the division operation computes the ratio 1/10 and stores the nal oating point result. From the point of view of the underlying hardware, there are relatively few operations which can be done on oating point numbers. These inclu...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online