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

Write whether these conditions are true or false. (Assume the upper bits are zer

ID: 3614131 • Letter: W

Question

Write whether these conditions are true or false.
(Assume the upper bits are zero and the type is unsigned int)

Q = 00001101
U = 10101010
V = 11110001


[true/false]     if ((Q >> 3) & 0x1)== 1)
[true/false]     if ((V & 0xF0) == 1)
[true/false]     if ((V & 0xF1) == 1)
[true/false]     if ((U & 0x01) == 1)
[true/false]     if ((U >> 2 & 0x01)== 1)

[true/false]     if (Q & 0x0C)
[true/false]     if (U & 0x0C)
[true/false]     if ((V & 0x40) >>4)
[true/false]     if (Q & 0xF0)
[true/false]     if (U & 0x80)
[true/false]     if ((Q & 0x08) >>5)

please explain every thing.

Explanation / Answer

please rate-thanks Q = 00001101 U = 10101010 V = 11110001 [true/false]     if ((Q >> 3) & 0x1)== 1)         shift 3 bitsright the AND with 1 [true/false]     if ((V & 0xF0) ==1)                AND with 11110000, cant't be 1 since low order bit always 0 [true/false]     if ((V & 0xF1) ==1)                AND with 11110000 [true/false]     if ((U & 0x01) ==1)                 AND with 1 [true/false]     if ((U >> 2 & 0x01)== 1)         Shift 2 bitsright then AND with 1 these must equal 1 to be true [true/false]     if (Q &0x0C)                       AND with 1100    will be 1100 [true/false]     if (U &0x0C)                      AND with 1100     will be 1000 [true/false]     if ((V & 0x40) >>4)             AND with 100 0000 then shift 4    willbe   100 [true/false]     if (Q &0xF0)                         AND with 1100 0000   will be 0 [true/false]     if (U &0x80)                         AND with 1000 0000    will be 1000 0000 [true/false]     if ((Q & 0x08) >>5)              AND with 1000 the shift 5 will be 0