Re: hp42s ROT XY function Message #3 Posted by John Limpert on 27 Sept 2007, 4:30 a.m., in response to message #1 by joe santavicca
What are you having trouble with? I looked it up in the manual and it does a standard rotate left or rotate right on a 36bit number. If you look at the yregister as an array of 36 bits, where index 0 is the leastsignificantbit and index 35 is the most significant bit, and the xregister contains 1, then:
t = y[0]
y[0] = y[1]
y[1] = y[2]
...
y[33] = y[34]
y[34] = y[35]
y[35] = t
That was a rotate right by one bit. You can think of it as a circular shiftregister where the mostsignificantbit is connected to the leastsignificantbit.
