6.1.0320 2* two-star CORE

( x1 -- x2 )

x2 is the result of shifting x1 one bit toward the most-significant bit, filling the vacated least-significant bit with zero.

Testing:

T{   0S 2*       ->   0S }T
T{    1 2*       ->    2 }T
T{ 4000 2*       -> 8000 }T
T{   1S 2* 1 XOR ->   1S }T
T{  MSB 2*       ->   0S }T

ContributeContributions

poggingfishavatar of poggingfish [239] Suggested reference implementation2022-06-20 17:34:22

: 2* 2 * ;
Reply New Version