nth-byte ( x n -- b )


Vocabulary
io.binary

Inputs and outputs
xan integer
na non-negative integer
ba byte


Word description
Outputs the nth least significant byte of the sign-extended 2's complement representation of x.

Definition
USING: math ;

IN: io.binary

: nth-byte ( x n -- b ) -8 * shift mask-byte ; inline