logo CodeStepByStep logo

bitwise1

Author: Julie Zelenski (on 2018/02/03)

Test your understanding of bitwise ops by evaluating the following expressions and writing their results in binary. (We used char to keep things simple, but the bitwise operators have same behavior for int, just with more bits.)

unsigned char this = 0xf0;
unsigned char that = 0x55;
this
that
this & that
this | that
this ^ that
~this
this >> 2
that << 1

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.