Thank you, it seems obvious now. If I had the register map below:
and I wanted to write FS_SEL=3 on register 0x16 then am I correct in saying:
FS_SEL =3 makes the line equal in binary:
00011000
which is equal to 24 in decimal, so i'd want:
writeTo(DEVICE, 0x16, 24); ?