in reply to Re^4: Operate with bits
in thread Operate with bits
I assume that for most humans it is easier to see the "finding bit X" problem as one of dealing with strings, than as one of calculating (although, of course, the latter is much easier for the computer).
In other words:
sprintf '%b' converts to a string of bits, then I can take the 7th char from the rightis easier to understand (for most humans) than
If I have it as a number, I simply "AND" it with 26Of course, it all depends: if there are millions of lines, the inefficiency will add up and become noticeable.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Operate with bits
by AnomalousMonk (Archbishop) on Mar 12, 2020 at 10:32 UTC | |
by soonix (Canon) on Mar 12, 2020 at 10:40 UTC |
In Section
Seekers of Perl Wisdom