There is a field with a size of 3 bytes. It is necessary to calculate the values from 0 bits to 9 bits, then 2 bytes from 10 to 18, and (3 bytes) from 19 to 22. Also, 23 bits are not used, and it is zero.
I can not figure out how to make a view mask
mask = 0x0(xx - с 0 по 9)000 The only thing that remains for me is to simply make a shift ( level = (value & mask) >> 8 ).