Patent ID: 6889235

Claim:
A method for quantifying a number of identical consecutive digits starting from a fixed position within a string of n digits, comprising: converting the string of n digits into a thermometer code, wherein the thermometer code uses m bits to represent a string of m identical consecutive digits within the string of n digits; wherein converting the string of digits into the thermometer code involves passing the string of digits through â”Œlog m nâ” layers of m-input AND gates, wherein for the case where m=2 a first layer of AND gates produces thermometer codes for sub-strings of length two, and wherein each consecutive layer produces thermometer codes for sub-strings of length k+1 to 2k by ANDing together thermometer codes for sub-strings of length 1 to k from preceding layers; converting the thermometer code into a one-hot code in which only one bit has a logical one value; and converting the one-hot code into a logarithmic code representing the number of identical consecutive digits.