09-01-2009 06:55 AM - edited 09-01-2009 06:57 AM
What i want to do sounds simply so far but i can't find out a solution which can be that simple...
I have an array of byte for example : 1101 1010 and I'd like to invert it like this : 0101 1011
I did not find the VI to do this. I think it's not a Big/Little -endian issue. I have an idea about converting the byte in string and use the string revert VI. Then get back to byte but it's not optimised.
Have you got ideas ?
Thanks for the help !
Solved! Go to Solution.
09-01-2009 07:01 AM - edited 09-01-2009 07:01 AM
It looks like you have an array of bits, however the easiest is to get a numeric representation of the byte (an U8) and use the boolean invert function.
Ton
09-01-2009 07:09 AM
You propably want to XOR it with a bit-mask.
Felix
09-01-2009 07:33 AM
xela75,
It sounds like you want to reverse the bit order of a U8? If so, try this.
09-01-2009 07:43 AM
Wayne.C,
It's weird that there is not a VI which does it...But your solution is interesting.
09-01-2009 07:56 AM - edited 09-01-2009 07:56 AM
Your solution is a good one !
Thank everybody for the help !
09-01-2009 02:12 PM
Just for fun: (the hex constants are U64)