Talk:Find first and last set bit of a long integer: Difference between revisions

added comment about numbers not being stored in binary . -- ~~~~
(added comment about numbers not being stored in binary . -- ~~~~)
Line 29:
* [http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog Find the log base 2 of an N-bit integer in O(lg(N)) operations]
[[User:NevilleDNZ|NevilleDNZ]] 05:52, 8 December 2011 (UTC)
 
I was almost thinking about added a REXX solution for this problem, as REXX doesn't store it's numbers in binary on any computer, but instead, REXX stores them as characters. So the problem of finding the first and last set bits could be an exercise in finding what bits are set for the various characters (that represent the ten digits) --- and this would make it dependent whether it being ASCII or EBCDIC (or BCD for that matter) computer. The REXX program of course, could pretend that the number is stored in binary, and then return the appropiate bits as requested. This would be the equivalent of fantasy baseball. -- [[User:Gerard Schildberger|Gerard Schildberger]] 04:17, 8 May 2012 (UTC)
 
===Clarification===