I know about the existance of the Split Number function. But my problem is a little different.
Let's say I have a 12 bits byte. It is something like this: 0000-1111-1111-1111 or 0FFF.
When i use the Split Number, I get 0F and FF.
But I'm intending to have something like this: 0011-1111 + 0011-1111.
I mean, I want to break my 12bits number into a 6+6bits, not into a 4+8.
What tools should I use to have this result?
Solved! Go to Solution.
1. AND with 2^12-1 (12 1's) so that you know you are keeping lowest 12 bits (if you want)
2. AND with 2^6-1 to return the lowest 6 bits
3. Right-Shift 6 bits to return the upper 6 bits
Or use Integer quotient and remainder.
Divide by 2^6, quotient is upper, remainder is lower
Just a bit if bit manipulation