# What makes a circuit digital?

I've been trying to understand how a circuit becomes digital. I understand the different between an analog signal and a digital signal, but I don't see where digital circuits come from if all the components are analog.

For instance, this quote from one article:

Most of the fundamental electronic components – resistors, capacitors, inductors, diodes, transistors, and operational amplifiers – are all inherently analog.

Followed by this quote from the same article:

Digital circuits operate using digital, discrete signals. These circuits are usually made of a combination of transistors and logic gates and, at higher levels, microcontrollers or other computing chips.

But logic gates and microcontrollers are made from combinations of the components named above-- analog components.

Do you see my confusion?

• I know that it is common to speak about "digital circuits" and "digital parts". However, a closer look (perhaps a bit pedantic?) could lead to another view: There are no digital circuits or parts. It is more accurat to say: We have a digital application if parts/circuits are operated between two extreme conditions (states). As an example - what is the CMOS-Inverter? Analog or digital? We know, it can be used also as an analog (linear) amplifier – LvW Jul 27 '15 at 8:21
• A circuit is digital if it has fingers. – Nick Johnson Jul 27 '15 at 9:25
• More seriously, the really short answer is: A circuit is digital if its signals operate in exactly two states. – Nick Johnson Jul 27 '15 at 9:26
• Digital means "two states" . These can be considered high/low 1/0 on off true/false. A circuit that depends for its operation on circuits which make and use digital states is a digital circuit. It may use components which use analog technology to generate the digital states but if so they do so atr a lower level which is invisible to the digital abstration. eg a row of doors can each be able to be considred to be either open or shut. We know that there is a continuouslyt linear variable 'analog' path between open and shut but we ignore that when considering them as a digital system. – Russell McMahon Jul 27 '15 at 11:32
• I wouldn't say digital implies "two states." Binary, yes, but I'd consider any system with multiple discrete levels a digital system. – Shamtam Jul 28 '15 at 18:26

First of all, I like the title of the question, "What makes a circuit Digital" ;).

The world around us is analog so the electronics started with exploring the analog components like the ones mentioned by you resistors, capacitors etc. The need for digital circuits was realized when we started building devices like computers, started storing information digitally and many other things.

If you look closely, digital world is based on voltages similar to the analog world. The only difference and the most advantageous feature of digital is that we have reduced the number of variable to just 0 and 1.

Consider a voltage range 0V to 5V.Lets assume that 0V-2.5V is X and 2.5V to 5V is Y. Here we have grouped the voltages in two blocks but the bottom it remains the same. Sam we did with 0 and 1. To make it convenient for ourselves we thought (just for fun!) let X be 0 and Y be 1 and it all started from there. Whether you get a voltage of 1.1V or 2.4V we will interpret is as a 0. Similarly,you get 3.5V or 4.9V it is a 1 for us. This is biggest advantage of digital circuits called Noise Margin.

Since your question was about how a circuit becomes digital, i don't want to get into the technicality much. but if really want to blame someone for this. get hold of this man Claude Shannon. It is believed that it was his article that led to birth of Digital Revolution.

• I understand what you're saying and this helps and makes sense, but I am not completely clear yet. Given the information above, how do you take an analog circuit and make it digital? How do you get it stop treating a signal as analog and start treating it as digital, interpreting the values as either below 2.5V or above 2.5V ? – temporary_user_name Jul 28 '15 at 16:07
• @Aerovistae It's a chicken and egg situation. You define certain things as having to be certain ways, manufacture things so they meet the rules, make decisions based on the rules and the outcomes conform to the rules. Example: A simple two input AND gate which needs inputs 1 & 1 to produce output = 1. Inputs 00 01 10 produce output = 0. If we define 0 = < 20% of Vcc (=supply voltage) and 1 as > 80% of Vcc AND THEN make an ANALOG circuit that will treat an input of up to 30% of Vcc as a 0 and will treat a Vin of > 70% of Vcc as a high then a Vin source that meets the 20%/80% rule will .... – Russell McMahon Jul 29 '15 at 8:19
• ... always drive a cct that accepts up to 30%/70%. So, so far we have a signal which is basically analog BUT limited to certain analog ranges (<20% or > 80%) driving an input that will ALWAYS accept the input as having only two states. ||Now we make the output always make say <= 10% of Vcc if it should be low and > 90% of Vcc if it should be high. This will always drive a 20%/80% nominal cct as if it is either high or low. | Once we have electronic ccts tat obey these constraints we can use them without having tyo know the actual values. ... – Russell McMahon Jul 29 '15 at 8:30
• If we want an output to be low it will in fact be in the range 0-10% of Vcc, we would accept 0-20% of Vcc (so we have some "margin" in the spec relative to the Vinactual - and we drive a cct that will actually work with 0-30% as low so we have a margin between spec and actual Vin acceptance . xxx Once we know that supplied voltageds will ALWAYS fit inside specified Vhi or Vlo levels we can just say Vhi/Vlow, or 1/0 or true /false. Similarly once we have input ccts that will always see inputs as high or low they too can just been seen as 0 or 1 . .... – Russell McMahon Jul 29 '15 at 8:31
• ... NOW build logic circuits built o this 0/1 premise. You can extend this idea to the doors mentioned. Call them always open or shut. Ensure the actual door position is well inside the boundaries for open or shut and you have a digital situation and can make open & shut decisions :-) – Russell McMahon Jul 29 '15 at 8:31

