On the Subject of the Binary Gear CM

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

From the Mechanus Cipher module by Obvious.

Create a key using the keyword on screen 1 and the Boolean Expression on screen A. Write this alphabet key top to bottom and the initial cursor is at the letter on screen B.

Make a column of decreasing 4-bit binary numbers starting from 1111. Your initial cursor is at 0000.

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

Encrypt Instructions

  • Reverse the encrypted word. For each letter of the encrypted word, convert it into a binary string by moving both the cursors down until the cursor on the alphabet key is the Nth encrypted letter, replacing it with the 4 bit binary sequence you ended up on. Write the resulting binary top to bottom, to the left of any previous binary seuqneces. If you were already at the letter, move both cursors down until you hit it again.
  • Split the resulting binary string into 4 bits in reading order, reverse the binary sequence so that the last 4 bit binary sequence becomes the first.
  • Reverse the binary on screen 2. For each 4 bit binary sequence, move both cursors down until you hit this binary. If the Nth bit in the binary on screen 2 is a 1, move both cursors down again until you hit it again. The letter the cursor ends up on becomes your Nth decrypted letter. Reverse the string to get a decrypted word.

Decrypt Instructions

  • For each letter of the encrypted word, convert it into a binary string by moving both the cursors up until the cursor on the alphabet key is the Nth encrypted letter, replacing it with the 4 bit binary sequence you ended up on. Append the resulting binary to the overall binary string. If you were already at the letter, move both cursors up until you hit it again.
  • Split the resulting binary string into 4 rows of X bits where X is equal to the word’s length. Read the binary string, top to bottom, left to right.
  • For each 4 bit binary sequence, move up both cursors until you hit this binary. If the Nth bit in the binary on screen 2 is a 1, move both cursors up again until you hit it again. The letter the cursor ends up on becomes your Nth decrypted letter.

Example 1

Encrypted Word: VYOP
Screen 2: 1100
Screen B: B
Using Encrypt Rules

S
U
T
A
I
N
B
C
D
E
F
G
H
J
K
L
M
O
P
Q
R
V
W
X
Y
Z
1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000
1010
1101
0010
1010

P → 0100
O → 1011
Y → 0100
V → 1101

(+0)1010 → Y
(+0)0010 → B
(+1)1101 → U
(+1)1010 → R

Decrypted Word: RUBY

Example 2

Encrypted Word: BCUJOVT
Screen 2: 0111001
Screen B: D
Using Decrypt Rules

A
B
C
D
F
G
H
I
J
K
L
M
N
O
Q
S
V
W
X
Y
Z
R
E
P
U
T
1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000
0010101
1111111
1101001
0111100

B → 0010
C → 1011
U → 1111
J → 1111
O → 0100
V → 1011
T → 1100

(+0)0110 → S
(+1)0111 → U
(+1)1101 → C
(+1)0111 → C
(+0)1101 → E
(+0)0100 → S
(+1)1110 → S

Decrypted Word: SUCCESS