sub bits { my ($length) = @_; return map sprintf("%0${length}b\n", $_), 0..2**$length-1; }