Core API Reference: Number Bit-wise

From Color Infection Wiki
Jump to: navigation, search


<< (Shift Left)

Bitwise left shift.

Input Parameters:

Number to Shift
the number or expression to be shifted left. Before shifting, it will be converted into an integer.
Shift Bits Count
how many bits to shift. This is a integer and valid value range is [0, 31].

Output Parameters:

Result
the result of the shift operation. The result is always integer.
>> (Shift Right)

Bitwise right shift.

Input Parameters:

Number to Shift
the number or expression to be shifted right. Before shifting, it will be converted into an integer.
Shift Bits Count
how many bits to shift. This is a integer and valid value range is [0, 31].

Output Parameters:

Result
the result of the shift operation. The result is always integer.
>>> (Shift Right Unsignedly)

Bitwise unsigned right shift. The difference with shift right operation is the sign of the input value is not preserved.

Input Parameters:

Number to Shift
the number or expression to be shifted right. Before shifting, it will be converted into an integer.
Shift Bits Count
how many bits to shift. This is a integer and valid value range is [0, 31].

Output Parameters:

Result
the result of the shift operation. The result is always a non-negative integer.
& (Bitwise And)

Bitwise and.

Input Parameters:

Number 1
one numer. Before the operation, it will be converted into an integer.
Number 2
another numer. Before the operation, it will be converted into an integer.

Output Parameters:

Result
the result, it is always an integer.
| (BitWise Or)

Bitwise or.

Input Parameters:

Number 1
one numer. Before the operation, it will be converted into an integer.
Number 2
another numer. Before the operation, it will be converted into an integer.

Output Parameters:

Result
the result, it is always an integer.
~ (BitWise Invert)

Bitwise Invert.

Input Parameters:

Input Number
one numer. Before the operation, it will be converted into an integer.

Output Parameters:

Result
the inverted result, it is always an integer.
^ (Bitwise Xor)

Bitwise XOR.

Input Parameters:

Number 1
one numer. Before shifting, it will be converted into an integer.
Number 2
another numer. Before shifting, it will be converted into an integer.

Output Parameters:

Result
the result, it is always an integer.