Analog and digital signals - Page 1
Forum section: electronics / beginners

author: darko31
author_rank: Regular Contributor
timestamp: February 05, 2015, 01:25:51 pm
content: Me and my room mate got in a fight on terminology between analog and digital signals.If definition of analog signal is any continuous signal for which the time varying feature (variable) of the signal is a representation of some other time varying quantity, and digital signal is a representation of a sequence of discrete values.Then what kind of signal is modulated signal that consists of data and carrier frequency?For example here's a frequency-shift keying modulated signalis that modulated signal a digital or analog one?

author: c4757p
author_rank: Super Contributor
timestamp: February 05, 2015, 01:27:44 pm
content: Irrelevant. Signals aren't analog or digital, methods of processing them are.

author: darko31
author_rank: Regular Contributor
timestamp: February 05, 2015, 01:29:44 pm
content: Exactly. thank you for clarification.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 05, 2015, 02:09:57 pm
content: Digital is a subset of analog. All real digital signals are continuous. This is why digital logic always includes specs on logic high/low (input and output) voltages and currents, rise/fall time, and propagation delay.The specific case for which digital is a subset, is of amplifiers with excessive gain: so that a relatively narrow voltage or current range (the threshold) is magnified, and clipped at the supply rails. Some CMOS families can indeed be used for analog amplification (the CD4xxxUBE and 74HCUxx types most commonly). Logic functions are implemented by connecting such amplifiers in series and parallel, forming the familiar gates and latches. In addition to static, amplifying gates, there are also transmission gates (bilateral or analog switches) and dynamic logic (which depends upon the capacitances of internal nodes to implement a logic function within a certain time span). The latter is why some processors (mostly older technology, like the Z80-CPU in NMOS) must run at a fixed clock frequency, or else they produce nonsense results or simply lock up.Tim

author: elgonzo
author_rank: Unknown
timestamp: February 05, 2015, 02:41:28 pm
content: Quote from: c4757p on February 05, 2015, 01:27:44 pmYou seem to confuse the term "signal" with the underlying (physical) phenomenon (more specifically a waveform in the case of this question). There are analog signals and there are digital signals. Saying that signals aren't analog or digital is incorrect.What makes a voltage swing, a change in frequency or some other (physical) phenomenon a signal is the information that is being associated with the behavior or properties of that particular physical phenomenon.As you already alluded to, whether a signal is digital or analog has nothing to do with the nature of the physical phenomenon (like voltage changing over time) which is chosen to represent a certain information.Whether the waveforms in darko31's question represent analog or digital signals can only be answered by knowing (or assuming) how information is associated with particular properties of the waveform. Essentially, the processing required to extract the information from the waveform is determined by whether the waveform represents an analog or digital signal.Simply put, a signal has associated information. Digital signals are discrete and quantized, whereas analog signals are not.In darko31's example, the modulated waveform clearly represents a digital signal. Treating the waveform as an analog signal will not provide you the information that has been associated with this waveform by the creator/provider/sender/source.

author: sunnyhighway
author_rank: Frequent Contributor
timestamp: February 05, 2015, 08:06:24 pm
content: A signal is neither digital nor analog. Its just that, a signal, a piece of information. Just like a traffic light or a road sign.The information the signal represents can be either digital or analog.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 05, 2015, 09:43:58 pm
content: No, it's not either-or, it's superset-subset.

author: elgonzo
author_rank: Unknown
timestamp: February 06, 2015, 03:21:35 am
content: Quote from: sunnyhighway on February 05, 2015, 08:06:24 pmIs the information in the newspaper digital or analog?Information is neither digital or analog. It is thesignalthat is digital or analog.

author: helius
author_rank: Super Contributor
timestamp: February 06, 2015, 03:37:40 am
content: I would agree with subset-superset. A digital device is simply an analog device that obeys a certain discipline, and a "digital signal" is only distinct from an "analog" signal by being a valid input to some digital device.This is obvious if you consider digital devices being abused as analog transducers, like stepper motor music.As well, sometimes the analog properties of "digital signals" are significant engineering problems. This is why optical and magnetic tracks are encoded in a manner that minimizes their DC component.

