w>h/h ( w -- h1 h2 )
Factor handbook » The language » Numbers » Arithmetic » Bitwise arithmetic » Additional bitwise arithmetic

Prev:d>w/w ( d -- w1 w2 )
Next:h>b/b ( h -- b1 b2 )


Vocabulary
math.bitwise

Inputs
wa 32-bit integer


Outputs
h1a 16-bit integer
h2a 16-bit integer


Word description
Outputs two integers, the least followed by the most significant 16 bits of the input.

Definition


: w>h/h ( w -- h1 h2 )
[ 65535 bitand ] [ -16 shift 65535 bitand ] bi ;