Previous Assignment

A02: Digital to Analog Converter

Next Assignment  
 

 
Due:  Wednesday, January 22 by 4:30 PM in the PLAB DropBox

The Digital to Analog Converter, better known as a  DAC, is an electronic component that converts a digital number (represented as a binary number by the logic level of its associated bits) into an analog voltage.  DACs are used in a wide variety of applications including voltmeters, plotters, oscilloscope displays, and various computer-controlled devices.

The output of a DAC is computed by performing a weighted sum of all of its input bits according to

where bi is the bit value (0 or 1), N is the total number of bits, and i is an index that ranges from 0 to N-1.  An N-bit binary number (interpreted as an unsigned integer) can take on values ranging from 0 to 2N - 1.

Create a Virtual Instrument that will convert a binary number, whose bits are represented by a Boolean array, into an unsigned integer numerical value.   Use a For Loop to index the elements of the array and use a Shift Register to help compute the running sum.