If unsigned int x = 168 and unsigned int y =60; If z = x & y; What's z? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

If unsigned int x = 168 and unsigned int y =60; If z = x & y; What's z?

Please answer this unsigned int x = 168; unsigned int y =60; If z = x & y; What's z?

2nd Nov 2022, 6:04 AM
John Nwaigbo
John Nwaigbo - avatar
1 Answer
0
It must return 40 to z. Explanation: 168 -> 10101000 060 -> 00111100 therefore on doing & with each bit we have: 101000 = 40
2nd Nov 2022, 7:13 AM
I am offline
I am offline - avatar