For example, if six bits are used to represent the number "00 1010" (decimal positive 10) and the sign extends operation increases the word length to 16 bits, then the new representation is simply "0000 0000 0000 1010".
Thus, by padding the left side with ones, the negative sign and the value of the original number are maintained.
In a move or convert operation, zero extension refers to setting the high bits of the destination to zero, rather than setting them to a copy of the most significant bit of the source.
If the source of the operation is an unsigned number, then zero extension is usually the correct way to move it to a larger field while preserving its numeric value, while sign extension is correct for signed numbers.
For example, the instruction mov eax, 1234 will clear the upper 32 bits of the rax[a] register.