-2

I'm studying Network and Operating Systems at the moment and my instructor gave us a quiz. This had me a bit baffled. Any help will be much appreciated.

Another one of the questions is this: "How many different states can be represented by a four digit binary number? (Give your answer as a decimal number)"

user207421
  • 305,947
  • 44
  • 307
  • 483
110100100
  • 11
  • 4
  • I'm voting to close this question as [off-topic](http://stackoverflow.com/help/on-topic) because "_3. Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it._" – xmojmr Mar 27 '15 at 04:43
  • @xmojmr - Is a quiz already taken considered homework? It is certainly part of his studies and may be considered "homework" from that aspect, but it isn't literally a homework assignment from the instructor. I guess it depends on the community's definition of homework. I think it is really a math challenge that belongs on Mathematics, not really belonging on SO. – Ron Maupin Mar 27 '15 at 14:00
  • @RonMaupin the problem I see that classifies this question as off-topic is in my opinion not the homework vs. quiz problem but the "_work you've done so far...description of the difficulty_". It's just pasted assignment with **no** effort shown. Next student given the same assignment will throw it into google and get the answer without no thinking involved. Original purpose totally missed. Doing binary math like how many bits are needed to represent a number etc. is the 1st thing taught at the 1st grade of programming. No hi-mathematics needed – xmojmr Mar 27 '15 at 14:53
  • @xmojmr - I don't mean to argue with you, I agree this isn't the correct forum for the question as asked. I only suggested Mathematics because it says, "For people studying math at any level..." I actually had to learn different base systems in 3rd grade, so I do consider it prerequisite knowledge before anyone starts to learn programming. – Ron Maupin Mar 27 '15 at 17:28
  • @RonMaupin I also don't intend to argue or quibble or discourage anyone from wandering around. In the context of this question I've voted to close it as off-topic and I've voted that your answer is useful. I don't see a reason to change my will (now). You can read/influence the community's definition of homework etc. at `Meta Stack Overflow` or `Meta Stack Exchange` sites. One such definition is discussed in article [Meta Stack Exchange: The homework tag is now officially deprecated](http://meta.stackexchange.com/questions/147100/the-homework-tag-is-now-officially-deprecated) – xmojmr Mar 28 '15 at 03:25

1 Answers1

2

Three digits is eight, 2^3=8. Specifically the values 0 to 7.

Four digits is sixteen, 2^4=16. Specifically the values 0 to 15.

It's the same for any base. Three digits for decimal is 10^3 or 1000 which is 0 to 999, and three hexadecimal digits is 16^3 which is 4096 or 0 to 4095.

Ron Maupin
  • 6,180
  • 4
  • 29
  • 36