Difference between revisions of "BITNOT()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to perform bitwise NOT operation
 
Function to perform bitwise NOT operation
 
  
 
==Syntax==
 
==Syntax==
 
BITNOT(<expN>)
 
BITNOT(<expN>)
 
  
 
==See Also==
 
==See Also==
 
[[BITAND()]], [[BITCLEAR()]], [[BITLSHIFT()]], [[BITOR()]], [[BITRSHIFT()]], [[BITSET()]], [[BITTEST()]], [[BITXOR()]]
 
[[BITAND()]], [[BITCLEAR()]], [[BITLSHIFT()]], [[BITOR()]], [[BITRSHIFT()]], [[BITSET()]], [[BITTEST()]], [[BITXOR()]]
 
  
 
==Description==
 
==Description==
Line 16: Line 13:
 
BITNOT() switches each bit in turn of <expN1>.  Each 1 becomes a 0, and each 0 becomes a 1.
 
BITNOT() switches each bit in turn of <expN1>.  Each 1 becomes a 0, and each 0 becomes a 1.
  
 
+
{| class="wikitable" width="100%"
{| class="wikitable"
+
 
!<expN> bit||Result bit
 
!<expN> bit||Result bit
 
|-
 
|-
Line 25: Line 21:
 
|-
 
|-
 
|}
 
|}
 
 
  
 
==Example==
 
==Example==
Line 35: Line 29:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Bitwise Operations]]
+
[[Category:Numeric Data Functions]]
[[Category:Bitwise Operations Functions]]
+

Latest revision as of 08:45, 4 February 2013

Purpose

Function to perform bitwise NOT operation

Syntax

BITNOT(<expN>)

See Also

BITAND(), BITCLEAR(), BITLSHIFT(), BITOR(), BITRSHIFT(), BITSET(), BITTEST(), BITXOR()

Description

The BITNOT() function performs a bitwise NOT operation on the specified numeric parameter. If <expN> is not an integer, it will be converted to an integer value before the operation takes place.

BITNOT() switches each bit in turn of <expN1>. Each 1 becomes a 0, and each 0 becomes a 1.

<expN> bit Result bit
0 1
1 0

Example

x = 3			&& 00011
? bitnot(x)
        -4		&& 11100