compute all binary sequences of lenght n
i'm trying to obtain all possible binary sequences of lenght n. for exemple, for a lenght of 3 i would get
0 0 0
0 0 1
0 1 0
1 0 0
1 1 0
0 1 1
1 0 1
1 1 1
does anybody have an idea for coding it in max ?
depending on number of bits, that could become
quite a long list of sequences ...
you can try jasch bitlist external,
or build a embedded list into coll or similar,
if you know what maximum bit size you want to use.
radiogroup can be a way to follow
bzz
by converting decimal to binary.
3 digits = 111 = 7, so: uzi 7 -> decimal to binary
Here's a native solution that doesn't rely on any externals.
hey roman thank's for this handy patch , that made me understand a bit more how binary works. and thank's a lot zuei your patch is doing exactly what i'm looking for !!