combinat[graycode] - list of the n-bit numbers in graycode order
|
Calling Sequence
|
|
graycode(n)
|
|
Description
|
|
•
|
The procedure graycode computes and returns a list containing all n-bit integers in a graycode order starting at zero.
|
•
|
A graycode order is such that each successive pair of integers differ in only one bit in their binary representations.
|
•
|
The command with(combinat,graycode) allows the use of the abbreviated form of this command.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
000 001 011 010 110 111 101 100
| |
|
|
Download Help Document
Was this information helpful?