6 If x contains the integer decimal value 42 which of the fo

6. If x contains the integer decimal value 42, which of the following are TRUE statements? Select ALL correct responses.

a. The binary (base 2) representation of x is 101010.

b. The hexadecimal representation of x is 2A (written in C as 0x2A).

c. The value of the expression (x ^ x) is 1.

d. The decimal value of the expression (x >> 1) is 21.

e. The binary value of the expression (x << 2) is 10101000.

7. In our C environment, which ONE of the following best describes how a double is represented internally?

a. One sign bit, 8 exponent bits, and 23 mantissa bits, for a total of 32 bits.

b. An integer value represented in two\'s-complement format.

c. One sign bit, 11 exponent bits, and 52 mantissa bits, for a total of 64 bits.

d. An integer value represented in one\'s-complement format.

e. An integer value, where the leftmost bit is the sign, and the remaining 31 bits represent the magnitude.

Solution

6. If x contains the integer decimal value 42, which of the following are TRUE statements? Select ALL correct responses.

a. The binary (base 2) representation of x is 101010. TRUE

b. The hexadecimal representation of x is 2A (written in C as 0x2A). TRUE

c. The value of the expression (x ^ x) is 1. FALSE

d. The decimal value of the expression (x >> 1) is 21. TRUE

e. The binary value of the expression (x << 2) is 10101000. TRUE

The value of the expression (x << 2) is 168 and it\'s binary representation is 10101000.

7. In our C environment, which ONE of the following best describes how a double is represented internally?

c. One sign bit, 11 exponent bits, and 52 mantissa bits, for a total of 64 bits.

6. If x contains the integer decimal value 42, which of the following are TRUE statements? Select ALL correct responses. a. The binary (base 2) representation o

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site