Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Rotate Left bitwise shift

  1. #1
    Join Date
    May 2013
    Thanked 1 Time in 1 Post

    Default Rotate Left bitwise shift

    I'm trying to replicate the rol(rotate left) instruction in assembly though can only get as far as shifting the bits with '<<' or doing Long.rotateLeft(var, 5). Both of these method don't wrap around the bits as the rol instruction does.

    Any ideas on what I can do guys?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Eastern Florida
    Thanked 2,529 Times in 2,480 Posts

    Default Re: Rotate Left bitwise shift

    What's the difference between the desired results and what the Long.rotateLeft() does?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. java shift and ~ operator when to use each one?
    By tonu in forum Java Theory & Questions
    Replies: 1
    Last Post: December 27th, 2013, 12:08 PM
  2. Doesnt render in 3D with Bitwise Operator '&'
    By Edin in forum What's Wrong With My Code?
    Replies: 10
    Last Post: July 17th, 2012, 01:01 PM
  3. deleting with shift ?
    By keep smiling in forum Collections and Generics
    Replies: 4
    Last Post: February 26th, 2012, 04:05 PM
  4. confused on what this problem is asking for (bitwise operators)
    By mmholdford in forum Java Theory & Questions
    Replies: 3
    Last Post: February 9th, 2012, 06:52 AM
    By bitwise11 in forum The Cafe
    Replies: 0
    Last Post: January 25th, 2011, 01:09 PM