Barkings! | The SmallDog Apple Blog

A blog about our business, our industry, and our lives. You'll find posts from everyone at Small Dog and if the dogs could blog, they'd be here too!

From time to time in Kibbles articles I’ve written, I’ve talked about the differences between digital and analog circuits, but it’s almost always in passing and tertiary to something else. I decided this week that it was worth doing a whole article about it. Some of this will probably be a bit of a refresher, but that’s ok. We have to start somewhere.

People generally seem to understand that computers, smart phones, smart watches, even calculators…all that stuff is digital. We commonly refer to those things as digital, but we don’t often explicitly describe what makes them digital. First of all, the word “digital” isn’t what I would’ve chosen if I was choosing to name that class of circuits. We call them digital because they function entirely based on binary digits (0 and 1). This is fine, but if given the chance, I would’ve called them “discrete” circuits because this is more generic and more descriptive of the actual architecture itself. When I studied computer science in college, we actually had special math classes we had to take, totally separate from the mathematics department. These classes were called “discrete mathematics” and they revolve entirely around the specific types of mathematics relevant in so-called “digital” circuits and the higher level “computers” they make up. This includes things like boolean algebra (easy), graph theory (harder, but interesting and useful), set theory and combinatorics among many others. Discrete mathematics eventually prepared you for things like computational theory. By far the hardest thing I had to learn in those later classes was linear algebra. The one common thread in all of these classes though is that the units were discrete. There were no gradations, fractions, derivatives or integrations that you’d find in almost any other math class.

The reason for the difference is the fundamental difference between digital and analog. Digital circuits can by definition only operate discretely. They are completely blind to anything that occurs within their discrete ranges. This doesn’t mean that digital circuits themselves can’t do analog tasks, or do things involving real numbers, but their operation does not use these things.

Analog circuits on the other hand exist over an entire domain. Analog circuitry can be described by conventional mathematics (primarily algebra and calculus). Much like digital circuits are not ideal at perfectly replicating analog systems, analog systems are poor at functioning in discrete terms. A single digital circuit can be configured to calculate any number of different things and can even be reprogrammed for new tasks. Analog circuits can also “calculate” things, but they do so in a very different, specialized and limited way. I remember asking this question when I took an electrical engineering class. Why create some complex circuit that effectively calculates the integral of some signal when a digital circuit could be programmed to do the same thing? The answer is that digital circuits have a lot of overhead and take time to calculate something (due to clock cycles). The time they take is totally dependent on the efficiency and accuracy of the programming. An analog circuit doing the same thing would be accurate every single time and would do so at the speed of electricity (the speed of light). It would also be simpler in construction.

An example of an analog circuit that’s performing a function would be an amplifier. The amplifier’s job is to take an input signal and boost its amplitude. A digital circuit could be programmed to do this, but to do so at virtual instantaneous speed and accuracy would be a tall order. The analog circuit would also be able to follow the input signal exactly at every single infinite point on its waveform. A digital circuit, because it’s discrete and slave to a clock, would miss all the pieces of the input signal that occur in between its clock ticks.

People don’t often contrast analog and digital circuits this way, but I find it to be very accurate: digital circuits are flexible and generic, analog circuits are simple, fast and specialized. Different situations call for different circuits, which is why decades into the digital age, analog circuits are still incredibly useful. However, as digital electronics become faster, cheaper and more robust, they become able to approximate the specialized analog circuit performance at more and more acceptable levels. You can already see this happening in some applications. In 1971 you could buy a Dodge Challenger with a 6.98L Hemi V8. A powerful and complex engine in its day, it would have relied completely on analog electronics to run, to the extent it even used electronics at all. A carburetor doesn’t need a computer to help it mix fuel and air. Starting in 2011 the same car was available with a 6.4L HEMI V8. This engine uses computer-controlled fuel injection as well as a fleet of sensors measuring everything at every level of operation. The sensor data is fed to a computer that can adjust inputs to the engine allowing it to run cleaner and produce more power. Without the computer, the engine would barely run at all. The computer is actually able to work fast enough to deal with all of the inputs and create an accurate output in a timely fashion.

Hopefully this was an interesting dedicated look at the differences between digital and analog circuits. If you have any suggestions for topics, or questions that you’d like to hear me answer about electronics, electricity or its applications, send me an email!

Previous Post:
Next Post: