What is zero fill?

There are two ways a smaller integer type can be converted to a larger one:
  • Zero fill
  • Sign extension
The method employed depends on the instruction that is using the operand.
For zero-fill, all bits above the range of the smaller type are filled with 0.
For example, SINT: 16#87 = -121 converted to a DINT yields 16#00000087 = 135
For sign-extension, all bits above the range of the smaller type are filled with the sign bit of the smaller type.
For example:SINT: 16#87 = -121 converted to a DINT yields 16#FFFFFF87 = -121
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.