Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of 8 objects (a-h), and each object has a flag which can be set to 1 or 0. Is there a method that can show all possible combinations of objects and their flag statuses?

For example:

  • a=1,b=0,c=0,d=0,e=0,f=0,g=0,h=0
  • a=1,b=1,c=0,d=0,e=0,f=0,g=0,h=0
  • a=0,b=1,c=0,d=0,e=0,f=0,g=0,h=0


If there is such a method, I'd deeply appreciate any help. Please forgive me for my lack of math terminology!


share|cite|improve this question
up vote 1 down vote accepted

If you count from $0$ to $255=2^8-1$ in binary, each number is eight bits. If you consider the first bit a, the second bit b, etc., you are there.

share|cite|improve this answer
Thank you Ross, thats exactly what I was looking for :) – Chris Hexter Feb 29 '12 at 12:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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