Algorithm AS 227: Efficient Generation of all Binary Patterns by Gray Code Counting
N. W. A. Marsh · Journal of the Royal Statistical Society Series C (Applied Statistics) · 1987
N. W. A. Marsh, Algorithm AS 227: Efficient Generation of all Binary Patterns by Gray Code Counting, Journal of the Royal Statistical Society. Series C (Applied Statistics), Vol. 36, No. 2 (1987), pp. 245-249