There are three sets of data a, b, c, the value range is 0-9, 0-2, 0-5, how to use a byte (8 bits) M to express it?
Coding Scheme:
M=(a*3+b)*6+c
Decoding scheme:
c = M%6;
b = M/6%3;
a = M/6/3;
There are three sets of data a, b, c, the value range is 0-9, 0-2, 0-5, how to use a byte (8 bits) M to express it?
Coding Scheme:
M=(a*3+b)*6+c
Decoding scheme:
c = M%6;
b = M/6%3;
a = M/6/3;