Please provide a brief history of Gray code, why invented it and why?