inline readBit(char input, int position){ static char BITLUT[]={1,2,4,8,16,32,64,128}; return BITLUT[position]&input; }