Computers can be either digital or analog. Virtually all modern computers are digital. Digital refers to the processes in computers that manipulate binary numbers (0s or 1s), which represent switches that are turned on or off by electrical current. A bit can have the value 0 or the value 1, but nothing in between 0 and 1. Analog refers to circuits or numerical values that have a continuous range. Both 0 and 1 can be represented by analog computers, but so can 0.5, 1.5, or a number like p (approximately 3.14).
A desk lamp can serve as an example of the difference between analog and digital. If the lamp has a simple on/off switch, then the lamp system is digital, because the lamp either produces light at a given moment or it does not. If a dimmer replaces the on/off switch, then the lamp is analog, because the amount of light can vary continuously from on to off and all intensities in between.
Analog computer systems were the first type to be produced. A popular analog computer used in the 20th century was the slide rule. To perform calculations with a slide rule, the user slides a narrow, gauged wooden strip inside a rulerlike holder. Because the sliding is continuous and there is no mechanism to stop at any exact values, the slide rule is analog. New interest has been shown recently in analog computers, particularly in areas such as neural networks. These are specialized computer designs that attempt to mimic neurons of the brain. They can be built to respond to continuous electrical signals. Most modern computers, however, are digital machines whose components have a finite number of states—for example, the 0 or 1, or on or off bits. These bits can be combined to denote information such as numbers, letters, graphics, sound, and program instructions.