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

Prev:unmask ( x n -- y )
Next:unmask? ( x n -- ? )


Vocabulary
math.bitwise

Inputs
xan integer
nan integer


Outputs
?a boolean


Word description
Returns true if all of the bits in the mask n are set in the integer input x.

Examples
USING: math.bitwise kernel prettyprint ; 0xff 0xf mask? .
t

USING: math.bitwise kernel prettyprint ; 0xf0 0x1 mask? .
f


Definition