//example 10.3// clc //clears the window// clear //clears already existing variables// disp('since the 1''s compliment representations of the positive numbers +0 to +7 are same as the representations of the unipolar binary numbers, no offset voltage is required for these inputs.') disp('For the negative numbers 1111 to 1000, the output analog voltage is to be offset by -15V. This can be achieved by operating a switch with MSB of input to introduce proper value of Voff.') //answer//