Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    how do you do multi-word shifts and rotates?

    for example, a theoretical machine that operates on 8-bit bytes (aka an 8-bit machine). say that 8-bit rotate and 8-bit shift have been implemented in hardware.
    and that you can do an arbitrary number of shifts or rotates (0-7) on the 8-bit byte in one instruction/cycle.

    this machine would be a theoretical stack machine as well, so things would be pushed onto the stack with the return value on top of the stack.

    so are there any algorithms (in software, using instructions like those i mentioned) to rotate or shift thru an arbitrary number of bytes?

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    An algorithm? To multiply or divide by two? That's not much of an algorithm...
    Linux user #126863 - see

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts