how to convert an integer to binary in Arduino?

Works for any A where B = 10 (and every B where A = 10).