human
Can you provide a code to decimal Equivalent of Gray Code and its Inverse and the other steps required given the following:
Decimal Equivalent of Gray Code and its Inverse | Function to convert given decimal number of gray code into its inverse in decimal form.
Taking xor until n becomes zero.
Driver Code"
Solution in Python:
assistant
#Here is code to decimal Equivalent of Gray Code and its Inverse and the other steps required.
 def inversegrayCode ( n ) :
	inv = 0 ;
	while ( n ) :
		inv = inv ^ n ;
		n = n >> 1 ;
	return inv ;
n = 15 ;
print ( inversegrayCode ( n ) ) ;