bitwise operations

Posted on 2004-11-15
Last Modified: 2010-03-31

I'm not very good at bitwise operations. I asked a question and a few guys helped me on it but I suspect they may be asleep right now because it was midnight EST when I asked my original question and got the answers.

If anyone could look at the question and put in their 2 cents it would be very helpful for me. Thanks!
Question by:ycomp
    LVL 13

    Accepted Solution

    here we go:

          protected static int getKeyRow(long aKey) {
            return (int) (aKey >> 32);
          protected static int getKeyCol(long aKey) {
            return (int) aKey ;

    Author Comment

    cool thanks! it works :)
    LVL 13

    Expert Comment

    welcome :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    794 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

    17 Experts available now in Live!

    Get 1:1 Help Now