When I enter X in a program it produces 5 bytes which I have named Y0-Y4
X = Y4,Y3, Y2, Y1,Y0
------------------------------
1 = 0, 0, 128, 63, 0
------------------------------
2 = 0, 0, 0, 64, 0
3 = 0, 0, 64, 64, 0
------------------------------
4 = 0, 0, 128, 64, 0
5 = 0, 0, 160, 64, 0
6 = 0, 0, 192, 64, 0
7 = 0, 0, 224, 64, 0
------------------------------
8 = 0, 0, 0, 65, 0
9 = 0, 0, 16, 65, 0
10 = 0, 0, 32, 65, 0
...
14 = 0, 0, 96, 65, 0
15 = 0, 0, 112, 65, 0
------------------------------
16 = 0, 0, 128, 65, 0
17 = 0, 0, 136, 65, 0
18 = 0, 0, 144, 65, 0
...
30 = 0, 0, 240, 65, 0
31 = 0, 0, 248, 65, 0
------------------------------
32 = 0, 0, 0, 66, 0
33 = 0, 0, 4, 66, 0
...
63 = 0, 0, 124, 66, 0
------------------------------
64 = 0, 0, 128, 66, 0
65 = 0, 0, 130, 66, 0
66 = 0, 0, 132, 66, 0
67 = 0, 0, 134, 66, 0
...
127 = 0, 0, 254, 66, 0
------------------------------
128 = 0, 0, 0, 67, 0
129 = 0, 0, 1, 67, 0
130 = 0, 0, 2, 67, 0
...
255 = 0, 0, 127, 67, 0
------------------------------
256 = 0, 0, 128, 67, 0
257 = 0, 128,128, 67, 0
Is there a particular formula for this pattern? Values in the byte array do not pass 256. I am looking for a way to validate the values and get X.
Aucun commentaire:
Enregistrer un commentaire