Command |
Stack Diagram |
Description |
---|---|---|
2* |
( x1 -- x2 ) |
Multiply by 2. |
2/ |
( x1 -- x2 ) |
Divide by 2. |
>>a |
( x1 u -- x2 ) |
Arithmetic right-shift x1 by u bits. |
and |
( x1 x2 -- x3 ) |
Bitwise logical AND. |
invert |
( x1 -- x2 ) |
Invert all bits of x1. |
lshift |
( x1 u -- x2 ) |
Left-shift x1 by u bits. Zero-fill low bits. |
or |
( x1 x2 -- x3 ) |
Bitwise logical OR. |
rshift |
( x1 u -- x2 ) |
Right-shift x1 by u bits. Zero-fill high bits. |
u2/ |
( x1 -- x2 ) |
Logical right shift 1 bit; zero shifted into high bit. |
xor |
( x1 x2 -- x3 ) |
Bitwise exclusive OR. |