//example 10.5// clc //clears the window// clear //clears already existing variables// disp('the digital value 000 should be assigned to the analog voltage interval 0V +-S/2, Since in 2''s compliment representation, there is one more negative number than the number of positive numbers, the analog voltage from -V to +V should be divided in seven intervals, each of size S=2V/7, and one digital value is to be assigned to each interval. The extra digit output 100 can be used to represent the interval -V to -9V/7')