bit-range ( x high low -- y )
Factor handbook > The language > Numbers > Arithmetic > Bitwise arithmetic > Additional bitwise arithmetic

Prev:bit? ( x n -- ? )
Next:bits ( m n -- m' )


Vocabulary
math.bitwise

Inputs and outputs
xan integer
highan integer
lowan integer
yan integer


Word description
Extract a range of bits from an integer, inclusive of each boundary.
USING: math.bitwise prettyprint ; 0b1100 3 2 bit-range .b
0b11


Definition