update gray-coding.py, add gray_to_bin() non-recursive