Well.. binary and hexadecimal are two representations of the same thing. "FF" in hexadecimal is literally the exact same thing as "11111111" in binary. They both represent the number 256 (or 255, if you consider 0 the starting number). So, when someone writes "binary" code, usually they actually write it in hexadecimal because it is far easier to read and interpret than binary. One byte in binary is 8 characters, where as it's two in hexadecimal.
As for writing binary code, people don't do that in hex or binary. Instead, there's yet another form to show "binary code" in, this one's called assembly. It's a textual representation of binary so humans can read text and understand rather than memorize tons of code patterns. For example, the instruction 06 in hexadecimal is represented as the word "push" in assembly. This particular command takes a number and saves ("pushes") it to ram memory for later use. So it's easier to read a line that says "push 1" rather than reading the hexadecimal line "0600000001" or the binary line "0000011000000000000000000000000000000001".