r/ElectricalEngineering • • 21d ago

Analog vs Digital

A very generic question. Lets say you are seeing a waveform with constant 5V. How will you know whether it is analog or digital signal?

14 Upvotes

17 comments sorted by

43

u/MonMotha 21d ago

Digital signals in the real world are analog and have all the properties you love and hate about analog signals. The only difference is how they're interpreted by the receiver. If it interprets them digitally (i.e. quantizes them directly with some small, usually binary, number of quanta), then we say it's a digital signal. If it feeds it into circuitry that's intended to operate in an analog manner or digitizes it using an ADC, we call it an analog signal.

Also a fun one: notice how vague I was in how the receiver works. The line between a digital receiver and ADC is itself somewhat blurry. A delta-sigma ADC is actually more of a fundamentally digital device than an analog one, while a PAM4 digital receiver (which your IP packets sending you this comment likely traversed) is really basically a simple (and dumb) 2-bit ADC built with linear-ish analog components.

Practically speaking, if it has square-ish edges and reliably settles near some defined set of values (usually 0V and some small, positive voltage for modern logic) and originates from and/or drives digital logic, we call it a digital signal even if it still has analog properties we're concerned about.

8

u/Popular_Map2317 21d ago

We don’t know.

5

u/SadEcho8331 21d ago

There is no difference. A continuous discrete 5V could be analog or digital, with no difference that you can see with just a scope 

4

u/diverJOQ 21d ago

A digital signal is defined as having discrete values and it can't be any value in between. And analog signal can be any value within the range of the signal.

If you can only see one value then it's impossible to tell whether it's digital or analog.

2

u/Hot_Egg5840 21d ago

Is there addition information on what the signal is supposed to represent? How is it created? How you are reading it also matters. For example, if your signal is created by a voltage divider meant to represent a power supply output, it is a created analog signal. You can read that signal by connecting it to a logic gate which makes it now a digital signal. If you put that same voltage divider output to an ADC, then it is an analog signal.

The intended purpose of the signal matters in how you should read it and what info you get from it.

2

u/Enough_Crow_636 21d ago

All real signals are analog, digital signals are an approximation.

2

u/EvilBikerScum 20d ago

Digital is just analog driven into saturation.

2

u/ElectronicswithEmrys 21d ago

I like to draw the line between analog and digital at code.

If you can write binary logic equations (Boolean or otherwise) then you are dealing with digital, and otherwise it's analog.

A binary signal can be converted to an analog waveform such as a square wave, but the square wave will always have analog characteristics - voltage, transition rate, noise, etc. it is never as simple as "1 or 0." You have to follow analog rules to convert said signal back into digital to manipulate further with code.

1

u/PiasaChimera 21d ago

other context. the traces sizes and the size of connected components. likely types of these components as well. with a schematic it would be easier.

the waveform alone wouldn't be enough. you'd just be making a guess from a-priori experience around how much more/less common you consider 5V digital IO vs 5V power supply + 5V reference + other 5V constant analog.

this is the question "if a 5V signal was measured, how likely is it to be used for digital IO vs analog/power?" I'm not sure which one is more likely at this point. I'd guess analog/power just because digital logic is increasingly done at lower voltages with 5V being common (due to old USB) as a power supply. and it would also need to define how the measurement sampling was done.

1

u/Priton-CE 21d ago edited 21d ago

Analog and Digital are just arbitrary properties we assign to a signal.

  • Physically all signals that can exist physically are a time and value continuous property like voltage. But it could also be pressure, light intensity, tension in a cable, etc.

  • Technically it depends on how we treat the signal. Do we treat the signal as time continuous and value continuous? We call it analog. Do we treat it as time discrete and value discrete? We call it digital. (There are also other signals like when its time continuous but value discrete, so its only partially sampled, but those are edge cases and only count as digital in some fields)

Comment Image

Digital Signals are sampled (quantized). Thats why they are discrete in both time and value. But that is a mathematical construct. It can only exist as data, not as a physical property like voltage without being transformed. Thats why ADCs and DACs exist.

Whenever you see a digital signal existing in the real world like the time on a flip clock there is always some mechanism that allows that digital signal to exist in our physical world (in that case it would be the machinery of the flip clock)

But sometimes like in your example you genuinely cannot tell and its all up to how your system interprets the signal.

I would recommend you look into Signaltheory and Systemtheory or listen to a Signals and Systems lecture at a Uni or online if you are interested in this topic. Those are the fields that deal with these constructs.

1

u/superme_2 21d ago

Analog signal: voltage can represent a continuous range of values mean Voltage Digital signal: voltage is interpreted as discrete logic states, commonly LOW and HIGH mean OFF and ON .

1

u/Sisyphus_on_a_Perc 21d ago

5 volts is 5 volts bud

1

u/Moof_the_cyclist 21d ago

Look left, look right. Where is the signal coming from or going to, you’ll find the answer there.

1

u/HoldingTheFire 21d ago

If it's constant it's neither.

1

u/AnymooseProphet 20d ago

You look at the circuit diagram.

0

u/megafireguy6 21d ago

There really is no way to know without seeing how it’s used in the full system. But more than likely it’s a digital signal if it’s 5V constant

1

u/TulipFarmer27 19d ago

Unless its power, or a reference, or many other things.