Introduction
Back in the day (when years began with "1"), I was an electronics instructor at ECPI for a while. I absolutely loved this job! You can learn a lot of logic when you study electronics. And one of the fascinating facts about logic is: There are four states to two-state logic.
"What?"
I had the same response. So let's back up a minute and think about it.
What is Two-State Logic?
Two-state - or binary, or Boolean - logic is the stuff of 1's and 0's. Hence the name "two-state." Depending on how you wish to express them, the two states are:
-
1, On, High, Hi, H
-
0, Off, Low, Lo, L
"Yeah Yeah, We Get It. The Other Two States?"
The other two states are Don't Know and Don't Care. Don't Know is usually represented with a question mark: "?"; Don't Care, with an "X". Where would you use these?
Don't Care
Don't Care is the easiest to explain so let's start there.
Binary logic can be used to represent higher base-number systems such as hexadecimal (base-16) and decimal (base-10). BCD (Binary-Coded Decimal) represents base-10 numbers using binary (base-2) logic. How does BCD work?
BCD (Base-10) |
Binary (Base-2) |
| 0 |
0000 |
| 1 |
0001 |
| 2 |
0010 |
| 3 |
0011 |
| 4 |
0100 |
| 5 |
0101 |
| 6 |
0110 |
| 7 |
0111 |
| 8 |
1000 |
| 9 |
1001 |
With these 10 representations, we've covered the numerals in base-10. What about the remaining combinations of Binary numbers? What about 1010, 1011, 1100, 1101, 1110, and 1111? We Don't Care.
One way to represent this in a diagram is:
BCD (Base-10) |
Binary (Base-2) |
| 0 |
0000 |
| 1 |
0001 |
| 2 |
0010 |
| 3 |
0011 |
| 4 |
0100 |
| 5 |
0101 |
| 6 |
0110 |
| 7 |
0111 |
| 8 |
1000 |
| 9 |
1001 |
| X |
1010 |
| X |
1011 |
| X |
1100 |
| X |
1101 |
| X |
1110 |
| X |
1111 |
When designing logic, X's (Don't Care's) can be treated as either 1's or 0's. This is convenient for simplifying logic expressions through Boolean algebra, Karnaugh Maps, or even manually.
Don't Know
Don't Know is tricksy. Sometimes, Don't Know is an indication that you haven't finished the logical design; your current I/O doesn't allow enough states. Sometimes, Don't Know can be akin to NULL in a database. Unlike Don't Care, Don't Know's cannot simply be toggled at will to simplify the expression - they must either be solved (defined) or worked around.
If I find a Don't Know completely surrounded by one value or another, that's a clue. The Don't Know is probably that value.
Conclusion
There really are four states to two-state logic (I can't make this stuff up!).
:{> Andy