A **DAC (Digital-to-Analog Converter)** is used to convert a digital signal to the analog format.

An example of DAC: music stored in a DVD in digital format must be converted to an analog voltage for playing out on a speaker.

Consider a DAC system having N-bit digital input and an analog output. The block diagram is shown below.

For a 3-bit DAC, with input S_{2}S_{1}S_{0}, the output voltage is given by

V_{A} = K[(S_{2} × 2^{2}) + (S_{1} × 2^{1}) + (S_{0} × 2^{0})]

In general, DAC output voltage is given by

where, K is proportional to the reference voltage V_{R}.

The graph between the output voltage and digital input is given below.

## 1. DAC using binary-weighted resistors

Consider the DAC as shown in above figure. It is a 4 bit DAC.

If the input bit S_{k} is 1, A_{k} gets connected to reference voltage V_{R}; else, it gets connected to ground.

V(A_{k}) = S_{k} × V_{R} .

Since the inverting terminal of the Op Amp is at virtual ground,

Using,

We get,

The output voltage is given by

**Drawback of DAC using binary-weighted resistors**

The output voltage variation can be reduced by using resistors with a smaller tolerance.

However, it is difficult to fabricate an IC with widely varying resistance values (from R to 2^{N−1}R) and each with a small enough tolerance.

## 2. R-2R ladder network DAC

The R-2R ladder network circuit is shown below. A_{0} is the least significant bit and A_{3} is the most significant bit. Node A_{k} (k=0,1,2,3….) is connected to reference voltage V_{R} if input bit S_{k} is 1; else, it is connected to ground.

Its equivalent circuit is given as

To find the analog output voltage, we have to drive the Thevenin equivalent circuit for this network. For Thevenin circuit, first, we calculate the Thevenin’s equivalent resistance. After that Thevenin voltage corresponding to each S_{k} = 1. (where, k=0,1,2,3)

**Thevenin resistance**

Therefore, Thevenin’s resistance is given by, **R _{Th} = R**

**V _{Th} for input S_{0} =1**

Therefore, Thevenin voltage for S_{0} = 1 is **V _{Th} (S_{0}) = V_{R}/16**

**V _{Th} for input S_{1} =1**

Therefore, Thevenin voltage for S_{1} = 1 is **V _{Th} (S_{1}) = V_{R}/8**

**V _{Th} for input S_{2} =1**

Therefore, Thevenin voltage for S_{2} = 1 is **V _{Th} (S_{2}) = V_{R}/4**

**V _{Th} for input S_{3} =1**

Therefore, Thevenin voltage for S_{3} = 1 is **V _{Th} (S_{3}) = V_{R}/2**

VTh = V_{Th} (S_{0}) + V_{Th} (S_{1}) + V_{Th} (S_{2}) + V_{Th} (S_{3})

So by connecting the R-2R ladder to an Op Amp, forms a DAC as shown below.

The DAC output voltage is given by

The above circuit is for 4 bit DAC. For N bit DAC, the output voltage is given by