how to convert an integer to binary in Arduino?

The processor knows only binary.
Hex is just binary for grown-ups.