Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 591 Bytes

bit_not.md

File metadata and controls

31 lines (24 loc) · 591 Bytes
layout language permalink command related_commands
api-command
Python
api/python/bit_not/
bit_not
bit_and bit_or bit_sal bit_sar bit_xor
bit_and/
bit_or/
bit_sal/
bit_sar/
bit_xor/

Command syntax

{% apibody %} r.bit_not() → number {% endapibody %}

Description

A bitwise NOT, or complement, is a unary operation that performs logical negation on each bit, forming the ones' complement of the given binary value. Bits that are 0 become 1, and those that are 1 become 0.

Example:

r.expr(7).bitNot().run(conn)

# Result:
-8