Search code examples
architecturebinaryhardwareternary-operatorcpu-architecture

Why Do Computers Use the Binary Number System (0,1)?


Why Do Computers Use the Binary Number System (0,1)? Why don't they use Ternary Number System (0,1,2) or any other number system instead? What is the gain in using Binary Numbers?


Solution

  • This is a classic example of software thinking in a hardware world :)

    Oh my. Am I the only one who remembers vacuum tubes, or valves as we used to call them? Logic DIDN'T start with transistors, friends. The first computer (ENIAC) used lots of tubes, diodes and relays.

    As has been mentioned, the usage of the binary system in modern computers relates to electrical states and logic. If you will recall, TTL (Transistor-Transistor Logic) advanced computing significantly (making it orders of magnitude faster, cheaper and more reliable to create memory and logic circuits) TTL devices are made up of electronic semi-conducting material (Silicon) which when assembled and configured as a transistor, can be made to either amplify a signal or act as a gated switch.

    You can arrange large arrays of these TTL circuits to "store" states. We can go on, but suffice to say the reason for BINARY being around is the same then as it is today.

    Numbers are represented by bits, those bits are discrete electrical lines with the state logic of TRUE/FALSE, which is mapped directly to the electrical representations of ON/OFF.

    This is the only reliable and economic hardware architecture that makes sense. Ones (1's) and Zero's (0's) rule the world because they are the most granular, reliable and cost effective circuits to produce.