Re: Challenge: Mirror bits Message #12 Posted by C.Ret on 24 Dec 2008, 3:55 a.m., in response to message #11 by Egan Ford
Thank you for the information and your time.
It is always time to learn something :)
I prefer to ask for some light than staying in the darkness!
The binary operator of C was out of my tiny notions of C (and fullpart of my ignorance in Perl).
I am now able to interpret your line of code, but still not sure to understand the amazing arimetic and magic of this algorithm.
Translate into RPL the mirror operation may be translate to :
<< #00082082h * @ multiplication by a binary convert result to
@ binary whatever is first argument is real or binary
#01122408h AND
B>R 255 MOD R>R @ MOD only apply on real on my HP
SR SR
>>
'Y' STO
It's work perfectly ! But I still analysing why !
The trick is certainly based on the magic numbers :
#00082082h = # 00000000000010000010000010000010_b
#01122408h = # 00000001000100100010010000001000_b
