16
Technical support / Re: Test Bit for greater than or Less than
« on: January 14, 2020, 01:59:32 PM »
Gary I figured it all out. It was driving me crazy until I actually did the math one step at a time.
I had totally missed the fact that if you subtract 1 in the value in N you get all 1's below the value of N
Then when you do an & of FF with L you only get a 1 if the bits match so the less than works
Next it took a while but I realized that when you do the Exclusive or it changes all the bits above either L or N into 1's
Then any bit greater than L produces a 1 when you do a & with Calls & H so the greater than so the greater than works.
Your a genius for figuring this out with such a small amount of code.
As usual thanks for your expert help
I had totally missed the fact that if you subtract 1 in the value in N you get all 1's below the value of N
Then when you do an & of FF with L you only get a 1 if the bits match so the less than works
Next it took a while but I realized that when you do the Exclusive or it changes all the bits above either L or N into 1's
Then any bit greater than L produces a 1 when you do a & with Calls & H so the greater than so the greater than works.
Your a genius for figuring this out with such a small amount of code.
As usual thanks for your expert help