The equation given by you is same as that given by Mr Murali as shown below:
Vo = KRf ( A1/2 +......+ A8/256) ----(a) ; where A1..A8 is a binary number
From the above equation,
Vref = KRf (1) ----(b) ; (A1/2+... +A8/256) =1 since for Vref A1 to A8 all are one.
Dividing (a) by (b),
Vo/Vref = (A1/2 +.....+A8/256)
Multiplying both sides by 256,
(Vo/Vref) 256 = (128.A1+64.A2 +......+ A8 ) ....(c) which is same as Mr.Murali's
eqtn. applied to a 6bit DAC.
The above eqation (c) will be valid for unipolar DACs.For bipolar offset binay DACs also it will hold good if you take Vref as total span of -Vref to +Vref.
The equation also applies to similar ADCs if you replace Vo by Vin.
Then there are sign magnitude and 2's complement codes for which +ve and -ve outputs are coded separately.