A ceiling fan regulator has many speed positions, but the switch on the same fan has only two, on and off. Electronic equipment shows the same contrast. Some quantities change smoothly and some take only two states, and a computer is built on the second kind.

Analog and Digital Signals

A signal is a quantity, such as voltage, that carries information. An analog signal can take any value within a range and changes continuously, as the voltage from a microphone does. A digital signal can take only a limited set of values. In most computers there are two values, a low voltage and a high voltage, which are written as 0 and 1.

Definition: Digital signal. A signal that has only a fixed set of distinct levels, usually two, which represent the binary digits 0 and 1.

Digital signals are preferred because a small disturbance does not change the meaning. A signal near the high level is still read as 1. As Table 1.1 shows, this gives digital systems reliability, easy storage and exact copying.

Table 1.1: Comparison of analog and digital signals

Property Analog signal Digital signal
Values Continuous range Limited set of levels
Effect of noise Changes the value Usually ignored
Storage Difficult to store exactly Stored as bits
Example Microphone voltage Output of a logic gate

Digital Logic

Digital logic is the study of circuits that work on digital signals and produce digital outputs according to fixed rules. The basic building blocks are logic gates. A gate takes one or more inputs of 0 or 1 and gives one output. Circuits built from gates can add numbers, compare values, select data and remember a bit.

Digital Computers

A digital computer is a machine that accepts data in digital form, processes it by digital logic according to a stored program, and produces results in digital form. It manipulates only binary patterns. Numbers, text, images and sound are all converted into such patterns before the computer works on them. The later sections of this unit describe the number systems and codes used for this conversion.

Example 1.1: Reading a digital signal

Problem: A circuit treats a voltage of 2 V or more as logic 1 and a voltage of 0.8 V or less as logic 0. Decide the logic value of 3.1 V, 0.4 V and 4.7 V.

Solution:

  1. 3.1 V is above 2 V, so it is read as logic 1.
  2. 0.4 V is below 0.8 V, so it is read as logic 0.
  3. 4.7 V is above 2 V, so it is read as logic 1.

Result: The readings are 1, 0 and 1. A small noise of 0.3 V on any of these signals does not change the result.

Common mistakes

  • Treating a digital signal as having a continuous range of values.
  • Saying that 0 means no voltage in all circuits. In digital logic 0 and 1 are voltage ranges.
  • Confusing a digital computer with a calculator that only displays digits.

Key takeaways

  • Analog signals vary continuously; digital signals use fixed levels.
  • Two levels are written as 0 and 1.
  • Digital logic circuits are built from gates.
  • A digital computer processes data held as binary patterns.

Practice questions

  1. Define a digital signal.
  2. State one advantage of digital signals over analog signals.
  3. What do the two levels of a digital signal represent?

Answers to the practice questions

  1. A signal that takes only a fixed set of distinct levels, usually two, representing 0 and 1.
  2. Noise does not easily change the meaning, so data can be stored and copied without loss.
  3. The binary digits 0 and 1.

Sources

  • Official BCA syllabus Computer Architecture, course code 25BCA401DS02, Unit I