Thanks rizzo & soonix. Actually substr((sprintf "%b", $address), -7, 1) is serving my need as we are starting from right side of the bit stream (LSB) and starting to count from bit 0 to bit 5, so total of six bits and keeping -7 in the substr func as index makes us catch the 6th bit from the bit stream. Thanks again for the help guys
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 right
is easier to understand (for most humans) than
If I have it as a number, I simply "AND" it with 26
Of course, it all depends: if there are millions of lines, the inefficiency will add up and become noticeable.