Repeat operation on HP50g - Hewlett Packard

This is a discussion on Repeat operation on HP50g - Hewlett Packard ; Hi all, Let's say I have the following on the stack: #FF13h I can use RL to rotate this 1 bit to the left. But what if I want to rotate it 5 bits of 7 bits? Is there a ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Repeat operation on HP50g

  1. Repeat operation on HP50g

    Hi all,

    Let's say I have the following on the stack:

    #FF13h

    I can use RL to rotate this 1 bit to the left. But what if I want to
    rotate it 5 bits of 7 bits? Is there a small RPL program or better way
    to repeat the operation n times?

    Thanks,

    Titus

  2. Re: Repeat operation on HP50g

    On Sep 30, 5:18*pm, Titus Barik wrote:
    > Hi all,
    >
    > Let's say I have the following on the stack:
    >
    > #FF13h
    >
    > I can use RL to rotate this 1 bit to the left. But what if I want to
    > rotate it 5 bits of 7 bits? Is there a small RPL program or better way
    > to repeat the operation n times?
    >
    > Thanks,
    >
    > Titus


    You can use the FOR loop in a program:

    \<< 1 n FOR I RL NEXT \>>

    will perform the RL function n times.

    S.C.

  3. Re: Repeat operation on HP50g

    On Sep 30, 6:20*pm, sc_use...@hotmail.com wrote:
    > You can use the FOR loop in a program:
    >
    > \<< 1 n FOR I RL NEXT \>>
    >
    > will perform the RL function n times.
    >
    > S.C.


    Here 'I' is the counting variable, 1 is the start value, n is the end
    value (replace n with the integer of your choice when using the loop),
    and the counting step is assumed to be 1.

    Chapter 21 of the User's Guide (the large PDF file, not the tiny
    printed booklet that comes with the calculator) has more information
    about UserRPL programming.

    S.C.

+ Reply to Thread