 ## On the Subject of the Bit Switch CM

A machine that knows no bounds when it comes to ciphers.

The 2 digit numbers on screen 1 will be referred to as the input numbers and the 2 digit numbers on screen 2 will be referred to as the output numbers.

Each input number goes through a scrambler, scrambling its bits, displaying the result shown in each output number. Figure out how the scrambler works by turning each number into a 5 bit binary sequence and comparing each input number with its corresponding output number.

If the Submit Button is white, follow the instructions under Encrypt Instructions. Otherwise follow the instructions under Decrypt Instructions.

#### Encrypt Instructions

• Convert the Nth letter of the encrypted word into a number using its alphabetic position (A1Z26).
• Convert the number into a 5 digit binary sequence. If the Nth bit of the binary sequence on screen 3 is a 1, invert the bits.
• Scramble the bits in the same fashion that the scrambler did.
• Convert the resulting binary sequence back into a number, then back into a letter (A1Z26).
• Do this for each letter of the encrypted word to get a decrypted word.

#### Decrypt Instructions

• Convert the Nth letter of the encrypted word into a number using its alphabetic position (A1Z26).
• Convert the number into a 5 digit binary sequence. If the Nth bit of the binary sequence on screen 3 is a 1, invert the bits.
• Unscramble the bits, undoing the scrambler's process.
• Convert the resulting binary sequence back into a number, then back into a letter (A1Z26).
• Do this for each letter of the encrypted word to get a decrypted word.

#### Binary Table

 00 00000 16 10000 01 00001 17 10001 02 00010 18 10010 03 00011 19 10011 04 00100 20 10100 05 00101 21 10101 06 00110 22 10110 07 00111 23 10111 08 01000 24 11000 09 01001 25 11001 10 01010 26 11010 11 01011 27 11011 12 01100 28 11100 13 01101 29 11101 14 01110 30 11110 15 01111 31 11111
ABCDEFGH
0000100010000110010000101001100011101000
IJKLMNOP
0100101010010110110001101011100111110000
QRSTUVWX
1000110010100111010010101101101011111000
YZ
1100111010

#### Example 1

Encrypted Word: MBFIN
Input Numbers: 18241416
Output Numbers: 12061104
Screen 3: 00001
Using Encrypt Rules

18, 12 → 10010, 01100
24, 06 → 11000, 00110
14, 11 → 01110, 01011
16, 04 → 10000, 00100

From the 16 → 04, we can determine that the 1st bit moves to the 3rd bit. From there, the 14 → 11, we know that the 1st bit goes to the 3rd bit, so that means the 5th bit goes to the 1st bit. Keep doing this process to understand how the scrambler works: 1st → 3rd, 2nd → 4th, 3rd → 5th, 4th → 2nd, 5th → 1st: 54123

M → 13 → 01101 + 0 → 01101 + 54123 → 10011 → 19 → S
B → 02 → 00010 + 0 → 00010 + 54123 → 01000 → 08 → H
F → 06 → 00110 + 0 → 00110 + 54123 → 01001 → 09 → I
I → 09 → 01001 + 0 → 01001 + 54123 → 10010 → 18 → R
N → 14 → 01110 + 1 → 10001 + 54123 → 10100 → 20 → T

Decrypted Word: SHIRT

#### Example 2

Encrypted Word: INMGF
Input Numbers: 19102423
Output Numbers: 22050330
Screen 3: 01010
Scrambler: 53412
Using Decrypt Rules

I → 09 → 01001 + 0 → 01001 + 53412 → 01100 → 12 → L
N → 14 → 01110 + 1 → 10001 + 53412 → 01001 → 09 → I
M → 13 → 01101 + 0 → 01101 + 53412 → 01110 → 14 → N
G → 07 → 00111 + 1 → 11000 + 53412 → 00101 → 05 → E
F → 06 → 00110 + 0 → 00110 + 53412 → 10010 → 18 → R

Decrypted Word: LINER