How to XOR two binary numbers having different lengths?
There are multiple ways to interpret this XOR.

The most common one is that you XOR bit-wise, and that these strings represent numbers, so adding 0 to the left doesn't change their value.

Then $5 \equiv 101 \to 0101$  and then you XOR bit-wise.

x 1101
y 0101
------- XOR
  1000 


which gives 8, if we are talking about unsigned numbers.
However, the above depends on my understanding of your system. Change the assumptions, change the results.