Binary Weighted DAC

Table of Contents

Digital-to-Analogue Converters, or DAC’s as they are more commonly known, are the opposite of the Analogue-to-Digital Converters we looked at in a previous tutorial. DAC’s convert binary or non-binary numbers and codes into analogue ones with its output voltage (or current) being proportional to the value of its digital input number. For example, we may have a 4-bit digital logic circuit that ranges from 0000 to 11112, (0 to F16) which a DAC converts to a voltage output ranging from 0 to 10V.

Converting an “n”-bit digital input code into an equivalent analogue output voltage between 0 and some VMAX value can be done in a number of ways, but the most common and easily understood conversion methods uses a weighted resistors and a summing amplifier, or a R-2R resistor ladder network and operational amplifier. Both digital-to-analogue conversion methods produce a weighted sum output, with the weights set by the resistive values used in the ladder networks contributing a different “weighted” amount to the signals output.

We saw in our tutorial section about Operational Amplifiers that an inverting amplifier uses negative feedback to reduce its open-loop gain, AOL and does so by feeding back a fraction of its output signal back to the input. We also saw that the input voltage VIN is connected directly to its inverting input via a resistor RIN and that the inverting amplifiers closed-loop voltage gain, AV(CL) is determined by the ratio of these two resistors as shown.

Inverting Operational Amplifier Circuit

inverting operational amplifier circuit

Then we can see that VOUT is given as VIN multiplied by the closed-loop Gain (ACL), which is determined by the ratio of the feedback resistance, RF to the input resistance, RIN. So by altering the values of either RF or RIN we can change the closed-loop gain of the op-amp and therefore the value of VOUT (IF*Rf) for a given input signal. Here in this inverting operational amplifier example we have used a single input voltage signal, but what if we added another input resistor to combine two or more analogue signals into a single output, what would be the effect on the circuit and its gain.

Digital-to-Analogue Converter Summing Amplifier

By connecting multiple inputs to the negative terminal of the operational amplifier, we can convert the single input circuit from above into a summing amplifier or to be more precise, a “summing inverting voltage amplifier” circuit.

As the negative feedback created by the feedback resistor, RF biases the inverting input of the op-amp at zero potential, any input signals are effectively electrically isolated from each other with the output being the inverted sum of all the input signals combined. Thus a summing amplifier in the inverting mode produces the negative sum of any number of input voltages, whereas a no-inverting summing amplifier would produce the positive sum of any number of input voltages. Consider the circuit below.

Inverting Summing Amplifier Circuit

inverting summing amplifier circuit

In the summing amplifier circuit above, the output voltage, (VOUT) is proportional to the sum of the four input voltages, VIN1, VIN2, VIN3, and VIN4 and we can modify the original equation for the inverting amplifier configuration above to take account of these four new input values as follows:

summing amplifier equation

Then we can see that the output voltage is an inverted, scaled sum of the four input voltages as each input voltage is multiplied by its corresponding gain and added to the next to produce the total output. If all the resistances are the same and of an equal value, that is: RF = R1 = R2 = R3 = R4, then each input channel will have a closed-loop voltage gain of unity (1) so the output voltage is given simply by:

VOUT = –( VIN1 + VIN2 + VIN3 + VIN4 )

If we now assume that the four inputs of the summing amplifier are binary inputs with voltage values of either 0 or 5 volts (LOW or HIGH, 0 or 1) and we double the resistive values of each input resistor with regards to the previous one, we can produce an output condition which would be the weighted sum of these four input voltages creating the basic circuit for a 4-bit binary weighted digital-to-analogue converter, or 4-bit weighted D/A converter.

Labelling the four summing inputs as A, B, C, D and making RF = 1kΩ, with the four input resistors ranging from 1kΩ to 8kΩ (or multiples thereof), we can construct a simple 4-bit binary weighted analogue-to-digital converter circuit as shown.

4-bit Binary Weighted Digital-to-Analogue Converter

4-bit digital to analogue converter

For a 4-bit binary number there are 24 = 16 possible combinations or A, B, C, and D ranging from 00002 to 11112 which corresponds to decimal 0 to 15 respectively. If we make the weight of each input bit double with respect to the other, we end up with an 8-4-2-1 binary code ratio corresponding to 23, 22, 21 and 20.

So if we set the “D” input resistance at 1kΩ, the “C” input resistance at 2kΩ (that is the double of D), the “B” input resistance at 4kΩ (double C), and the “A” input resistance at 8kΩ (double B), with the feedback resistance RF set again at 1kΩ, then the transfer characteristic of the 4-bit binary weighted digital-to-analogue converter would be:

4-bit DAC Transfer Characteristic

4-bit d/a converter output

