constructing counting semaphores with binary logic 6297188