On the Subject of Binary Tango

It takes 10 to tango.

This module has three large displays at the bottom containing decimal numbers. Take the numbers from the first and third display and convert them into 8-bit binary.

Then, take the number of batteries. If it's even, take the first number; otherwise, take the second one. Take its most significant bit: this will be the most significant bit for your answer.

After that, take the other number and take its second-most significant bit. Repeat this back-and-forth until you have an 8-bit binary number, which you can now convert into a decimal number.

Submit your answer using the buttons above the displays. Your answer is displayed on the second display. Your answer will always be between 0 and 255.

Once you think you're done, press the big square at the top (which is actually a pixel). If you're wrong, a strike will occur.

On the second stage, you can notice something : letters may have appeared! That's because the displays now show the numbers in hexadecimal. Do the same thing as last time, but use the number of indicators instead in order to find which number you'll use first.

On the third stage, the displays will now show numbers in octal. This time, use the number of port plates instead of the number of indicators. After that, the module will finally be solved.

Example: With the numbers 241 (11110001) and 97 (01100001), your answer will be 11100001, or 225.

Appendix BA5ED: Conversion in base 2, 10, 16 and 8

Binary (base 2) Decimal (base 10) Hexadecimal (base 16) Octal (base 8)
0000 0 0 0
0001 1 1 1
0010 2 2 2
0011 3 3 3
0100 4 4 4
0101 5 5 5
0110 6 6 6
0111 7 7 7
1000 8 8 10
1001 9 9 11
1010 10 A 12
1011 11 B 13
1100 12 C 14
1101 13 D 15
1110 14 E 16
1111 15 F 17