# Difference between digital and analog signals?

**URL:** <https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529>\
**Category:** Factual Questions\
**Created:** [January 17, 2013, 4:53pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529 "2013-01-17T16:53:45Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dog80](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@Dog80](https://boards.straightdope.com/u/Dog80)\
**Post date:** [January 17, 2013, 4:53pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/1 "2013-01-17T16:53:45Z")

</div>

A highschool textbook had this question: Which signals are digital and which analog?

There were a sine wave, a square pulse, a triangular wave something that looked like a pulse train and something totaly arbitrary. The correct answer was that the square wave and pusle train are digital and the others analog IIRC.

But is this really correct? Square waves can be produced with a 555 chip and that is as analog as it gets.

Also the sine waves produced by my function generator are digital. If you zoom in enough with the scope you can see the discrete steps that make the sine wave.

So what is the real difference between a digital and analog signal? If time and space are quantized as some scientists theorize, does that mean that everything is digital after all?

---

<div class="post-metadata">

**Author:** ![johnpost](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@johnpost](https://boards.straightdope.com/u/johnpost)\
**Post date:** [January 17, 2013, 5:04pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/2 "2013-01-17T17:04:52Z")

</div>

the level of the students and purpose of the course has to be considered for which is a correct enough answer.

digital signals have to be easy to encode and decode to be useful.

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [January 17, 2013, 5:18pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/3 "2013-01-17T17:18:48Z")

</div>

It is sort of philosophical. At the most basic level all signals are analog signals. That is they are continuous. We can generate the signals using digital data. And we can decode signals to digital data.

The difference between digital and analog is more how the signal was generated and how it is interpreted.

If you look at the signal from a digital cellphone it will look like a varying sine wave. There will be no sharp corners that you see on square waves. To get these nice sine waves out there is digital to analog conversion. Much like the sine wave from your function generator.

All that said the answer also depends on context. In some contexts we talk about digital communications like with cell phones or cable modems. These usually have some digital to analog conversion and analog to digital conversion in the process.

Are the sinewave out of the DA converter analog? Yes.  
Is the system digital? Yes

So the answer in the book is reasonable.

Quantum mechanics has nothing to do with things being digital or analog.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [January 17, 2013, 5:22pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/4 "2013-01-17T17:22:36Z")

</div>

Straight lines, digital. Curved lines, analog. At least that’s the expected answer.

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [January 17, 2013, 6:07pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/5 "2013-01-17T18:07:24Z")

</div>

Ones and zeros are \*often \*represented by a square wave or some kind of “pulse-looking” wave. So the book is more-or-less correct. But strictly speaking, any wave can be used to represent ones and zeros. Those old dial-up modems frequency modulated a sine wave to represent ones and zeros.

By the same token, a PWM square wave can be used to represent a continuous or quantized (e.g. 8 bit) quantity. This is how most PID controllers work.

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [January 17, 2013, 6:20pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/6 "2013-01-17T18:20:16Z")

</div>

You can have signals that are both. You can vary the on time of a digital pulse in a continuous way, for example. This is how position information is sent to typical RC servos: A 0.5 to 1.5 ms long pulse is sent to the servo, indicating a ~90 degree total travel range, where 1.0ms indicates center.

---

<div class="post-metadata">

**Author:** ![Amateur\_Barbarian](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Amateur\_Barbarian](https://boards.straightdope.com/u/Amateur_Barbarian)\
**Post date:** [January 17, 2013, 6:29pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/7 "2013-01-17T18:29:26Z")

</div>

> [@Kevbo](#):
>
> You can have signals that are both. You can vary the on time of a digital pulse in a continuous way, for example. This is how position information is sent to typical RC servos: A 0.5 to 1.5 ms long pulse is sent to the servo, indicating a ~90 degree total travel range, where 1.0ms indicates center.

That’s still a purely digital signal; the servo is doing a mechanical D-A conversion.

---

<div class="post-metadata">

**Author:** ![Kevbo](https://avatars.discourse-cdn.com/v4/letter/k/e47774/32.png) [@Kevbo](https://boards.straightdope.com/u/Kevbo)\
**Post date:** [January 17, 2013, 6:36pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/8 "2013-01-17T18:36:44Z")

</div>

> [@NitroPress](#):
>
> That’s still a purely digital signal; the servo is doing a mechanical D-A conversion.

Nope. It usually feeds an analog integrator that converts analog time to analog voltage or current usually, but it is also possible to convert the feedback pot signal to a time pulse and compare them without ever having to convert the input.  
If it were digital, there would be discreet position steps, but there are not. Position resolution is infinite.

---

<div class="post-metadata">

**Author:** ![Amateur\_Barbarian](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Amateur\_Barbarian](https://boards.straightdope.com/u/Amateur_Barbarian)\
**Post date:** [January 17, 2013, 6:42pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/9 "2013-01-17T18:42:08Z")

</div>

> [@Kevbo](#):
>
> Nope. It usually feeds an analog integrator that converts analog time to analog voltage or current usually, but it is also possible to convert the feedback pot signal to a time pulse and compare them without ever having to convert the input.
> 
> If it were digital, there would be discreet position steps, but there are not. Position resolution is infinite.

I stand by what I said. It’s doing an integration of the digital signal to produce a mechanically-based analog output. You’re confusing true D-A with digital simulation of analog signals, such as delta modulation or MP3 decoding. The resolution is limited to the integrator and positioner resolutions, which are not infinite but not necessarily confined to discrete steps, either.

---

<div class="post-metadata">

**Author:** ![Michael63129](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Michael63129](https://boards.straightdope.com/u/Michael63129)\
**Post date:** [January 17, 2013, 6:57pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/10 "2013-01-17T18:57:32Z")

</div>

> [@gazpacho](#):
>
> If you look at the signal from a digital cellphone it will look like a varying sine wave. There will be no sharp corners that you see on square waves. To get these nice sine waves out there is digital to analog conversion. Much like the sine wave from your function generator.

Nitpick: Cell phones do not generate the RF signal with a DAC, if just because you’d need a DAC running at many(!) GHz to produce a reasonably accurate sine wave. Rather, they modulate an analog oscillator between two frequencies (FM modulation, basically, if in more advanced formats like [GMSK](http://en.wikipedia.org/wiki/GMSK#Gaussian_minimum-shift_keying)). The only part that is digital is how the data is processed (with a digital signal processor); cell phones are basically analog devices, like anything else that processes analog signals (sound, video). Even if you use a digital (Class D) amplifier to drive a speaker, the output is ultimately analog, as must be the input from the microphone.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [January 17, 2013, 7:03pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/11 "2013-01-17T19:03:42Z")

</div>

> [@TriPolar](#):
>
> Straight lines, digital. Curved lines, analog. At least that’s the expected answer.

No, the OP said that triangular waves are considered analog. Which makes sense to me if they’re considering “digital” to mean all-or-nothing, on/off, 1/0; whereas analog allows continuous variation from 1 to 0.

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [January 17, 2013, 7:14pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/12 "2013-01-17T19:14:27Z")

</div>

> [@Michael63129](#):
>
> Nitpick: Cell phones do not generate the RF signal with a DAC, if just because you’d need a DAC running at many(!) GHz to produce a reasonably accurate sine wave. Rather, they modulate an analog oscillator between two frequencies (FM modulation, basically, if in more advanced formats like [GMSK](http://en.wikipedia.org/wiki/GMSK#Gaussian_minimum-shift_keying)). The only part that is digital is how the data is processed (with a digital signal processor); cell phones are basically analog devices, like anything else that processes analog signals (sound, video). Even if you use a digital (Class D) amplifier to drive a speaker, the output is ultimately analog, as must be the input from the microphone.

I work on cellphones there is a DAC. The specific LTE protype I have been working on the last few years runs the DAC at 30.72 MHz this is then unconverted to the assigned frequency. We did similar things on the CDMA and GSM and UMTS modems that I worked on earlier. I haven’t seen chips that did things the way you are talking about for about 10 to 15 years.

The digital part keeps moving closer and closer to the RF.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [January 17, 2013, 7:16pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/13 "2013-01-17T19:16:17Z")

</div>

> [@Thudlow\_Boink](#):
>
> No, the OP said that triangular waves are considered analog. Which makes sense to me if they’re considering “digital” to mean all-or-nothing, on/off, 1/0; whereas analog allows continuous variation from 1 to 0.

True. I should have said vertical and horizontal lines for digital.

---

<div class="post-metadata">

**Author:** ![CJJ](https://avatars.discourse-cdn.com/v4/letter/c/ecc23a/32.png) [@CJJ](https://boards.straightdope.com/u/CJJ)\
**Post date:** [January 17, 2013, 7:36pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/14 "2013-01-17T19:36:17Z")

</div>

Analog signals are ones where a continuous value of information is homologically mapped to a continuous aspect of the signal (amplitude, frequency, or phase). In the simplest case, the information value is directly proportional to the signal aspect, but other mappings can be used to avoid or take advantage of some aspect of the communication medium (e.g. tape recording is an analog process because the continuous value “sound amplitude” is mapped to “amount of magnetization” on the tape, and it remains analog even under Dolby A compression).

A digital signal is one that uses a coding scheme to first “round” the continuous value of information to a defined integer value (hence, technically, losing some information right away), and then encodes that value in some otherwise-continuous aspect of the signal. I often explain to students that, for audio, sheet music is a crude example of digitized sound; it encodes pitch and duration of sound into discrete patterns that needs to be decoded by a computer/musician.

For me then, the OP’s question seems to misunderstand the nature of analog/digital. The sine wave, for example, could be digital if it is sending a pattern of all-zero/all one in a simple amplitude-shift, frequency-shift or phase-shift keying. But I agree with **Thudlow Boink** in that the text is assuming “analog” = “continuously varying” and “digital” = “all or nothing”.

---

<div class="post-metadata">

**Author:** ![Michael63129](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Michael63129](https://boards.straightdope.com/u/Michael63129)\
**Post date:** [January 17, 2013, 7:39pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/15 "2013-01-17T19:39:34Z")

</div>

> [@gazpacho](#):
>
> I work on cellphones there is a DAC. The specific LTE protype I have been working on the last few years runs the DAC at 30.72 MHz this is then unconverted to the assigned frequency. We did similar things on the CDMA and GSM and UMTS modems that I worked on earlier. I haven’t seen chips that did things the way you are talking about for about 10 to 15 years.
> 
> The digital part keeps moving closer and closer to the RF.

I was referring more to the generation of the actual RF signal; to generate just a simple square wave with a DAC, you need a clock frequency that is twice the signal frequency (assuming the DAC can swing its output fast enough between the two states); a good sine approximation requires a much higher clock than signal.

Also, if you look at the link I provided for GMSK (used in GSM phones), it makes it sound like a glorified form of FM modulation (a form of frequency-shift keying, as seen in [this example](http://en.wikipedia.org/wiki/File:Fsk.svg)).

Also, if I have it right, this is the signal processing chain involved in a cell phone; the DSP (digital signal processor) is the only truly digital part and is what makes the phone “digital”, as opposed to an analog phone:

microphone -\> preamp -\> ADC -\> DSP -\> DAC -\> modulator -\> transmitter

receiver -\> demodulator -\> ADC -\> DSP -\> DAC -\> amplifier -\> speaker

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [January 17, 2013, 8:17pm UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/16 "2013-01-17T20:17:03Z")

</div>

> [@Michael63129](#):
>
> I was referring more to the generation of the actual RF signal; to generate just a simple square wave with a DAC, you need a clock frequency that is twice the signal frequency (assuming the DAC can swing its output fast enough between the two states); a good sine approximation requires a much higher clock than signal.
> 
> Also, if you look at the link I provided for GMSK (used in GSM phones), it makes it sound like a glorified form of FM modulation (a form of frequency-shift keying, as seen in [this example](http://en.wikipedia.org/wiki/File:Fsk.svg)).

This FM modulation for the last 10 years is mostly being done digitally. With the signal processing acting somewhat like a waveform generateor.

> [@](#):
>
> Also, if I have it right, this is the signal processing chain involved in a cell phone; the DSP (digital signal processor) is the only truly digital part and is what makes the phone “digital”, as opposed to an analog phone:

What make it a digital phone vs and anlog phone is that you are encoding and transmitting 1s and 0s instead of transmitting modulated voice. You transmit texts and emails using the same modulation and signaling as you do voice. The radios in the phones are just sending bits that higher level software in the phone decides is a text or 20 milli seconds of voice.

> [@](#):
>
> microphone -\> preamp -\> ADC -\> DSP -\> DAC -\> modulator -\> transmitter
> 
> receiver -\> demodulator -\> ADC -\> DSP -\> DAC -\> amplifier -\> speaker

The above diagram is pretty much correct except most people in the industry would change modulator to upcoverter and demodulator to down coverter. Most diagrams would look something like.  
mic -\> ADC -\> voice compression (DSP) -\> modulation (DSP) -\> ADC -\> upcoveter -\> RF power amp -\> radio waves

radio waves -\> downcoverter -\> ADC -\> demodulation (DSP) -\> voice uncompression (DSP) -\> DAC -\> speaker

People will talk about the radio waves being a digital signal as different from the analog signal for something like AM radio. Like with most words context matters.

---

<div class="post-metadata">

**Author:** ![Digital\_is\_the\_new\_Analog](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@Digital\_is\_the\_new\_Analog](https://boards.straightdope.com/u/Digital_is_the_new_Analog)\
**Post date:** [January 18, 2013, 4:21am UTC](https://boards.straightdope.com/t/difference-between-digital-and-analog-signals/647529/17 "2013-01-18T04:21:28Z")

</div>

Sorry…thought I heard someone say my name.

Carry on.

-D/a
