Handbook
Glossary
clear-bit ( x n -- y )
Factor handbook
»
The language
»
Numbers
»
Arithmetic
»
Bitwise arithmetic
»
Additional bitwise arithmetic
Prev:
set-bit ( x n -- y )
Next:
bit? ( x n -- ? )
Vocabulary
math
.
bitwise
Inputs
x
an
integer
n
an
integer
Outputs
y
an
integer
Word description
Sets the
n
th bit of
x
to zero.
Examples
USING: math.bitwise kernel prettyprint ; 0xff 7 clear-bit .h
0x7f
See also
bit?
,
set-bit
Definition
USING:
math
;
IN:
math.bitwise
:
clear-bit
( x n -- y )
2^
bitnot
bitand
;
inline