Jelly, 25 bytes
ṫi¥³ḣi
L2ṗŒ!瀵ạ2\S€ỊḄµÞṪ
A full program taking the bit-strings using 1
and 2
* as lists. The arguments are from
and to
. The program prints a list of lists of the same.
* 0
and 1
may be used instead at the cost of a byte (add ’
between L2ṗ
and Œ!ç€...
to decrement).