A bit ranks rewrite