binary digit differ working method