The Graycode function transforms the number x (with 0≤x<26-1) into the graycode. For standardization reasons we use the function description from Maslovs et. al benchmark page.