Bitwise shift left or right? Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Advanced Features » Bitwise shift left or right? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Douglas S. Lacey
Posted on Sunday, May 14, 2006 - 22:35:   

Is there an operator available for bitwise shifting a hexadecimal value when scripting?

I have a byte of date that requires a bitwise shift to the right by 4 bits before a bitwise AND, in order for it to be converted to a meaningful decimal number.

I didn't see anything obvious in the Scripts help document.

Thanks!
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Sunday, May 14, 2006 - 23:47:   

From the program help and manual:

Whereever numerical parameters are expected (integer numbers), the integrated formula parser allows you to use mathematical expressions. Such expressions need to be enclosed in brackets. They must not contain space characters. They may make use of variables that can be interpreted as integer numbers. Supported operations are addition (+), subtraction (-), multiplication (*), integer division (/), modular division (%), bitwise AND (&), bitwise OR (|), and bitwise XOR (^).

FYI: Bitwise shifting is multiplying or dividing by a power of 2.

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.