﻿ Math 'em — Keep Talking and Nobody Explodes Module ## On the Subject of Math 'em

Don't lose your brain in the shuffle.

On this module is a board with 16 tiles arranged into four rows.
Each tile can be one of four colours: White, Bronze, Silver, and Gold and one of three types: Constant, Variable, and Operator.

• Substitute in the values of each variable and read the tiles from left to right, top to bottom, to form a mathematical equation.
• Concatenate the digits of the tiles between each pair of operators to form a sequence of numbers.
• Sequentially apply each operator to each pair of numbers in reading order, taking the output of the previous operation as an input of the next, until left with a single number.
• If two or more operator tiles appear consecutively, the first and last of them form a Combined Operator.
• If the first tile is an operator, apply it to the first and last numbers of the sequence.
• If the last tile is an operator, apply it to the result of the previous operation and the first number of the sequence.
• Enter the output of the last operator into the keypad and submit it.
• Pressing the back key will remove the last entered digit.
• If the final value exceeds 99999999, enter only its last eight digits.

If the submission is correct, the hatch will open, revealing a button. Pressing this button will flip over the tiles and shuffle them five times. Each shuffle is one of the following:

• Swapping two rows/columns of tiles.
• Shifting a row/column one space.
• Cycling four tiles at the corners of a rectangle.

Once all five shuffles are complete, repeat the steps above, this time with the shuffled grid of tiles.

• Variables that are dependent on the position of tiles on the board are updated according to their new arrangement.
• Variables that are dependent on time are updated according to the time that the last shuffle was completed.

If an incorrect value is submitted at this stage, the board will reset and a new sequence of shuffles will begin once the button is pressed.

### Constants     01234     56789

### Variables

The value of any variable must lie in the range 0-9, take the last digit of any value greater than or equal to ten. The number of other tiles of the same colour. If there are no constants of the same colour, the value is 0.Otherwise, it has the same value as the first constant of the same colour to appear after it in reading order, wrapping around to the first tile if necessary. If the tile belongs to the section of the board according to its colour, its value is the first numeric digit of the serial number, otherwise its value is the last digit of the serial number: White- Top half Bronze- Odd row Silver- Left half Gold- Odd column The position of the tile in reading order. The colour determines the reading direction: White- Left to right, top to bottom. Bronze- Top to bottom, right to left. Silver- Left to right, bottom to top. Gold- Bottom to top, left to right. The sum of the orthogonally adjacent constants, wrapping around the edges of the board. The sum of the constants in a column of the board given by its colour: White- First column. Bronze- Second column. Silver- Third column. Gold- Fourth column. The time of activation, the unit of time is given by its colour: White- The number of minutes remaining on the bomb timer. Bronze- The minute of the hour. Silver- The hour of the day. (24h) Gold- The day of the month. Edgework: White- The number of batteries. Bronze- The number of ports. Silver- The number of indicators. Gold- The number of indicator label consonants. The sum of the constants that do not share this tile's row, column, or colour. The sum of the constants that are smaller than the largest numeric serial number digit.

### Operators The sum of the inputs. The difference between the inputs. The larger of the two inputs modulo the smaller. Convert both inputs into binary.Perform a XOR operation on each bit of the two inputs.Convert the result into decimal.

### Combined Operators  Twice the square root of the sum of the squares of the inputs. Take D to be the difference between the two inputs.Take the square root of the difference between the square of the smaller input and the square of D. The sum of the squares of the numbers of digits in the inputs. Convert both inputs into binary.Perform an OR operation on each bit of the two inputs.Convert the result into decimal. Convert both inputs into binary.Take the product of the number of ones in each of the binary strings.  Convert both inputs into balanced ternary.Take the product of each digit of the two inputs.Convert the result into decimal and take its absolute value. The harmonic mean of the two inputs. Take R to be the larger of the two inputs modulo the smaller.Take the smaller input modulo R. Convert both inputs into binary.Perform an AND operation on each bit of the two inputs.Convert the result into decimal. Convert both inputs into binary.Perform a XOR operation on each bit of the two inputs.Apply Rule 30, with wrapping, to the resulting string of bits, taking 1 and 0 to be the respective on/off states of the cells.Convert the result into decimal.

Note: -Round down any non-integer outputs.
-If a division operator is applied to zero, the result is zero.