# Analog vs Digital – Part 3: Digital

In part 2, I defined the analog signal and the analog gadget. In this post, I give a definition for a digital signal/gadget with examples.

signal: a digital signal occurs as a sequence of values

From this definition, very few things that one encounters are intrinsically digital. Nonetheless, many analog signals are converted to digital (through a process called sampling or digitizing) and can gain the benefits of digital processing.

## Signals

Very few intrinsically digital signals exist. Some notable ones are:

stock prices
votes (per hour) in an election
musical notation

In a free market, the market sets the stock price. As a result, thereâ€™s no price assigned to a stock unless a trade occurs. Consequently, stock prices are a sequence of values, not a continuum of values.

Note that intrinsically digital signals result from instantaneous events of events with well-defined start and stop times. (Start and stop times are instantaneous events.)

This very narrow definition of digital begs the question: how did digital processing over-take analog processing when most of what one encounters is analog?

The reason is that any analog signal can be converted to digital through a process called sampling.

Letâ€™s look again at the temperature measured at Chicago Oâ€™Hare airport. One will notice that there are bubbles for each month. For each month, one can record the average temperature in that month. One has sampled the temperature once per month. So, one has taken an analog signal and converted to a sequence of valuesâ€”one has converted it to a digital signal.

Although the temperature is analog, we have used a sequence of instantaneous events (sampling once per month) to convert it into a digital signal.

While one loses some amount of information in converting from analog to digital, one can see that thereâ€™s not a heck of a lot happening in-between June and July that connecting the dots from 79 degrees to 84 degrees wouldnâ€™t show:

Consider the digital watch. Some of you may have watches that look like an analog watchâ€”possibly with three hands (hour, minute, seconds) rather than two (hour, minute). If you have one of these, take a close look at the seconds hand. Youâ€™ll notice that it makes jumps, hopping from one number to the next.

Inside the watch, there is a digital circuit that updates the time every secondâ€”it processes the time update as a sequence of values.

Consider the compact discâ€”a digital recording device, in contrast to the analog cassette tape.

To get a recording on CD, the sound wave goes into the microphone and is converted to a voltage. Somewhere (inside your computer for example), an analog-to-digital converter measures the voltage periodically. This sampling needs to be done frequently enough so that we donâ€™t give the signal much time in-between samples to do anything other than connect the dots:

infrequent sampling

frequent sampling

In the case of CDâ€™s, the sound is sampled at a rate of 44,100 times per second, or 44.1 kHz. Note that this is a bit more than twice the generally accepted highest frequency of sound: 20 kHz.