⭕bitwise operator
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ statement ⟩ expression ⟩ operator ⟩ arithmetic ⟩ bitwise
bitwise and (&), or (|), xor (^), not (~)
shift left (<<), right (>>), right with 0 fill (>>>)
~x // invert bits (convert to number, = -x - 1)
these operators convert their operand to 32-bit integers❗
bitwise operators
➕ bitwise and (&) / or (|) / xor (^) / bitwise not (~)
➕ shift left (<<) / right (>>) / right with 0 fill (>>>)
related topics
💡 (-x = ~x + 1
)
🔰 - nearest integer towards 0.
tools
💾 - 32-bit representation of signed integers.