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

Next:clear-bit ( x n -- y )


Vocabulary
math.bitwise

Inputs
xan integer
nan integer


Outputs
yan integer


Word description
Sets the nth bit of x.

Examples
USING: math.bitwise kernel prettyprint ; 0 5 set-bit .h
0x20


See also
bit?, clear-bit

Definition