Dolby Interview Question

One riddle about 2 ropes and logic for counting digit "1" in an integer value.