The above full string is a combined form of two different strings named string-1 and string-2. Both strings has equal length of 32 characters. There is two other parameters interval and size. string-1 is broken into pieces of length = interval and string-2 is broken into pieces of length = size to form the full string. once all the pieces of string -2 is put in full string, pieces of string-1 is padded to the full string.
possible values for size variable are : 2, 4, 8, 16
possible values for interval variable are : any value from 1 to value of size variable
My requirement is to write a mathematical equation fetch index(in full string) of nth number of character of string-1 without separating the full string into its 2 original strings.
for e.g. In above full string, if I want to fetch 5th character of string-1 it will be '2' whose index in full string is 12. and for 6th character which is '1' has the index 15.
P.S. index of the character is counted from 0 to index, and the nth character is counted from 1 to n