Coin Parity with a Balance Scale

You have 2ⁿ visually identical coins, each weighing 0 or 1 gram. In at most n weighings on a balance scale, you can always determine whether the count of zero-weight coins is even or odd. The key is a binary search over a swap path.