Main Content

Shift right on a signed integer as arithmetic shift


Describe how your compiler for the hardware fills the sign bit in a right shift of a signed integer.

Category: Hardware Implementation


Default: On


Generates simple, efficient code whenever the Simulink® model performs arithmetic shifts on signed integers.


Generates fully portable but less efficient code to implement right arithmetic shifts.


  • Select this parameter if the C compiler implements a signed integer right shift as an arithmetic right shift.

  • An arithmetic right shift fills bits vacated by the right shift with the value of the most significant bit. The most significant bit indicates the sign of the number in twos complement notation.


  • Selecting a device by using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

Parameter: ProdShiftRightIntArith
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended settings

DebuggingNo impact
TraceabilityNo impact
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also