It is common to find assembly-code lines of the form
xorq, %rdx, %rdx
One use for this operation is setting the register %rd to zero, exploiting the fact that x^x = 0. In C, it is the same as setting x = 0.
Another, more straightforward way to express this operation is
movq $0, %rdx
My question is, how do we calculate the number of bytes it takes to encode these two different implementations? I believe the first answer is 3 bytes, while the second requires 7 bytes.