bit operation solution