This enhancement has been incorporated in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
The ability to have a bitwise operator operate on a sign bit is not available in Simulink. To work around this issue, convert the signal with the signed data type to an unsigned data type using a Data Type Conversion block. In the Data Type Conversion block, set the 'Input and Output to have equal' parameter value to 'Stored Integer'--this causes Simulink to avoid any scaling of the input. After running the unsigned value through the bitwise operator block, use another Data Type Conversion block, with 'Input and Output to have equal' parameter set to 'Stored Integer', to convert back to a signed integer.
An example model 'bitwise_sign.mdl' is attached with the solution.
Best Answer