author: c4757p
author_rank: Super Contributor
timestamp: February 06, 2015, 03:39:10 am
content: Quote from: elgonzo on February 06, 2015, 03:28:30 am"discreteand quantized" is a subset of "notnecessarilydiscrete and quantized". Or did you think you can actually get infinite values in analog? We have a resolution too, we just call it the "dynamic range"...

author: digsys
author_rank: Unknown
timestamp: February 06, 2015, 04:51:30 am
content: Quote from: elgonzoI kinda agree with this part, it's all in the wording though :-) Lawyers would LOVE this case !! :-)Quote from: elgonzoI question this though ...represents a digital signal.... at the front end of the receiver there'll be a analogue band-pass filter which will pass/failthe waveform. A square wave of the same M/S would fail. To me it's acting as an A/D converter.Very tricky question ... the only "fact" is that ALL signals themselves are analogue (rise-time). Even the "how you process them" question is tricky.Convention goes with simplicity in most cases.

author: elgonzo
author_rank: Unknown
timestamp: February 06, 2015, 04:53:06 am
content: Quote from: c4757p on February 06, 2015, 03:39:10 amCould you give an example of an analog signal which is discrete and quantized, but would not be a digital signal?QuoteThe problem you describe is not so much that of an analog property, it is rather a limit of the device measuring that particular analog property.A truly analog property has no limited resolution (it has no resolution at all) and it has an infinte number of states/values.

author: elgonzo
author_rank: Unknown
timestamp: February 06, 2015, 05:29:23 am
content: Quote from: digsys on February 06, 2015, 04:51:30 amThe example is irrelevant for explaining whether a signal is digital or analog. Why? Because the digital signal is exactly the same before and after the filter. The filter does not add information to the signal, neither does it take information away. (If it would take information away from the digital signal, you should not use such a filter, as it is destructive with regard to the signal...)What the filter does is some cleaning of the carrier. A signal processing circuit has to decode the signal that is 'imprinted' on the carrier. Thus, naturally the circuit has to take into account the analog nature of thecarrier. Remember that the carrier is not the same as the signal (a carrier can exist in the absence of a signal). Still, to process/extract the information from the carrier, the nature of the signal has to be known (i.e., whether the signal is digital or analog, and what specific digital or analog encoding/modulation has been used to 'imprint' the information onto the carrier).Note, that often no distinction made between (modulated) carrier and signal, and both are interchangeably called "signal". The usage of the term can be rather fuzzy. It might even be that in different areas of expertise the term "signal" is used slightly different. (In one area the term "signal" might emphasize the modulated carrier - an analog waveform -, whereas in other areas the term "signal" might emphasize the way in which information is 'imprinted' onto a carrier)QuoteI am not entirely sure what you meant to express, so let me clarify. What is part of the digital signal is the voltage level before time t0 and the voltage level after time t1, and the time window t0-t1 itself (i.e. the rise time).The analog nature of that voltage rise isnotpart and neither a property of the digital signal. (It is just part of the overall analog nature of the chosen carrier.)

author: c4757p
author_rank: Super Contributor
timestamp: February 06, 2015, 05:49:21 am
content: Quote from: elgonzo on February 06, 2015, 04:53:06 amThe entire bloody point of what I said is that they're not mutually exclusive.

author: elgonzo
author_rank: Unknown
timestamp: February 06, 2015, 06:27:51 am
content: Quote from: c4757p on February 06, 2015, 05:49:21 amI change my opinion somewhat.While i still do not agree with your argument, it so happened that i just thought about a case which is not so clear-cut.I am not entirely sure whether the following really holds water, and i need to think a little bit more about this particular case.What i thought about is a transmission of a bitstream over a single wire or via radio waves. At first glance, this transmission should be a digital signal.However, there is no separate clock signal. Rather, a clock will be derived directly from the bitstream by the receiver. The clock information is part of the signal, so to speak. So far so good, and nothing unusual.Such a system could allow for clock cycles of variable length, even allowing for vast differences in clock cycle length. The clock cycle length essentially is variable and can change over time. Would this constitute an analog behavior of the clock? I don't know. But if it would be reasonable to call the clock having analog behavior, then this would mean that the digital signal would have an analog component. I need to sleep over this...

