TheWaterboy
Lifetime Supporting Member + Moderator
I have to take a 16 bit N register and split some of the bits into separate integers. example:
Bits 0-1 = integer with a value from 0-3
Bit 2 is a bool = easy one
Bits 3-12 = another integer value from 0-1023
remainder are bools
How do I split a word in this way? Is Mask and shift the only way?
Bits 0-1 = integer with a value from 0-3
Bit 2 is a bool = easy one
Bits 3-12 = another integer value from 0-1023
remainder are bools
How do I split a word in this way? Is Mask and shift the only way?