On the Subject of Binary Cipher

!bomb time. How do I use it?

On this module, you will see three screens, a keyboard, two small square buttons, and a screen that displays the current page you’re on.

Pressing the right square button will take you to the next page. Pressing the left square button will take you to the previous page. There are two pages.

The top screen on the first page will show a 16-digit binary number.

The middle screen on the first page will show a keyword.

The top screen on the second will show a single letter.

The bottom screen on the second page will show another 16-digit binary number.

Follow the steps below to determine what to submit:

Step 1: Axial Symmetry Transposition

In this step, you are going to create five 4 by 4 grids.

Grid #1:

Take the battery count, modulo 8, plus 1. Fill the first and second rows with the numbers 1 through 8, with the calculated value at the first position, and continuing in reading order.

Take the port count, modulo 8, plus 1. Fill the third and fourth rows with the numbers 1 through 8, with the calculated value at the first position, and continuing in reading order.

Grid #2:

Take the 16-digit binary number shown on the bottom screen of the second page, and fill the 4 by 4 grid with these digits.

Grid #3:

Take each cell in Grid #1 in reading order, and compare it to the cell horizontally opposite it in Grid #2. If the numbers are both even or both odd, place a 1 in the cell in Grid #3. Otherwise, place a 0.

Grid #4:

Take the 16-digit binary number shown on the top screen of the first page, and fill the 4 by 4 grid with these digits.

Grid #5:

Take each cell in Grid #3 in reading order, and compare it to the cell horizontally opposite it in Grid #4. If the numbers are both even or both odd, place a 1 in the cell in Grid #5. Otherwise, place a 0.

Example:

Battery count: 2
Port count: 5
Page 1, top screen: 1100110100001001
Page 2, bottom screen: 0001101010011001

3456
7812
6781
2345
0001
1010
1001
1001
1101
0000
0011
0011
1100
1101
0000
1001
0001
0100
1100
0101

Step 2: Alphabet Transposition

First, take the keyword at the middle screen of the first page. Then, prepend the alphabet to the keyword and remove all duplicate letters, retaining first occurrences. Lastly, remove the letter shown at the top screen of the second page from the string, resulting in a string of 25 letters. Fill the first 16 letters of the string into a 4 by 4 matrix.

Then, identify which of the three tables to use below, based on the single letter removed from the initial 26-letter string. (This will always be one of A, B, or C.)

Table A
XX--
----
--X-
X-XX
Table B
X---
X---
X---
XXX-
Table C
X--X
-X--
--X-
X--X

Next, shift the X marks in the table up or down one row (wrapping around) based on the letter found at position 6 in the previously made 4 by 4 matrix.

A B C D E F G H I J K L Z Move the X marks down one row.
N O P Q R S T U V W X Y M Move the X marks up one row.

Lastly, take all the positions of the X marks in reading order and take the binary digits of their positions from Grid #5. This should result in a 6-digit binary number, known as the “retrieved binary.”

Example:

Page 2, top screen letter: B
Keyword: SCRAWL
Key: DEFGHIJKMNOPQTUVXYZSCRAWL

DEFG
HIJK
MNOP
QTUV
0001
0100
1100
0101

Position 6 is I. Move the X marks down one row.

Table B,
before shift
X---
X---
X---
XXX-
Table B
after shift
XXX-
X---
X---
X---

Retrieved binary: 000010

Step 3: ASCII Translation

At this point, you will get a 6-digit binary number, where one of them must be deleted. Take the battery count, modulo 6, plus 1, and delete the number at that position in the string. Find this new 5-digit binary number in the table below to get a single letter.

A00001H01000O01111V10110
B00010I01001P10000W10111
C00011J01010Q10001X11000
D00100K01011R10010Y11001
E00101L01100S10011Z11010
F00110M01101T10100
G00111N01110U10101

Example:

Retrieved binary: 000010
Battery count: 2
Retrieved binary, after removing digit 3: 00010
Answer: B

Lastly, press that letter to solve the module!