Added iterative Gray with bit operations