If the i/p resistors in each branch are selected, such that the i/p value of each resistor is twice the value of the resistor in earlier input branch, then a digital logical voltage at the i/p terminal will produce an o/p which is a weighted totality of the input voltages applied.
The exactness of such a DA (digital to analogue converter) circuit is imperfect by the accuracy of the values of the resistor employed and the differences in denoting the logic levels.