| makeresults format=csv data="bit1,bit2
0000,0002
000f,0088
00af,00de
00bd,003c"
| fields bit1 bit2
| eval bit1ASnumber=tonumber(bit1,16), bit2ASnumber=tonumber(bit2,16)
| eval bit1ASbinary=tostring(bit1ASnumber,"binary"), bit2ASbinary=tostring(bit2ASnumber,"binary")
| table bit1 bit2 bit*ASnum* bit*ASbin* bit1 bit2 bit1ASnumber bit2ASnumber bit1ASbinary bit2ASbinary 0000 0002 0 2 0 10 000f 0088 15 136 1111 10001000 00af 00de 175 222 10101111 11011110 00bd 003c 189 60 10111101 111100 Ok I can get you as far as converting to binary but the results of the binary do not include leading 0's to always make an 8 character string/number. Since your example had 4 characters for the hex code those values are treated as string so first convert to a number before converting to binary as attempting to go straight will fail when your source as a mix of alphanumeric characters. Obviously without the leading zeros when you concatenate the two values as strings you will lose some positions you need to count. Also I didn't bother with sorting out the count how many zero's right of the last occurring 1 but essentially that's what comes after inserting your leading zero's
... View more