Question: 1) For this problem, first find the 32-bit binary representation (using two's complement) of the integer held by 'i' after the following code is executed.

1)

For this problem, first find the 32-bit binary representation (using two's complement) of the integer held by 'i' after the following code is executed. Then enter the 10 least significant digits of that binary representation (that is, the 10 rightmost digits of the bit string) in the box below. (Sadly, Webcourses cannot handle all 32 digits, which is why this question just got so weird.)

For example if the final bit string is 101010100000000001111111001100, enter 1111001100 as your answer.

int i = ~((84 ^ 116) << 2);

2)

After the following code is executed, what will be the integer value (in base 10) held by 'i'? (Enter its numeric value in the box below.)

int i = ~((84 ^ 116) << 2);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!