Answers to questions on bit operations

What is the value of the folowing expressions?

  1. 1 ^ 4

    5
  2. 4 & 8

    0
  3. 1 & 3

    1
  4. 1 | 3

    3
  5. 1 ^ 3

    2

Back to the questions.


Back to notes on bit operators.