| Simulink® | ![]() |
Logic and Bit Operations

The Shift Arithmetic block can be used to shift the bits or the binary point of a signal, or both.
For example, the effects of binary point shifts two places to the right and two places to the left on an input of data type sfix(8) are shown below.
| Shift Operation | Binary Value | Decimal Value |
|---|---|---|
No shift (original number) | 11001.011 | -6.625 |
Binary point shift right by two places | 1100101.1 | -26.5 |
Binary point shift left by two places | 110.01011 | -1.65625 |
This block performs arithmetic bit shifts on signed numbers. Therefore, the most significant bit is recycled for each bit shift. The effects of bit shifts two places to the right and two places to the left on an input of data type sfix(8) follow.
| Shift Operation | Binary Value | Decimal Value |
|---|---|---|
No shift (original number) | 11001.011 | -6.625 |
Bit shift right by two places | 11110.010 | -1.75 |
Bit shift left by two places | 00101.100 | 5.5 |
The Shift Arithmetic block accepts signals of any numeric data type supported by Simulink software, including fixed-point data types, except boolean type.

The number of places the bits of the input signal is shifted. A positive value indicates a shift right, while a negative value indicates a shift left.
The number of places the binary point of the input signal is shifted. A positive value indicates a shift right, while a negative value indicates a shift left.
Direct Feedthrough | Yes |
Sample Time | Inherited |
Scalar Expansion | Yes |
![]() | S-Function Builder | Sign | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |