vv=[trues(6) for _ in 1:binomial(6,4)]
foreach(((i,idx),)->vv[i][idx].=false, enumerate(combinations(1:6,2)))
setindex!.(vv, Ref(repeat([false],2)),combinations(1:6,2))
digits.(findall(==(4),count_ones.(1:2^6)),base=2,pad=6)
function d2b(d)
b=falses(6)
i=6
while d>=1
#d,r=divrem(d,2)
b[i]=d&1
d>>=1
i-=1
end
b
end
julia> @btime d2b.(findall(==(4),count_ones.(1:2^6)))
735.135 ns (35 allocations: 2.41 KiB)
15-element Vector{BitVector}:
[0, 0, 1, 1, 1, 1]
[0, 1, 0, 1, 1, 1]
[0, 1, 1, 0, 1, 1]
[0, 1, 1, 1, 0, 1]
[0, 1, 1, 1, 1, 0]
[1, 0, 0, 1, 1, 1]
[1, 0, 1, 0, 1, 1]
[1, 0, 1, 1, 0, 1]
[1, 0, 1, 1, 1, 0]
[1, 1, 0, 0, 1, 1]
[1, 1, 0, 1, 0, 1]
[1, 1, 0, 1, 1, 0]
[1, 1, 1, 0, 0, 1]
[1, 1, 1, 0, 1, 0]
[1, 1, 1, 1, 0, 0]