Forum Discussion
Converting Hex to Binary function to detect on/off state
Hi Alisina,
It seems that you want to convert HEX to Binary, right? There is no direct function to achieve this goal. You might need to convert this to number, then convert this to Binary. You could refer to convert from hexadecimal value to number and Number to Binary for details.
In addition, if you want to format it, you could use my below expression
Column =
IF (
14 - LEN ( hex[c1] ) = 14,
hex[c1],
REPLACE (
hex[c1],
1,
2,
MID (
"0x000000000000",
1,
14
- LEN ( MID ( hex[c1], 3, LEN ( hex[c1] ) - 1 ) )
)
)
)Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for trying :)
I was hoping for a way to convert to binary and be able to say binary number 5 from 0000 1001 0000 .... has 1 meaning it is on (counting from left). Binary number 8 is also active etc...
So I can point to the data at hand without having to split it etc.