bit? ( x n -- ? )
Factor handbook » The language » Numbers » Arithmetic » Bitwise arithmetic » Additional bitwise arithmetic

Prev:clear-bit ( x n -- y )
Next:bit-range ( x high low -- y )


Vocabulary
math

Inputs
xan integer
nan integer


Outputs
?a boolean


Word description
Tests if the nth bit of x is set.

Examples
USING: math prettyprint ; 0b101 2 bit? .
t


See also
set-bit, clear-bit

Definition


Methods