Make lsb1 flexible so that it can take any number of bits (untested)