Use bitwise operators for index2state
Use Fortran ordering so low-order bits correspond to low-index nodes