David E. Thompson, Professor
In many instrumentation systems, it is necessary to combine
both analog and digital interactions with an experiment. Commonly, these two systems may share a common
ground reference, but the analog system typically operates in a bi-polar
voltage range between ±5vdc to ±15vdc while the digital systems generally have
a single supply of +5vdc. In recent
years, new op-amps have been introduced that operate on a single +5vdc supply
that it may then share with the digital system.
In such systems, the ground or reference voltage for the analog systems
is frequently offset to the mid-point of the supply voltage (+2.5vdc for a
+5vdc supply). In this presentation,
however, we will focus on the more common bipolar analog supply voltages of
±15vdc and a unipolar +5vdc digital supply. Once you are familiar with this
representation, moving the reference voltages or their magnitudes is not at all
difficult.
Before proceeding we define a few terms:
Analog Signal – a signal that is a continuous function of time.
Digital Signal – A signal that is only known at discrete times.
Analog to Digital Converter (ADC) – A device to convert an analog signal into a scaled digital representation.
Digital to Analog Converter (DAC) – A device that takes a digital representation and converts it into a scaled analog signal.
Saturation – When the output stage of an integrated circuit is driven so hard, the device cannot quickly recover and remain in its linear relationship between input and output. It thus appears to “hang” at or near one of the supply voltage rails.
For most common 5v digital integrated circuits, any voltage above +3.5vdc
is considered to be a logic 1 state, and any voltage below +1.5vdc is
considered to be a logic 0 state.

Figure
1. A comparison of analog and
digital representations of a signal.
From these definitions, the real difference between analog and digital representations
is one of continuous versus discrete, respectively. In Figure 1, the signal on the left, S(t), is continuously defined at every instant of time, t.
On the right, the signal Si(ti) is “known” only at discrete times, ti.
Typically, the values for Si(ti) are represented within the computer as
either floating point or binary (integer) numbers. Either form of the number is a scaled form of
the input voltage, with a resolution and gain set by the Analog-to-Digital converter. Of prime importance in specifying an
acceptable conversion involves the range of the A/D converter (e.g. 0-10vdc) and the number of bits which
determine the precision of the representation. The number of bits used to represent the input
signal thus defines the precision of the sample, and the sampling frequency
determines the maximum frequency content of the input signal.
For simplicity, we will focus on a simple binary representation of a 0 to +5vdc input. We start by assuming that this range of the input voltage is to correlate with a 3-bit binary change of from 000 to 111 as depicted in Table 1.
Table 1. Resolution of a 3-Bit binary to voltage conversion.

Note that the input voltage changes from 0 to 0.625 before the first bit (Least Significant Bit, or LSB) is raised. The resolution of this 3-bit conversion is thus 0.625 volts, or R=Vmax/2n=3=5vdc/8=0.625 volts. The total number of voltage levels that may be represented with n=3 bits are just 2n=8. This is, of course, not a very accurate discrimination of the input voltage, and so we normally take a much larger number of bits to represent the voltage change. Typical microprocessors use 8-, 10-, or 12-bits to represent analog signals. Generally higher resolutions are only used in situations where extreme precision is required. If the full scale is kept at +5vdc for comparison, the resolution of various bit-levels are shown in Table 2.
Table 2. Levels and resolution of varying bits.

One of the basic building blocks which help to merge the analog and digital worlds is a comparator, shown in Figure 2a. The output of this system is either 0vdc (for when E2>E1) or +5vdc (E2<E1) representing a logic 0 or 1 digital signal. Figure 2b shows the logic symbol for a comparator. The comparator is equivalent to an op-amp in open-loop, but with a simple transistor output stage to assure that the voltage never exceeds +5vdc or falls below +0vdc. Neither E1 or E2 is required to exceed the usual +3.5vdc level to force the output to logic 0 or 1 (0vdc or +5vdc).

Figure 2. a) Analog comparator
equivalent and b) Shorthand representation of a comparator.
A simple n-bit DAC is shown in Figure 3. The gains are such that the output is +10vdc when all bits are on (on=+5vdc), and +1/2nvdc when only the E0 or least significant bit (LSB) input is on.

Figure 3. DAC circuit for an n-bit device.
To make this a more concrete example, let’s consider a 4-bit DAC, shown in Figure 4. Here there are only four inputs, and their voltages are either at a logic 0 (+0vdc) level or a logic 1 (+5vdc).

Figure
4. Elementary four-bit DAC.
For this circuit, the overall
gain of the LSB (E0) input
is G0=+1/8 and the MSB (E3) input is G3=+1. Thus, and input of [5v,0v,5v,5v] corresponding to a logic input
of 1011 would be computed as
![]()
Similarly, a logical or binary input of 0011 would only be 1.875vdc and the full scale input (binary 1111) would produce an output of 9.375vdc. Toggling the Least Significant Bit (LSB) on or off results in a change of 0.625vdc, and this the resolution of the DAC. The full output range for the binary input from 0000 to 1111 is 0 to 9.375vdc.
Computer Architecture
It is now important to look at how computers are internally configured to understand how the digital representations of analog signals can be integrated into the digital world. The first concept is that of the computer bus structure.

Figure 5. Standard bus architecture.
Today’s computers almost exclusively have the bus
structure shown in Figure
5. This bus
structure was invented in 1951 for the Whirlwind real-time computer by Ken
Olsen, a graduate student at MIT and founder of a computer manufacturing
company specializing in real-time minicomputers, Digital Equipment
Corporation. In this configuration, all
of the bus devices that connect to the bus have access to the three types of
signals on the bus: (1) Address, (2) Data, and (3) Control. This “bus” innovation allowed for tremendous
flexibility and allowed computers to have a basic layout and then be
“personalized” by merely adding whatever interfaces are needed to meet specific
needs. Even Ken Olsen didn’t initially
recognize the real potential for this, and is quoted as having stated that "There
is no reason anyone would want a computer in their home."
Digital Devices
Figure 6 portrays the typical types of unit devices that entire computers are made from. They include YES, NOT, AND gates, OR gates. They have one or more inputs, a single output, and their logic output states are summarized in a table called a “truth table” for that device, also shown in the figure.

Figure 6. The four basic logic gates and their truth tables.
The other important gate types are shown in Figure 7 and include the NAND, NOR, and Exclusive OR, or XOR, gates.

Figure 7. Complement logic gates, NAND, NOR, and XOR.
Finally, a logic gate that has enormous importance is the Flip-Flop. This device is used to take a digital snapshot of the input lines when CLK goes high, and then hold that value until another CLK signal comes along. Usually, these gates come packaged in a large number (4, 8, 16, 32, ..) with a single CLK input as shown in Figure 8.