9/29/04

A student writes:

```     Hi, I am wondering about how practical building a scoreboard
that uses 35 bits to store its state be. If the scoreboard used 36
bits to store state, couldn't each bit represent a value? For example,
00110010001010100..., the first seven bits (0011001) could represent
25 points, the next 2 bits could represent the down, and so forth. If
35 bits were used, would each set of bits need to be indexed with
what they are to represent? 10010110110000111010010111101111011 would
have to be calculated to correspond to the values of each variable in
the state. If one more bit were added,
1001011 01 1000011 10 100101 1 1101 111011 would correspond to

1001011= 75 points,
01 for 2nd down,
1000011 for 67 yards to gain,
10 for 3rd quarter,
100101 for 37th yardline,
1 for visitor posession,
1101 for 13 minutes
and 111011 for 59 seconds.
This does waste one more bit, but isn't an extra RS latch worth
needing a more complicated circuit? Unless there is some simple way
to derive each value from the 35 bit method that I'm missing here.

Thanks,
<< name withheld >> ```

Yup, this scoreboard has certainly generated a lot of enthusiasm.

BUT, before I answer the question, I need to tell you that my answer of (99*98)/2 for the number of possible scores was just plain wrong. One more example of allowing my brain to go to sleep while my fingers are still on the keyboard. For those who care where I got that, I was thinking about final scores, not intermediate scores, which is of course silly since the most important thing about a scoreboard is that it gives you intermdiate scores while the game is going on! AND, so I did not accept a tie game, although of course plenty of games are tied, plenty of times, during the game. To make matters worse, I did not see that:

```          Texas    28
Oklahoma  0```

was any different from

```          Texas     0
Oklahoma 28```

and for that they could banish me forever.

Now, then, having apologized profusely, let me deal with the question raised by the student. The problem asked for the minimum number of bits because it is often important to know how few state variables are actually necessary. We showed the alternate solution (43 bits, rather than 42 bits) for exactly the reason you state: that it is much simpler circuitry if we separately encode each element, rather than have to decode a 42 bit value in order to get all the desired information to display on the scoreboard.

So, in the case of a practical scoreboard, we would in fact use 43 bits to describe the state, and use 7 of those bits (for example) for the display of Texas' score, another 7 to display Oklahoma's score, 2 for the down, etc.

Will you ever look at an electronic scoreboard in the same way again?

Yale Patt