add num to binary function