author: elgonzo
author_rank: Unknown
timestamp: February 06, 2015, 07:19:50 am
content: Quote from: helius on February 06, 2015, 03:37:40 amI guess we use the term subset/superset in a different manner.From your explanation i guess you use the terms subset/superset to explain that both digital and analog signals are transmitted via analog carriers (and thus by extension devices being analog because they have to work on/with the respective analog properties of the chosen analog carriers).I use the terms subset/superset as used by mathematical logic. If i have a set that encompasses all "analog audio signals", then "digital audio signals" is not a subset of the former set. If "digital audio signals" would be a subset of "analog audio signals", then this would also mean that "digital audio signals"are"analog audio signals". If that were true, it would allow me to feed a digital audio signal directly into an analog input of an audio amp and i would hear the music. Obviously this is not the case.I think a lot of forth and back here in the discussion happened because of slightly different understanding of the term "signal", and different meanings behind using the terms subset/superset.

author: miguelvp
author_rank: Super Contributor
timestamp: February 06, 2015, 08:51:48 am
content: Quote from: c4757p on February 05, 2015, 01:27:44 pmAgreed,Say you are recording some digital music but for whatever reason the signal is affected by some pickup of voices in the recording studio that get carried as low noise in the signa and you recorded the whole signal.If you just play the analog noise you hear the voices in the recording studio (after compensating for the digital signal)Also you can play the digital signal ignoring the noise.The information will be different and as c4757p states, it's how you process the signal that matters.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 06, 2015, 02:48:08 pm
content: Lots of people seem to be having confusion over what constitutes a "signal", and what constitutes "digital" or "analog".Let me clarify these.All signals are analog.A signal is a time-varying quantity; in electronics, usually voltage or current.No signals are purely digital, because you can always zoom in on them closer and closer, with the oscilloscope, and find a smoothly rising edge, and measure the "on" and "off" voltages as something other than abstract '0' or '1'.Digital is an interpretation.This is why digital is a subset (hierarchically subordinate) of analog. Only an abstract digital signal can be truly digital: having only values of '0' and '1' (or any other levels that exist within your framework), and transitioning instantaneously between them.The way digital signals are traditionally interpreted is by placing thresholds on an analog signal. Consider the 74HC series logic gate. The inputs are defined valid for V_IH > 0.7 V_DD and V_IL < 0.3 V_DD (let V_SS == 0V). The outputs transition smoothly between valid logic states (under standard test conditions) over a few nanoseconds.Therefore, all digital circuits are inherently one-bit (or more) ADCs and DACs. If you consider a logic circuit to operate only in the abstract (in the '0' and '1' domain), these thresholds are performing the conversion, and the input/output states are considered indeterminate during the finite-duration edges.Standard ADCs and DACs are engineered to have much more precise thresholds (e.g., a comparator is a one-bit ADC with a typically millivolt or smaller threshold range), and more of them (12 bits = 4096 levels, etc.). Logic pins can usually depend upon having looser thresholds by design.Most logic circuits can, quite reasonably, be modeled this way, where abstract logic states convert with analog signals only at the pins. You can specify the entire contents of an FPGA this way, entirely in '0's and '1's. Whether analog considerations (beyond propagation times) have been taken into account in that process, you don't really know (the toolchain hides that from you), and you get your digitally-coded analog signals at the pins (in your choice of logic flavor, at that!).Note that digital logic doesn't need to be clocked. That it is, is merely a convenience of typical design practice. Actual signals will present themselves at different times (intentionally or not) relative to a clock signal; the purpose is to further synchronize the system so that it is even easier to analyze (Moore type FSM) and synthesize (e.g., memory table and latches). Anything from computers to communication can be done with variable timing, or none at all; all that matters is that it can be processed coherently, which usually means a stable, fixed clock. Point is, it's a convenience, not a necessity.Radio Signals.As with the definition of normal digital, radio signals are a matter of definition. If I have some property of a carrier which changes relatively suddenly, who are you to say I didn't mean to do that, as an analog signal?Radio signals are characterized by having a relatively narrow bandwidth for their center frequency. There are some wideband signals, but they are difficult to use (the signal chain, including antennas and propagation through space, must have very stable delay characteristics at all frequencies, so the signal does not interfere with itself). As such, the appearance on the oscilloscope is that of a sine wave, which changes slowly over time, such as by amplitude, phase or frequency. (Phase and frequency are linearly dependent, phase being the integral of frequency. Amplitude is independent.)As with the digital logic gate, thresholds can be defined. In this case, in a more complicated way, which will require more than a few transistors to implement.QAM-4 is a very typical mode illustrating this:The continuous signal is first modeled as an AC steady state signal, having sin(wt) and cos(wt) components summed together.The relative amplitudes of each are then assigned values based on a digital input (or interpreted as a digital output).The resulting "AC steady state" signal has a linear combination of orthogonal (in-phase and quadrature) components. Typically, these plot the cardinal directions on the complex plane (i.e., 0, 90, 180 and 270 degrees, constant magnitude). You can also model such a signal as a constant amplitude with varying phase (i.e., phase modulation, in polar coordinates), or constant but impulsive frequency (FM, where the frequency only changes momentarily when phase shifts).Whereas digital logic signals are made as sharp and wide as possible (to ensure valid logic levels for as long a time as possible), radio signals are reduced in bandwidth (transition time grows) as much as possible. The eye diagram is a tool used to measure the stability of these transitions. The "eye" is drawn by the waveform making repeated transitions, and the 'pupil' is the time window, and voltage threshold, which distinguishes between '1' and '0' (or however many states the system happens to have).Tim

