Why Computers use Binary

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   hear noise   go to next page

Answer:

  • The ignition switch of an automobile.  No
  • The hour hand of a clock.  No
  • A button on a hand calculator.  Yes
  • The volume control on a stereo.  No

Why Computers use Binary

 

The ignition switch of an automobile is discrete—it has definite states—but there are usually more than two states (off, running, start, acc...) A button on a electronic calculator is a binary device. It is either on or off. Ordinarily it is "off." When you push it, it is "on." It springs back to "off" when you release it, which is different from a toggle switch, but it still is a binary device.

There are many advantages to binary. Here are four (somewhat overlapping) important reasons for using binary:

  1. Simple; easy to build.
  2. Unambiguous signals (hence noise immunity).
  3. Flawless copies can be made.
  4. Anything that can be represented with some sort of pattern can be represented with patterns of bits.

These characteristics of binary were realized by Claude Shannon, a mathematician at Bell Telephone Laboratories. His 1948 paper A Mathematical Theory of Communication is the foundation of information theory and much of computer science.


QUESTION 3:

Which is easier to build:

  • An on/off switch.
  • A light dimmer.