How do I convert int to binary or hex data?

I need convert int, short, int64 to hex data or binary data.

thank.