author: rolycat
author_rank: Super Contributor
timestamp: February 07, 2015, 06:24:39 pm
content: I have to disagree with both of T3sl4co1l's categorical declarations, namely that all signals are analogue, and that analogue is a superset of digital.Both contentions may be true if restricted to electrical signals, but there are other kinds of signal - quantum communication, for example. It is true that a signal is a time-varying quantity, but that variation does not have to be continuous. At a mundane level, any singular event in the physical world is inherently digital. It is likely to have analogue quantities associated with it, but considered as a signal indicating whether the event occurred or not, it is digital - and indeed binary.We only think signals are analogue because this is true of many complex signals, and because we typically represent and process them electrically, and at this point their representation becomes analogue.At this point I admit we are indulging in the engineering equivalent of debating how many angels can dance on the head of a pin, rather than answering the OP's question.

author: c4757p
author_rank: Super Contributor
timestamp: February 07, 2015, 06:50:05 pm
content: You're quibbling about what defines a "signal", really. There's a formal, mathematical definition and then there's a more "practical" engineering definition. Under the former, analog and digital are at least close to being mutually exclusive. The EE usage tends to consider the physical representation of the signal to be part of the signal, rather than an accessory to it.

author: rolycat
author_rank: Super Contributor
timestamp: February 07, 2015, 07:12:17 pm
content: Quote from: c4757p on February 07, 2015, 06:50:05 pmPretty much, yeah, although I think 'quibbling' is a bit harsh - the distinction is not trivial, and I would contend that the definitions I mentioned technically fall within the field of signal processing, which is an engineering discipline.I just think it's useful to maintain a wider perspective, even on an electronics forum.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 07, 2015, 08:06:07 pm
content: Well now... if you want to get right down to the hard physics of it... yes, everything is digital, and yes, everything is analog. At the same time. Also, the analog signals obey complex analytical calculus, not just the real numbers. So, have fun with that.The distinction at this level is, kind of philosophically amusing, in a way: physicists attempt to solve a problem, say composed of a myriad of discrete elements. So you draw up the canonical ensemble, but it's a massive sum over all particles, and you'd have to write out each one, and you'd never be able to compute a state average (like the temperature of a solid, or the pressure of a gas). So, physicists being physicists first and mathematicians second, the function is rewritten as an integral, converting from the Riemann sum form. The excuse is that, well, 10^23 particles is kind-of-sort-of like a continuum, all right? And now regular calculus can be used to analyze the system; it may not have an easily approximated or even analytically solvable form (e.g., Fermi-Dirac statistics can be solved analytically for the exponential tails, but the transition region, nope), but even if it requires computation to find representative values, we can eliminate everything else (bring all the independent variables outside the "hard math bit") so that we only need to calculate a ratio (which is probably a transcendental number) in the end.So what underlies everything, is discrete numbers (particles and such), governed by complex functions (probability density); pulled up into the reals for purposes of analysis; then smashed back down into the integers again for numerical calculation (every number that's ever been written down, or calculation that's been cranked through by hand or machine, is fully an integer, and is at best a poor approximation of a real number).For purposes of macroscopic signals (whether electrical, mechanical or otherwise), we can quite reasonably make the "real valued" approximation; indeed, we have no way to prove our signals are otherwise. The radio frequency resonance of a proton in a magnetic field (NMR) is a continuous valued signal, even if its origin is from quantized phenomena. The frequencies might be quantized, but then again, quantum uncertainty itself provides the necessary continuity: the proton resonance can only be shown to be infinitesimal if it takes infinite time to determine it!Tim

