Zeroextending
Zero-extending, or zero extension, is the operation of increasing the width of a binary value by padding zeros in the most-significant bits, thereby preserving the value when the number is treated as unsigned. The original n-bit value is mapped to an m-bit value (m > n) by inserting (m − n) zeros at the high end. This is distinct from sign extension, which pads with the most-significant bit (the sign bit) to preserve the value in two's complement signed representations.
Example: extending an 8-bit value 0xCA (11001010 in binary) to 16 bits yields 0x00CA. The numeric value
In hardware and software, zero-extension is common when widening unsigned integers or converting between different Word
In high-level languages, converting a smaller unsigned integer to a larger unsigned type typically results in