7 (MSB) | 6 | 5 | 4 | 3 | 2 | 1 | 0 (LSB) |
langcode | copyrightb | origbs | dialnorm |
1 or 0 | 1 or 0 | 1 or 0 | 0-31 (0 represents 31) |
Sorry for the probably basic question. How would I extract the 4 fields values above using the mask feature? I'm using a hex mask successfully in another part of the file, but that is a simple mask on the whole byte value not at the bit level. From what I understand, if I took e.g. 'origbs' as an example, it will have a true/false value of 1/0. The byte has a value of 0x60 so...
origbs (Bit 5):
Mask: 0x20 (which is 00100000 in binary)
Extraction: (0x60 & 0x20) >> 5
Result: (0x60 & 0x20) >> 5 = (01100000 & 00100000) >> 5 = 00100000 >> 5 = 0x1 (or 1 in decimal)
Is this possible please and if so how do I set it up? Thank you.