Difference between digital and analog signals?

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?

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.

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.

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

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.

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.

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.

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). 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.

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.

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.

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

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”.

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).

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

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

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.

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.

Sorry…thought I heard someone say my name.

Carry on.

-D/a