hello
i was trying to find a way to encode 3 values of a range of 0-15 0-15 0-15 into 2 bytes maximum data.
something like encoding bits into bytes or hex characters .
as a byte is got 00000000 and a range of 0-15 can be express in bynary like
0000-1111 i want to put to of this pieces into a byte and and the other piece into other so to have maximum of 2 bytes for expressing 0-15 0-15 0-15 then decode it. I can only send a maximum of 2 bytes to some hardware but need to send this 3 values so i,m trying to find how to do this bitmasking trick.
i saw some nice plugs related https://github.com/jens-a-e/V4BitwiseOperators/blob/master/BitOperators.csproj
could you give me some hints ideas for it ?
BitsIntoByteHex.zip (19.0 kB)