Hello,
In order to be simple: let's code hexadecimal numbers on 4 digits.
Example: 500-200=300 (in décimal)
[tex]500_{10}=01F4_{16}\\\\
200_{10}=00C8_{16}\\\\
For\ subtract\ 00C8\ we\ calculate\ 15th\ complement\\\\
C_{15}(00C8)=FF37\\\\
16th\ complement= FF37+0001=FF38\\\\
Then\ we\ add\\\\
01F4+FF38=(1)012C\ on\4\ digits:\ 012C\\
012C_{16}=300_{16}
[/tex]