Given this tree structure, it's easy to determine the cumulative sum up to a point. The idea is the following: we maintain a counter, initially 0, then do a normal binary search up until we find the node in question. As we do so, we also do the following: any time that we move right, we also add in the current value to the counter.
missing word and improving the sentence which is confusing as is
For lookup we add up on every move to right an viceversa for update
The rightmost bit should be removed not leftmost.