Do processor commands and values have binary codes?
Decimal and hexadecimal have nothing to do with it. These are just different ways of expressing the same pattern. Binary 1001 is hexadecimal 0x9, unsigned decimal 9, and signed 4-bit decimal "negative 7". Those are just ways for a person to write the number, the computer only sees the binary pattern.

Assuming that your "diy computer" uses a Von Neumann Architecture (as most machines do), with instructions and data stored in the same memory, the only way to distinguish between instructions and data is by context. During the instruction fetch phase, whatever is read from memory at the instruction pointer, is assumed to be an instruction. Immediate data is fetched during a subsequent phase, if applicable. Some instructions may only require the instruction code itself, while other instructions may require additional data bytes stored in subsequent locations. So not every memory location necessarily contains an instruction.

An alternative is to use Harvard Architecture, with separate memories for instruction and data. This is used on TMS320 digital signal processor chips.

One of the biggest problems you're going to have with this project is that you have to do all your work in your own custom machine language, unless you also write your own assembler and compiler. Since you say you don't currently know much computer science, it might be easier to start "retrocomputing" using an older microcontroller architecture that already has assemblers, compilers, and libraries that you can use.

You might want to look into the architecture of some older microcontrollers, such as the 6502 or Motorola 68HC11, the Intel 8080, and maybe even 8051 (although that one has some quirks). Might also be worth looking on opencores.org for some HDL implementations, even if you aren't using an FPGA. There's a lot that has been written about these microcontrollers, so this should give some helpful context to understand the basic problems.