On the Subject of Binary Cipher

!findclaim cipher
!unclaimall

Step 1.1: Step 2

Take the alphabet and remove any occurrences of letters in the keyword and the single letter. Find the sixth letter in this sequence. Use the matching table to the single letter.

If the 6th letter is A-L or Z, use these tables:

Table A
X X X
X X
X
Table B
X X X
X
X
X
Table C
X X
X X
X
X

If the 6th letter is M-Y, use these tables:

Table A
X
X X X
X X
Table B
X
X
X X X
X
Table C
X
X
X X
X X

Step 1.2: Step 3.1

Take the grid and remove the Nth X, where N is (Batteries % 6) + 1.

Example:

Single Letter: B
Keyword: SCRAWL
Batteries: 2
Key: DEFGHIJKMNOPQTUVXYZ
Position 6 is I.

X X
X
X
X

Step 2: Step 1

In this step, you are going to create five 4 by 4 grids. Only do cells you marked with an X in step 1.

Grid #1:

Take the battery count modulo 2. If this value is 0, fill rows 1 and 2 with 10101010, otherwise 01010101.

Take the port count modulo 2. If this value is 0, fill rows 3 and 4 with 10101010, otherwise 01010101.

Grid #2:

Take the 16-digit binary number shown on the middle screen of Page 2, fill the 4 by 4 grid with these digits, then horizontally flip the grid.

Grid #3:

Take each corresponding cell in Grids #1 and #2 in reading order. XNOR them. In other words, put a 1 if they're the same, otherwise a 0.

Grid #4:

Take the 16-digit binary number shown on the top screen of Page 1, fill the 4 by 4 grid with these digits, then horizontally flip the grid.

Grid #5:

Take each corresponding cell in Grids #3 and #4. XNOR them.

Example:

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

10
1
0
0
10
0
1
1
11
0
0
0
00
1
0
1
00
0
1
0

Step 3: Step 3.2

Take the five bits from the table in order and find them in the table. Press the corresponding letter.

A 00001 H 01000 O 01111 V 10110
B 00010 I 01001 P 10000 W 10111
C 00011 J 01010 Q 10001 X 11000
D 00100 K 01011 R 10010 Y 11001
E 00101 L 01100 S 10011 Z 11010
F 00110 M 01101 T 10100
G 00111 N 01110 U 10101

Example:

Previous Binary: 00010
Answer: B