Digital means having or using discrete or discontinuous states.

Modern digital electronic systems are usually binary (employing logic with two states) but ternary (3 state) systems have been built (as have a few systems with even more digital levels per digit.

In a binary 2-state system the two levels can be considered to be:

• high/low 1/0
on off
true/false
etc

A circuit that depends for its operation on circuits which make and use digital states is a digital circuit. It may use components which use analog technology to generate the digital states but if so they do so at a lower conceptual level which is invisible to the digital abstraction.

eg a row of doors can each be able to be considered to be either open or shut.
We know that there is a continuously linear variable 'analog' path between open and shut but we ignore that when considering them as a digital system . We may decide that up to 20 % open = shut.
And that 80%+ open = open.
And that from 20% to 80% open is undefined
And that doors must always be swung rapidly between open and shut
And that transient states from 20% to 80% ignored.

This is EXACTLY what is done with 'analog device' which are used in digital systems. States are low or high and eg <20% high low. > 80% high = high. 20-80% levels are illegal and system always switches rapidly between them.

Digital systems of any complexity tend to be "clocked" with the system changing state when the clock changes state and then being read 1/2 a cycle later.
like "musical chairs" where people change seats when the music plays and must be in a seat when the music stops.

In the case of the doors - one door can have two states ( 0 or 1, open or closed)
Two doors can have 4 states 00 01 10 11
(open open, open closed, closed open, closed closed)
3 doors can have 8 states
8 doors can have 256 states
16 doors can have 65656 8 states
All represented with 1/0 closed/open digital state analog doors.

• @ThePhoton Agh. Yes. Thanks. Brain fade/ corrected. I knew that :-) (of course) but fingers were thinking about levels per bit and brain was elsewhere :-) – Russell McMahon Jul 28 '15 at 14:33
• I understand what you're saying and this helps and makes sense, but I am not completely clear yet. Given the information above, how do you take an analog circuit and make it digital? How do you get it stop treating a signal as analog and start treating it as digital, interpreting the voltage values as either below a threshold or above a threshold, a.k.a. 0 or 1 ? – temporary_user_name Jul 28 '15 at 16:09

"Digital" and "analogue" are sets of design techniques and circuit interpretations. Both are simplifications of the real world focused on particular sets of properties.

You've asked as a clarification comment:

How do you take an analog circuit and make it digital? How do you get it stop treating a signal as analog and start treating it as digital, interpreting the voltage values as either below a threshold or above a threshold, a.k.a. 0 or 1?

There are two parts to this. The first is to recognise that transistors have three operating regions: cutoff, linear, and saturation ("fully on"). Analog designers arrange transistors so they are operating in the linear region. Digital designers arrange them so that the cutoff and saturation modes are used as much as possible.

The second is to consider the way feedback is used. In an amplifier, feedback will generally be negative. This results in an output voltage that's a linear multiple of the input voltage. A fluctuation in the output will be compensated for and the output reduced. In logic gate structures such as the flip-flop, positive feedback is used: being on will drive it more on, and being off will drive it more off. Being in an ambiguous state will drive it to one or the other.

