1 2 3 4 5 6 7 8
// Calculating the weight of MSB and LSB clc; Ra=10; b=5; Wmsb=Ra/2; disp(Wmsb,'weight of MSB (V)=') Wlsb=Ra/2^b; disp(Wlsb,'weight of LSB (V)=')