Digital to Analog Converter (DAC)
A Digital to Analog Converter (DAC) converts a digital input
signal into an analog output signal. The digital signal is
represented with a binary code,, which is a combination of bits 0
and 1.
A Digital to Analog Converter (DAC) consists of a number of binary
inputs and a single output. In general, the number of binary inputs of a
DAC will be a power of two.
The block diagram of DAC is shown in the following figure.
For a voltage output DAC, the D/A converter is mathematically described
As
     Where Vo = Output voltage,
           VFS= Full scale output voltage
               K= Scaling factor usually adjusted to unity
     d1d2….dn= n-bit binary fractional word with the decimal point
                 located at the left.
             d1=most significant bit (MSB) with a weight of VFS/2
             dn=least significant bit (LSB) with a weight of VFS/2n
Types of DACs: There are three types off DACs
 (i) Weighted Resistor DAC
 (ii)R-2R ladder
  (iii) Inverted R-2R Ladder
This section discusses about these two types of DACs in detail −
(i)Weighted Resistor DAC R-2R Ladder DAC:-
A weighted resistor DAC produces an analog output, which is
almost equal to the digital (binary) input by using binary weighted
resistors in the inverting adder circuit. In short, a binary weighted
resistor DAC is called as weighted resistor DAC.
The circuit diagram of a n-bit binary weighted resistor DAC is
shown in the following figure −
It has n-electronic switches d1,d2,d3,………………dn controlled by binary
 input word. These switches are single pole double throw (SPDT) type.
If the binary input to a particular switch is ‘1’,it connects the
resistance to the reference voltage(-VR).
If the binary input to a particular switch is ‘0’,it connects the
resistance to the ground.
The output current for an ideal op-amp can be written as
       Io = I1+ I2+ I3+ I4+ ----------------------------------+ In
The analog output voltage is therefore positive staircase as shown in
below fig.
The circuit diagram of a 3-bit binary weighted resistor DAC is shown in the
following figure −
The disadvantages of a binary weighted resistor DAC are as
follows −
The difference between the resistance values corresponding to
LSB & MSB will increase as the number of bits present in the
digital input increases.
It is difficult to design more accurate resistors as the number of
bits present in the digital input increases.
  (ii)R-2R ladder DAC:
Wide range of resistors are required in binary weighted resistor type
DAC. This can be avoided by using R-2R ladder DAC where only two
values of resistors are required. For simplicity ,consider a 3-bit DAC
shown in below fig(a).
The circuit in the above fig (a) is simplified as shown in the below fig.(b).
and fig (c).
Then the voltage at node C can be easily calculated by using network
analysis as,
   The output voltage is
The switch position corresponding to the binary word 001 in 3-bit DAC is
shown in fig(a).
The circuit can be simplified to the equivalent form of fig shown in
below. The voltages at the nodes (A,B,C) formed by resistor branches
are easily calculated in a similar fashion and the output voltage
becomes,
The advantages of a R-2R Ladder DAC are as follows −
 R-2R Ladder DAC contains only two values of resistors R
 and 2R. So, it is easy to select and design more accurate
 resistors.
 If more number of bits are present in the digital input, then
 we have to include required number of R-2R sections
 additionally.
Due to the above advantages, R-2R Ladder DAC is preferable over
binary weighted resistor DAC