What Is Digital, and Why Do We Use It?
Most information in our physical world is analog, which means that it can take any value, with effectively infinite precision. The speed of a car is an analog value: the car can be moving at 42 mph, or 88.7777 kph, or any other value (within its capability). The altitude of a bird is analog. The temperature of a furnace is analog.
The purpose of many engineered systems is to operate on information, and it is possible to create physical systems that manipulate analog values. Something as simple as a mercury thermometer is engineered to convert the information of "temperature" into a distance and then (with simple markings) into a numerical value that a human can read. An analog speedometer converts the speed of a car, using mechanical components involving friction or magnetic drag, into a human-readable form, or even into a form that can control the car's accelerator, to create a cruise control system. Electronic devices can be analog as well -- for example television, from capturing the sound and video, to transmission and reception, to displaying it on a screen, was all done in the analog realm for decades before digital television became the standard.
But analog systems have some serious limitations, such as:
- They are susceptible to interference. Because they operate on infinitely-variable quantities, changes to those values from external influences will affect the behavior.
- The accuracy of each component in a string of connections impacts the accuracy of the final result, so the system requires some combination of precision in all components and the ability to be individually calibrated.
- Simulating an analog system is computationally-intensive, and the accuracy of the simulation can be highly dependent on simulation parameters, which reduces design confidence and increases prototyping time and testing requirements.
- Small modifications to the design can have cascading effects, requiring redesign of multiple other components.
In a digital system, information is discretized into two values. It no longer matters what the temperature is, only whether it is above or below some threshold. It only matters if a speed is faster or slower than some threshold, or if a sock has or hasn't been worn. And, most often used in electronics and directly relevant to this course, voltage only matters as being above or below some threshold.
This might sound limiting (and in some ways it is), but if used correctly, what it offers is nearly perfect predictability and repeatability. In the case of voltage, as long as a system is designed to keep voltages sufficiently higher or lower than the threshold, there is almost no chance of the information being misinterpreted or affected by external interference or component quality. If the threshold is 2.5 V then it doesn't matter if the voltage is 0, or 1.2, or 2.333 V -- it is all below the threshold.
This predictability and repeatability allows incredibly complex systems to be built up, because each component can be relied on to do exactly what it is designed to do, every time it does it. In the electronic device you are using to read this, there are billions (or trillions) of switches flipping on and off billions of times each second, and yet the entire system is so robust that it can operate for years with no errors.
Introduction to Digital System Design
The most visible digital systems around us are computing devices: smartphones, tablets, programmable thermostats, and of course general-purpose desktop or laptop computers. But such high-tech devices can only be understood by a human by dividing it into dozens of simpler subsystems, themselves each composed of many components, and down and down until you reach the two elementary components of digital electronic systems: switches and wire. So how does someone create such complex devices out of switches and wire? That is what this course is about -- understanding digital systems starting from the lowest level all the way up to a computing device.
However, designing such systems would be intractable if we were forced to think about it all at the lowest level, so a critical aspect of this course is learning to use design hierarchy. In hierarchical design, you use simple elements to produce a more complex component, then abstract away the lower-level implementation to design the next level using these more complex components. The design hierarchy below can describe a computing system from the lowest level (switches and wire) all the way up to writing software to run on the computer.