Function performs a bitwise left 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 = 600 (dec) = 0x258 (hex) |
... |
Byte 2 |
Byte 1 |
... |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
Function menu |
Block diagram |
 |
 |
Name |
Type |
Description |
x |
int32 |
Bit to be shifted |
n |
int32 |
Width of the register |
Name |
Type |
Description |
y |
int32 |
Left-shift result |
Not available