#define READ_VALUE(n, p, i) ((n) >> (p)) & ((1 <<(i)) - 1)
The above macro return the byes of specified position