nth-byte ( x n -- b )
Vocabulary
io.binary
Inputs and outputs
x
an
integer
n
a non-negative integer
b
a byte
Word description
Outputs the
n
th 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