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

(added comment about numbers not being stored in binary . -- ~~~~)
Line 31:
 
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)
 
Except, this task is asking for the first and last set bit of the integer, not of the characters which you use to represent that integer. But that's just the title, and I agree that the task itself is not very clear about the relevance of the representation. Integers represented using floating point notation have a similar issue here. Ultimately, the task is not asking for the bits -- that part is trivial -- what the task is asking for is where these bits would be placed in the integer. And the task is also foggy about "integers" -- integers can be negative... --[[User:Rdm|Rdm]] 13:01, 8 May 2012 (UTC)
 
===Clarification===
6,951

edits