Function performs a bitwise right shift for the value from input x
by the number of bits specified by input x
. Result of the operation is passed to output y
.
Example in Python
y = x >> n
X = 150 (dec) = 0x96 (hex) |
... |
Byte 2 |
Byte 1 |
... |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
Y = 37 (dec) = 0x25 (hex) |
... |
Byte 2 |
Byte 1 |
... |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
Function menu |
Block diagram |
 |
 |
Name |
Type |
Description |
x |
int32 |
Bit to be shifted |
n |
int32 |
Width of the register |
Name |
Type |
Description |
y |
int32 |
Right-shift result |
Not available