Since the Turing Machine does not have internal memory to count the symbols, one solution is to erase zeros and ones pair-wise. This can be done using four steps:

  1. Go to the left end.
  2. Read and erase symbol (halt if it is not a 0).
  3. Go to the right end.
  4. Read and erase symbol (halt if it is not a 1).
These four steps are executed until an error is detected or until all symbols have been erased. If the read/write-head is not on a 1 in step 4, a #-symbol is written before the Turing Machine halts. Otherwise it would incorrectly halt in an empty world for strings that have exactly one zero more than they have ones.