perl -e '@arr=(2,4,6,9); vec($bits,$_,1) = 1 for (@arr); print unpack("b*",$bits),$/;'