code: def bin_to_gray(bin_list):
      """
      Convert from binary coding to gray coding.
  
      We assume big endian encoding.
  
      Examples
      ========
  
      >>> from sympy.combinatorics.graycode import bin_to_gray
      >>> bin_to_gray('111')
      '100'
  
      See Also
      ========
  
      gray_to_bin
      """
      b = [bin_list[0]]
      for i in range(1, len(bin_list)):
          b += str(int(bin_list[i]) ^ int(bin_list[i - 1]))
      return "".join(b)
  
file_path: sympy/sympy/combinatorics/graycode.py
imports: from sympy.core import Basic, Integer
  import random
label_desc: Use image node_id 3 for calling a global function with example usage: bin_to_gray(bin_list) and returns: str