A computer lacks a division instruction and performs division iteratively using the technique described on page 300. Suppose we wish to evaluate 327/940. How many cycles of iteration would it take to get an accuracy of ten decimal places?

What will be an ideal response?


Consider the following equation.







The value of 327/940 = 0.3478723404255319148936170212766 (first 10 decimal places in bold)

If we scale 327/940 we get 0.327/0.940 and Z = 1.000 – 0.940 = 0.060.

First iteration Q = 0.327 × 1.060 = 0.34662 (accurate to 2 dps)

Second iteration Q = 0.34662 × (1 + 0.0036) = 0.347867832 (accurate to 4 dps)

Third iteration Q = 0.347867832 × (1 + 0.00001296) = 0.34787234036710272 (accurate to 10dps assuming

rounding).

Therefore, only three iterations are necessary.

Computer Science & Information Technology

You might also like to view...

ensure array second is of correct size (2 smaller)

What will be an ideal response?

Computer Science & Information Technology

Why is sign?extension an important issue when we use a LDR instruction to load a register from memory, but of no importance when we use an STR to store a register in memory?

What will be an ideal response?

Computer Science & Information Technology

Which of the following is a common standard used today and relies on a 256-bit block size?

A. AES B. DES C. Triple DES D. RC4

Computer Science & Information Technology

What are some of the steps for conducting a forensic analysis of virtual machines?

What will be an ideal response?

Computer Science & Information Technology