@name Binary Compressor
@inputs Value1 Value2 
@outputs Compressed
@persist

B1 = floor(Value1 / 2^0) % 2
B2 = floor(Value1 / 2^1) % 2
B3 = floor(Value1 / 2^2) % 2
B4 = floor(Value1 / 2^3) % 2
B5 = floor(Value1 / 2^4) % 2
B6 = floor(Value1 / 2^5) % 2
B7 = floor(Value1 / 2^6) % 2
B8 = floor(Value1 / 2^7) % 2
B9 = floor(Value1 / 2^8) % 2

B10 = floor(Value2 / 2^0) % 2
B11 = floor(Value2 / 2^1) % 2
B12 = floor(Value2 / 2^2) % 2
B13 = floor(Value2 / 2^3) % 2
B14 = floor(Value2 / 2^4) % 2
B15 = floor(Value2 / 2^5) % 2
B16 = floor(Value2 / 2^6) % 2
B17 = floor(Value2 / 2^7) % 2
B18 = floor(Value2 / 2^8) % 2

Compressed = 0
Compressed += (B1 ? 1 : 0) * 2^0
Compressed += (B2 ? 1 : 0) * 2^1
Compressed += (B3 ? 1 : 0) * 2^2
Compressed += (B4 ? 1 : 0) * 2^3
Compressed += (B5 ? 1 : 0) * 2^4
Compressed += (B6 ? 1 : 0) * 2^5
Compressed += (B7 ? 1 : 0) * 2^6
Compressed += (B8 ? 1 : 0) * 2^7
Compressed += (B9 ? 1 : 0) * 2^8
Compressed += (B10 ? 1 : 0) * 2^9
Compressed += (B11 ? 1 : 0) * 2^10
Compressed += (B12 ? 1 : 0) * 2^11
Compressed += (B13 ? 1 : 0) * 2^12
Compressed += (B14 ? 1 : 0) * 2^13
Compressed += (B15 ? 1 : 0) * 2^14
Compressed += (B16 ? 1 : 0) * 2^15
Compressed += (B17 ? 1 : 0) * 2^16
Compressed += (B18 ? 1 : 0) * 2^17