get_bits() outputs exactly as many bits as requested no need to mask them.