The third is to realise that these are simplifications ("lies told to children"), and that sometimes the analogue properties matter after all. Flip-flops do not like inputs in the middle of their voltage range, and can become oscillators ("metastable"). CMOS inputs consisting of two transistors do not like ambiguous inputs either, and try to be both on and off, resulting in wasted current and possibly damage. Signals described as "on" or "off" do not have a clean edge transition between the two, they have a slope. If you drive it fast enough, they can become a sine wave. Seen in an eye diagram. Digital signals may "ring" like tiny bells.

I'm a Electrical Engineer and this question doesn't make sense to me. Let me start with the basics. Analog circuits use discrete components like Resistors, Capacitors, Inductors, Transistors, Diodes, etc. First of all, all through out school I heard, "Analog is going away, analog is dead". Anyone who says that is a complete idiot. Transistors are inherently analog devices which operate on a convenient digital abstraction to give us the digital functionality we need.

All the traditional RCL (resistor, capacitor, inductor) circuits that are governed by differential equations are analog. ALL real world circuits must use both analog and digital components. The two domains co-exist and you cannot have digital without some analog components.

Your question specifically must be answered in different contexts. (Sorry if you already know some of this!)

From a signal processing context, a signal is in the digital domain once an analog signal has been sampled (such as voice) into the digital domain through an Analog to Digital converter. Look up a typical DSP (digital signal processing) system flow chart. The signal starts analog, gets sampled into the digital domain, gets processed there and finally gets transformed back to analog so humans can understand it. An excellent example of this is your phone.

From a pure logic and computational point of view: Say you wanted to design a vending machine that gives you your drink and dispenses change. Such a semi-thinking machine can be handled entirely in the digital domain using the concept of state machines, which is simply a mapping of all possible events to states that can be coded and stored in memory. For example a nickel is put in, now the machine waits till a dime is put in... and then when the total money that has been put in equals the cost of the drink, the machine dispenses the beverage. However, even to realize such a circuit on a production circuit board you will still have analog components to provide power or capacitors to clean up the power or perhaps resistors to setup (bias) specific voltages for transistors.

Bottom line is when ANY circuit is actually realized into a circuit board you will have some analog components even if the majority of the circuit is 'deemed' digital. I would actually say all circuits are actually entirely analog but some of the components perform analog functions while others provide digital functionality. The digital domain is simply a convenient binary computational abstraction realized over analog components such as transistors and integrated circuits. Remember, our world is entirely analog: we only see, hear and process in analog not digital. There will always be a need to sample and process analog signals from the real world and ultimately present it back to us in analog.

Signals, the way I see it, are digital when you interpret them as different discrete values.

If you see signals in a circuit above 2.5v to be high, and below that as low - then you are interpreting the circuit as digital.

We can't have "true" digital circuits since, like you say, the components and signals are all analog. It's our interpretation that makes it digital.

-

An attempt at an analogy: If you draw a triangle on a piece of paper and someone looks at it, they will surely think it's a triangle. In reality it is just graphite on paper. It's your common interpretation that lets you see something abstract (like shapes or digital circuits) in a non-ideal medium (paper, analog voltages).

• @Mehrdad I never noticed that those were spelt differently. Corrected, thanks. – tehwalris Jul 27 '15 at 10:05

Digital circuits are made of many analog components(like transistors) but are called digital because they behave so,using the 1 and 0 concept.You can't call a microcontroller "analog" just because it's made of analog components.The same thing can be said about ICs who contain logic gates.On the other hand,a single transistor IS analog because it has a wider range of signal manipulation.Beside cut-off and saturation,it can work in active mode(between the two states) and in reverse active mode.In conclusion,you call a component analog or digital analyzing the way it behaves,not by looking at what it's made of.

All circuits are fundamentally analog. Digital is just an approximation of the underlying analog behavior, similar to the small signal model.

With digital circuits, it is common to run components open loop with high gain so they will saturate at the power rail voltage, something that you only really do in analog with comparators.

When you consider a circuit in the digital domain, all of the analog behavior gets boxed up in the propagation delay, rise time, fall time, input and output logic levels, etc. The propagation delay depends on voltage, for example. You can analyze the circuit as an analog circuit and figure out what the relationship is exactly if you want to. Generally it is just measured under different conditions to get as best case and worst case value.

This makes it possible to analyze complex systems to figure out, say, the worst case propagation delay between all of the inputs and outputs. It would be possible to do so with a full analog simulation, but that could take many hours while the digital approximation can be done almost instantly by adding up the worst case delays adding each path. These techniques are used in the software for integrated circuit design to make sure the design will run correctly at a given clock frequency.