Optimized filtering a bit