How to do bitwise operations in vbscript or javascript?

Posted on 2008-11-07
Last Modified: 2012-05-05
I need to do hexadecimal operation(addition, Rotate left, Xor) and binary operations. How to do in VBScript or Javascript? Please help
Hex Code1= 0136

Hex Code2= ABCD

I need to get Result =R= 01 + CD 

Then rotate it 4 times

R= rotate(4,R)

Then I need to do Xor 

S= R  Xor  AB

Convert S to Binary

Open in new window

Question by:prachi22in
    LVL 41

    Expert Comment

    This looks an awful lot like homework...

    What have you done so far?

    Here is a reference to a very useful page about mathematical operations
    using Javascript:

    Author Comment

    No...this is not a homework. I need to build an algorithm which handles bitwise operations. The site is in ASP. I am not sure how to do these operations. Please help.
    LVL 84

    Accepted Solution

    LVL 41

    Expert Comment

    ozo - good link!  Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now