We can observe that there are only 8 resulting shapes even though they are selected by using a 4-bit value. The continue bit does not exist internally.
In other words, in Python we have:
shape = 1 if (ves >> 2 == 0) else 7 if (ves >> 2 == 1) else ves & 7