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

 3 4 5 6 7 8 1 2 6 7 8 1 2 3 4 5
 0 0 0 1 1 0 1 0 1 0 0 1 1 0 0 1
 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 1
 1 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1
 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1

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.)

 X X - - - - - - - - X - X - X X
 X - - - X - - - X - - - X X X -
 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

 D E F G H I J K M N O P Q T U V
 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1

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.

 A H O V 00001 01000 01111 10110 00010 01001 10000 10111 00011 01010 10001 11000 00100 01011 10010 11001 00101 01100 10011 11010 00110 01101 10100 00111 01110 10101

Example:

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