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.


>> REGISTER NOW TO START POSTING


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
    Member
    Join Date
    May 2013
    Posts
    165
    Thanks
    58
    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
    Location
    Eastern Florida
    Posts
    21,089
    Thanks
    52
    Thanked 2,284 Times in 2,255 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, 11:08 AM
  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, 03: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, 05:52 AM
  5. BITWISE
    By bitwise11 in forum The Cafe
    Replies: 0
    Last Post: January 25th, 2011, 12:09 PM