We know a regular computer basically only knows two states and that we name these states 0 and 1 respectively. This seems arbitrary, we could name them "a" and "b", or even 3 and 4. Is there a reason for the convention of naming them 0 and 1 ?
2 Answers
It most certainly is not arbitrary. Computing is rooted in mathematics. Binary notation in mathematics is also known as base-2.
Base-10 gives us 0-9 digits. Base-8 (octal) uses 0-7, and base-16 (hexadecimal) use 0-9 and a-f to represent the extra six digits not present in decimal notation.
The thing is, no matter what base you're using, zero is always zero, and one is always one. So, once you're using base-2 notation, you're pretty much resorting to 0 and 1.
The very earliest computers were actually decimal - used purely for calculations. Then mathematics started to incorporate logic, and computing theory really think of, and thanks to things like Turing completeness, and transistor states (on or off), computer scientists realised that true/false logic and base-2 mathematics were the best way to achieve the general purpose machines we use now.
- 4,161
It's not really true that they are (always) named 0 and 1. It depends on your point of view.
If you're dealing with numeric values, the computer does it in base-2, having the two digits named 0 and 1. And as numeric values make for very important computer applications, this naming is indeed very popular.
But a single bit can also stand for a boolean value false or true, often abbreviated as F and T.
From an electrical engineering point of view, a bit is represented by one of two voltage levels, being High and Low, abbreviated as H and L. And the mapping from H/L to T/F can come in both vesions. The natural mapping is that H stands for 1 or T, and L for 0 or F. But sometimes the hardware designers choose to make L mean the active (true) state of the signal, and H the inactive (false) state: that's called "active-low".
- 6,246