Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Multiple choice computer systems problem this is options for b this is for optio

ID: 3744159 • Letter: M

Question

Multiple choice computer systems problem

this is options for b

this is for option C

this is options for d

this is options for e

Work through question number 2.88 in the Computer Systems: A Programmer's Perspective, 2nd Edition textbook: We are running programs on a machine where values of type int have a 32- bit two's-complement representation. Values of type float use the 32-bit IEEE format, and values of type double use the 64-bit IEEE format. We generate arbitrary integer values x, y, and z, and convert them to values of type double as follows: /* Create some arbitrary values int x random() int y random) int z- random) / Convert to double double dx(double) x; double dy(double) y double dz(double) z; Page 164 For each of the following C expressions, you are to indicate whether or not the expression always yields 1. If it always yields 1, describe the underlying mathematical principles. Otherwise, give an example of arguments that make it yield 0. Note that you cannot use an IA32 machine running gcc to test your answers, since it would use the 80-bit extended-precision representation for both float and double.

Explanation / Answer

a) x is an integer so double and float of x is an integer so (c-last) is correct.

b) x and y both are the integer and converted to the double yield int and subtraction of the integer is int so (a first) is correct.

c) The addition is associative so we can add the digit in any order so (c last ) is correct.

d) c) is correct because normal multiplication is associative and we have enough fraction bit.

e) The number is different so it can be 1 but sometimes when any one of them is 0 then give different results.so (b) is correct