Add total bits calculation