Often electronics are divided into analog and digital circuits.
Analog refers to circuits that operate on waveforms that are continuous in the mathematical sense.
That means that any value of amplitude or time may exist in the circuit, so if there is 0 and 5, there can also be the possibility of 2, 3, and 4.9999.
Except for in quantum physics, all real values are continuous. Therefore all circuits are really analog. However, that fact isn’t very useful, so what is being digital all about?
Contents
Information
In essence most electronic circuits are designed to process information.
Whether it’s audio or data or a complex control signal for some mechanism, there are information inputs and outputs.
Even a simple light switch could be abstracted into this idea.
There are many different attributes of a waveform that can be used to encode information, whether it’s a voltage or current waveform.
Some of these include:
Digital
As described above, all electrical signals are really continuous and can be described as analog.
Digital refers to a very specific way of interpreting waveforms, where only a limited set of values are allowed. For instance, in 5V CMOS logic, any value below 1.5V is interpreted as 0, and any value above 3.5V is interpreted as 1. Voltages in-between are “undefined” due to practical circuit design constraints.
This idea is to referred to as having discrete amplitude, as opposed to continuous amplitude. The advantage of this is that a waveform can tolerate a fairly large amount of corruption but the information contained within that waveform is flawless, since the system is designed to ignore small variations.
Digital signals are also discrete in time, where information is only processed at specific points in time. The advantage here is that waveforms are allowed to transition to their final values, making the information immune to small delays or inconsistent timing.
Discretization of Time
There are two fundamental ways of discretizing time in a circuit, both described below.
Synchronous Logic
Synchronous logic is the archetypal digital circuit. The standard computer processor is in this category.
Synchronous logic has a clock that is used to time all circuit elements. On each clock edge, inputs are sampled and the input flows through the logic circuits.
The processing is complete before the next clock edge, at which point the first output becomes the input of the next stage. Note that a system can have any number of different clocks for different subcircuits.
In this kind of circuit, time is discretized to be multiples of the clock period. Any time in between clock edges is ignored.
Asynchronous Logic
Asynchronous logic can be thought of as event-based as opposed to periodic. Many synchronous systems contain asynchronous subcircuits, such as device interrupts (IRQ) in a computer.
An asynchronous circuit is triggered only when required, either because data rarely changes or is unimportant most of the time. For example, in a personal computer any user interaction is typically extremely slow compared to the processor itself, so moving the mouse could generate an interrupt indicating that the user has provided new input. This would trigger the algorithms that process user input.
In this type of circuit, time is discretized to be when something important happens, as defined by the specific system.
Discretization of Amplitude
Discretizing amplitude results in a circuit having only a limited number of valid states. Anything that is not exactly as expected can be assumed to be the nearest valid state. That is, if you are expecting 5 or 0 but receive 0.2, it is fairly safe to assume it was a 0.
The majority of digital systems are considered to be binary, with just two valid states at their lowest level, high and low, one or zero. However, in general digital systems can have a large number of valid states.
We typically number the states as sequential integers, which lets us decouple the information from the specifics of the waveform. So, a circuit with 4 valid states could have the states 0, 1, 2 and 3.
Having defined states like this allows digital circuits to implement flawless mathematical operations. The branch of mathematics that deals exclusively with integers is known as discrete math, and operates using Boolean algebra.
Circuits can then be designed to implement mathematical operations.
Binary Logic
The most common digital circuit is binary. That is, each fundamental block only has the states 0 or 1, and this number is known as a bit.
Combining many blocks together allows the use of multi-bit numbers which can be extended to any size. The typical modern computer is 64-bit, so that every processor subcircuit actually has 64 outputs in parallel to form a single number.
Multi-bit Symbols
While trinary logic (three states) is an active research area and there are some other esoteric schemes, it is actually very common to use waveforms with more than two valid states. The advantage of this concept is that more information can be sent in less time or bandwidth, with an increase in system complexity.
Digital communication systems, such as wireless digital TV, typically use encoding schemes for their waveforms which have multiple valid states. Because processors operate on binary states, most encodings use multiples of 2 as their base to allow easy conversion.
For example, one could have a system with the following:
0 to 2.49V = 00
2.50 to 4.99V = 01
5.00 to 7.49V = 10
7.49 to 10.00V = 11
Each of these voltage segments representing multiple bits is known as a symbol. In this case, each symbol is 2 bits, or 4 states. If a symbol contains many bits then the waveform will have so many possible states that it may look entirely analog in nature.