Well, to get n, there has to be an array. So, convert the word to an array, I would suggest splitting it into two bytes, then converting to boolean arrays, then concatenating the arrays. Then, just index your array, and reconvert back to 0/1.
Good luck