// output of ./demo/bits/bit-nextgray-demo.cc: // Description: //% Gray increment/counter. arg 1: 5 == n [Bits in words] default=5 0 ...... ...... ...... 1 .....1 ....11 .....1 2 ....1. ...11. ....11 3 ....11 ...1.1 ....1. 4 ...1.. ..11.. ...11. 5 ...1.1 ..1111 ...111 6 ...11. ..1.1. ...1.1 7 ...111 ..1..1 ...1.. 8 ..1... .11... ..11.. 9 ..1..1 .11.11 ..11.1 10 ..1.1. .1111. ..1111 11 ..1.11 .111.1 ..111. 12 ..11.. .1.1.. ..1.1. 13 ..11.1 .1.111 ..1.11 14 ..111. .1..1. ..1..1 15 ..1111 .1...1 ..1... 16 .1.... 11.... .11... 17 .1...1 11..11 .11..1 18 .1..1. 11.11. .11.11 19 .1..11 11.1.1 .11.1. 20 .1.1.. 1111.. .1111. 21 .1.1.1 111111 .11111 22 .1.11. 111.1. .111.1 23 .1.111 111..1 .111.. 24 .11... 1.1... .1.1.. 25 .11..1 1.1.11 .1.1.1 26 .11.1. 1.111. .1.111 27 .11.11 1.11.1 .1.11. 28 .111.. 1..1.. .1..1. 29 .111.1 1..111 .1..11 30 .1111. 1...1. .1...1 31 .11111 1....1 .1....