A simple DOS tool to do this is available here:
http://www.wehner.org/tools/gray/
Charles Douglas Wehner