Hello, I have a 1D array that contains the following:
Element 0 = MSByte of chip register (U8)
Element 1 = LSByte of chip register (U8)
What I want to do is take this 1D array convert it to numeric representation like the following:
Element 0 = 1A hex
Element 1 = 44 hex
Conversion = MSM | LSB = 1A44 hex = 6724 dec
Then I want to AND this value with another value (0248 hex):
1A44 hex ANDed with 0248 hex = 0240 hex
Then I want to take 0240 hex and split it back up into a 1D array like the following:
Element 0 = 02
Element 2 = 40
Is there an efficient way to take a 1D array, concatenate the arrays inputs, perform an AND function with another number, and then take the ANDed result and convert this value back to a 1D array with an MSByte (Element 0) and an LSByte (Element 1)?
Solved! Go to Solution.