The Logic And Mathematics Behind Binary Code