A lot of folks have mentioned that they are math challenged, and so had a hard time with the binary calculations required to answer the challenge questions in Chapter 8. Which reminds me of one of my favorite T-shirt quotes: “There are 10 kinds of people in the world. Those who understand binary, and those who don’t.” I was lucky enough to learn binary back when I was in high school, programming sprites on my Commodore 64. If that reference doesn’t date me, I don’t know what will.

In any case, the mathematically challenged need not despair. Here’s a brief snippet of code that yields the correct answers via a programming solution rather than a mathematical one, without having to do any binary math:

```
short infiniteLoop = 1;
short counter = 0;
while (infiniteLoop) {
counter ++;
printf("The counter is now %d.\n", counter);
if (counter < 0) {
printf("The short variable counter has maxed out!\n");
break;
}
}
```

A similar solution for unsigned short variables would read:

```
short infiniteLoop2 = 1;
unsigned short counter2 = 0;
while (infiniteLoop2) {
counter2 ++;
printf("The counter is now %d.\n", counter2);
if (counter2 == 0) {
printf("The unsigned short variable counter has maxed out!\n");
break;
}
}
```

Of course, coming up with both these solutions on your own requires foreknowledge of the fact that signed variables wrap around from their maximum to their minimum value, and that unsigned variables wrap back to zero.

Or, you can do what I did, and omit the ‘if’ clause, let the program run in an infinite loop, push the ‘Stop’ key, and scroll through the output to see what happened. I added the break condition later, once I figured out what was happening.