am I wrong or would right shifting the reading 4 give the same answer without all the math
x var byte
reading var word
x= reading>>4