author: darko31
author_rank: Regular Contributor
timestamp: February 10, 2015, 12:29:36 am
content: You guys got me lost at Rieman summs and quantum theory. I get what are you saying, but it's not at all practical to use.For now, I'll stick with earlier mentioned more practical point of view. The signals that contain digitally coded information and meant to transfer it as digital are therefore "digital" signals. Same thing for analog.DACs and ADCs convert one into other, and that's just about all that I am willing to process at the moment.Rather informative thread

author: tggzzz
author_rank: Super Contributor
timestamp: February 10, 2015, 01:22:09 am
content: Quote from: darko31 on February 10, 2015, 12:29:36 amThat violates the principle that you should "make things as simple as possible, but not simpler". I'm afraid your summary istoosimple.For one trivially simple example, consider that your summary precludes a phase modulated signal from being digital, since the amplitude is constant.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2015, 02:03:41 am
content: Not to mention pragmatism...What digital logic families support phase modulation?Tggzzz, I suspect you'll have a hard time finding examples.By extension; digital signals are those compatible with standard logic families.Tim

author: timb
author_rank: Super Contributor
timestamp: February 10, 2015, 07:27:26 am
content: What about fiber optics? There's either light or there isn't. That seems purely digital with no analog component to me.What if I transmitted morse code to you via flashing a large LED array on and off? That's purely digital information over what is basically an instantaneous carrier (the speed of light being the limit).What about using an electrical signaling method like RS-232 where there's either a negative voltage or a positive voltage? That more or less gets the threshold argument out of the way (though not entirely).Sent from my Smartphone

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2015, 07:35:04 am
content: Exactly the point being, digital is a matter of classification or interpretation.Interestingly, the light example may even fit the "is there a logic family for it" condition, surely not in the mainstream sense (I doubt Digikey has optical AND gates stocked..), but in that nonlinear optics can perform operations like this, and photonic computing is probably going to be very important in the coming decades.Tim

author: miguelvp
author_rank: Super Contributor
timestamp: February 10, 2015, 07:55:11 am
content: Quote from: timb on February 10, 2015, 07:27:26 amSome datagloves use fiber optics and if you bend your finger the angle of the light bouncing changes giving you an analog output of the bend value.

author: tggzzz
author_rank: Super Contributor
timestamp: February 10, 2015, 10:13:41 am
content: Quote from: timb on February 10, 2015, 07:27:26 amEr, no. For the signals you are thinking about the signal cosists of the summation of a large number of photons - which is by definition analogue and statistical, albeit quantised.OTOH, if you had mentioned optical time-domain reflectometers, some do operate in a purely digital "photon counting" mode. But even there statistics come into play since there is only a probablility that a photon will be detected.

author: timb
author_rank: Super Contributor
timestamp: February 10, 2015, 03:30:01 pm
content: Right, but let's say the input was to a special material that reacted to photons. This was inside an IC. If any photons make it to this material it's a logic high.So, it doesn't matter how many photons go out, so long as one makes it. (Like sperm!)Think of the morse code example by light. The intensity of it doesn't matter, so long as you can see it.So, while ultimately all presently used signals are analog, they don't have to be for digital. Hmm, let me see if I can clarify that... I think of analog as a carrier for digital signals, in a sense. As it's the only currently known method of transmission. However, something like quantum teleportation could be a purely digital carrier. Phew! I hope that makes some sense.Sent from my Smartphone

author: tggzzz
author_rank: Super Contributor
timestamp: February 10, 2015, 03:56:47 pm
content: Quote from: timb on February 10, 2015, 03:30:01 pmPhoton counting OTDRs do use a special material that reacts to photons, and are inside an IC.Other than that, you are describing something which doesn't correspond to your original statement.Next you need to consider quantum communication systems; there's no need to invoke "teleportation" or similar.Quote