In part 2 & part 3, I defined analog vs digital signals and gadgets. In this post, I will explain why digital gadgets have over-taken analog gadgets.

The electronic industry has been and will forever be reducing cost and adding features. As a result, more complexity is being required of electronic devices while reducing the cost of these devices.

The complexity translates itself into more functional blocks being placed into the devices:

## Analog processing

Unfortunately, every analog device suffers from three problems:

- noise
- distortion
- variation

noise is the random variations in current and voltage. Suppressing noise requires increasing the electronic circuit’s size and/or power consumption.

distortion is the deviation of an analog function from its ideal

variation is the fact that one cannot make two analog circuits exactly the same. There are always manufacturing differences that cause each circuit to have different characteristics (although in some and hopefully most cases they are undetectable).

## Digital processing

Digital processors do not suffer from the above problems. They instead work on sequential values, are able to compute functions of these values exactly, and store or output the results.

If one asks a digital circuit to compute $y=x^2+3.141$, it can be designed to give as exact a result as one wants. The only way the digital circuit can make an error is if it assigns a value of 0 rather than 1 to some bit somewhere.

### Rounding

There is one feature of digital circuits that I haven’t discussed yet: the notion of *rounding*.

Aside: I’ll explain in a future post how bits of 0 and 1 can represent arbitrary numeric values. Until then, just take my word that the only way a digital circuit can mess up is by generating a 0 when it should have generated 1 or vice versa.

When an analog signal is being converted to digital, its value is both sampled and rounded. The reason is that all digital circuits have finite precision. There are only so many bits that can fit—and only so many bits are worth fitting.

It’s very unlikely that the average July temperature measured at Chicago O’Hare airport is exactly 84 degrees. It’s probably something like 84.3 degrees. However, that last 0.3 degree is not going to make you pick a black sweater over a light T-shirt. Let’s round it to 84 degrees. There is some error, but it is rather insignificant.

In almost all cases, the rounding error caused by this *quantization* can be made lower than the noise and distortion an equivalent analog circuit would inject.

In fact, it is due to this rounding that variation is not such an issue with digital circuits. One can provide enough margin in the design of digital circuit so that variation is not enough to create a bit error. That is, that the only way a digital circuit can make a mistake is if it stores or sends out the wrong bit value, and the digital circuits are design to prevent that error from happening.

## The aDa line-up

Whereas in the past, one would have functional blocks A,B,C,D all analog, one now has the following system:

The functions A, B, C, and D are all implemented digitally. The blocks y and z convert from analog to digital (analog-to-digital converter—ADC) and from digital to analog (digital-to-analog converter—DAC). The overhead of the added analog blocks y and z is greatly outweighed by the saving in area and power (and the increase in functionality) afforded by making A, B, C, and D all digital.

In many cases, one wants the end result to be digital (for example, recording to a CD or flash drive). So, the last stage need not exist. (Or it exists in the form of a laser that writes the bits to the disc, or in the form of a solid-state device that stores the binary 1’s/0’s in a flash drive.)

In other cases, the source is digital but the eventual output is analog—for example a CD or portable music player. In these cases, block y is not required. The CD player or portable music player can do things such as equalization and surround sound processing all digitally.

In a future post, I’ll explain why those analog blocks y & z are necessary.