So we can see that if a TTL voltage of +5 volts (logic 1) is applied to the summing amplifiers input, VD which represents the most significant bit (MSB), the op-amp’s gain will be RF/R4 = 1kΩ/1kΩ = 1 (unity). Thus with a 4-bit binary code of 1000 applied, the output of the digital-to-analogue converter circuit will be -5 volts. Likewise, if +5 volts (logic 1) is applied to the summing amplifiers input VC, the op-amp’s gain will be RF/R3 = 1kΩ/2kΩ = 1/2 (one half). So the 4-bit binary code of 0100 would produce an analogue output voltage of -2.5 volts.

Again with a logic “1” applied to the summing amplifiers input VB, the op-amp’s gain will be RF/R2 = 1kΩ/4kΩ = 1/4 (one quarter) with the 4-bit binary code of 0010 producing an output voltage of -1.25 volts, and finally a logic “1” applied to the summing amplifiers input, VA which represents the least significant bit (LSB), the op-amp’s gain will therefore be RF/R1 = 1kΩ/8kΩ = 1/8 (one eighth) with the 4-bit binary code of 0001 producing an output voltage of -0.625 volts, (a 12.5% resolution).

The resolution of this simple 8-4-2-1 binary weighted digital-to-analogue converter will produce an output voltage change of 0.625 volts per 1-bit change in the binary number, and we can express this output voltage change in the following table.

4-bit Binary Weighted D/A Converter Output

Digital Inputs VOUT Expression VOUT
D C B A 1*VD + 1/2*VC + 1/4*VB + 1/8*VA in Volts
0 0 0 0 0*5 + 0*5 + 0*5 + 0*5 0
0 0 0 1 0*5 + 0*5 + 0*5 + 1/8*5 –0.625
0 0 1 0 0*5 + 0*5 + 1/4*5 + 0*5 –1.25
0 0 1 1 0*5 + 0*5 + 1/4*5 + 1/8*5 –1.875
0 1 0 0 0*5 + 1/2*5 + 0*5 + 0*5 –2.50
0 1 0 1 0*5 + 1/2*5 + 0*5 + 1/8*5 –3.125
0 1 1 0 0*5 + 1/2*5 + 1/4*5 + 0*5 –3.75
0 1 1 1 0*5 + 1/2*5 + 1/4*5 + 1/8*5 –4.375
1 0 0 0 1*5 + 0*5 + 0*5 + 0*5 –5.00
1 0 0 1 1*5 + 0*5 + 0*5 + 1/8*5 –5.625
1 0 1 0 1*5 + 0*5 + 1/4*5 + 0*5 –6.25
1 0 1 1 1*5 + 0*5 + 1/4*5 + 1/8*5 –6.875
1 1 0 0 1*5 + 1/2*5 + 0*5 + 0*5 –7.50
1 1 0 1 1*5 + 1/2*5 + 0*5 + 1/8*5 –8.125
1 1 1 0 1*5 + 1/2*5 + 1/4*5 + 0*5 –8.75
1 1 1 1 1*5 + 1/2*5 + 1/4*5 + 1/8*5 –9.375

Where the output voltages are all negative due to the inverting input of the summing amplifier.

By increasing the number of binary digits and the resistive summing network so that each resistor has a different weighting, the resolution of the analogue output voltage for a binary weighted digital-to-analogue converter can be increased. For example, an 8-bit DAC with TTL +5 inputs would produce a resolution of 0.039 (1/128*V) volts, while a 12-bit DAC would be 0.00244 (1/2048*V) volts per step (1 LSB) change of the input binary (or non-binary) code.

Clearly then the disadvantage here is that a binary weighted resistor DAC requires a large range of high precision resistors (one per bit) for an “n”-bit DAC making it impractical (and expensive) for converters with more than a just a few bits of resolution. But we can expand on this idea of a binary weighted digital-to-analogue circuit configuration which uses different value resistors one step further by converting it into a R-2R resistor ladder DAC which requires only two precision resistance values, namely R and 2R.

In the next turoial about Digital-to-Analogue Converters, we will look at how the R-2R Digital-to-Analogue Converter uses just two resistor values to convert a digital binary number into an analogue voltage output.


Similar Articles & Blogs

Explore similar articles on various electronics and electrical topics – 

Logic AND Function

In 1854, George Boole performed an investigation into the “laws of thought” which were based around a simplified version of the “group” or “set” theory, and from

Learn More >>

Binary Coded Decimal

As we have seen in this Binary Numbers section of tutorials, there are many different binary codes used in digital and electronic circuits, each with

Learn More >>

Binary Fractions

We know that decimal (or denary) numbers use the base ten (base-10) numbering system where each digit in a decimal number is allowed to take one

Learn More >>

Octal Number System

The Octal Numbering System is very similar in principle to the previous hexadecimal numbering system except that in Octal, a binary number is divided up into groups

Learn More >>