http://www.divms.uiowa.edu/~jones/bcd/bcd.html
I am not quite sure how to (mathematically) prove that some of them work, though. But I can still play with them.
Here is my own contribution (untested):
- Code: Select all
half(a)
t1 = a >> 1
t2 = t1 & 0x08888888
t3 = (t2 >> 2) | (t2 >> 3)
return t1 - t3


