4 Replies Latest reply: Oct 9, 2012 7:17 AM by Upendra Rajeshirke

# Bitwise Operators in Scripts?

This may be very basic, but I can't seem to find bitwise operators in Scripts.

My input includes an integer that is a collection of set bits. I wish to do bitwise operations on this integer to pick out specific bits that are set.

How can I do this?

• ###### Re: Bitwise Operators in Scripts?

Hi,

This is what help says:

"

# Bit Operators

All bit operators convert the operands to signed integers (32 bit) and return the result in the same way. All operations are performed bit by bit.

 bitnot Bit inverse. Unary operator. The operation returns the logical inverse of the operand performed bit by bit. bitand Bit and. The operation returns the logical AND of the operands performed bit by bit. bitor Bit or. The operation returns the logical OR of the operands performed bit by bit. bitxor Bit exclusive or. The operation returns the logical exclusive or of the operands performed bit by bit. >> Bit right shift. Unary operator. The operation returns the operand shifted one step to the right. << Bit left shift. Unary operator. The operation returns the operand shifted one step to the left.

"

Does this help?

Regards,  tresesco

• ###### Re: Bitwise Operators in Scripts?

Hi Tresesco,

Can you give any example, this would really help me...

Thank & Regards,

Upendra