Borrowing from this question. How many ways are there to represent a 3 binary digit number that starts with 1 XOR ends with 0? I calculated the following:

  • number of ways to start with 1xx :$2^2$
  • number of ways to end with xx0: $2^2$
  • number of ways for both 1x0 : $2^1$

Mathematically I got the answer as $2^2 +2^2-2^1 = 6$ but using a tree diagram I found only 4 possible combinations: that is 101 111 000 010

I would like some help to pinpoint where I went wrong.


The ones that both start with 1 and end in 0 are represented twice in the two larger groups; excluding them once makes it so they are counted once, suitable for OR. But XOR needs the conjunction to be counted no times: subtract it out twice.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.