On the Subject of ReGret-B Filtering

Take a break... wait no don’t- ...and the time ran out again.

The module displays three screens, thirteen timer LEDs, sixteen hexadecimally labeled buttons, two buttons to cycle through the three stages, and three LEDs for checking the answer.

The top display shows a starting hex code. The second display shows the calculation for that stage. Calculate the answer to this and use it for the next stage. Once you finish the third calculation, enter the calculated hex code. The module submits after inputting 6 hexadecimal characters.

However there is a timer. Whenever the timer runs out, the first stage will automatically be calculated and the top display will show this calculation. All stages cycle to the left, removing the first stage and a new stage will be appended.

Upon submitting the answer, the LEDs will turn on one by one. If they are bright, that means a channel was correct. If they are not bright, a channel was incorrect. The module first shows how many were correct, so which channels were correct cannot be determined by examining the LEDs. Upon a strike, the status light changes colour to the hex code expected and resets the entire module, but will remain on the same page.

For an explanation of the calculations used, see the descriptions below. X is initially the value on the top display, and in later stages the previously calculated hex code. Y is the value given on the middle screen for the calculation.

Additive average (+)

Split the hexadecimal codes of X and Y in pairs, and add the first of three values of X to the first of three values of Y. Divide this by two and round down. Repeat for the other numbers. Concatenate these pairs together again in order to get your new hex code.

Multiplicative average (×)

Split the hexadecimal codes of X and Y in pairs, and multiply the first of three values of X by the first of three values of Y. Take the square root of this and round down. Repeat for the other numbers. Concatenate these pairs together again in order to get your new hex code.

Inverse average (÷)

Split the hexadecimal codes of X and Y in pairs, and add the inverses of the first items of X and Y together. Take the inverse of this total, double it and round down. Repeat for the other numbers. Concatenate these pairs together again in order to get your new hex code.

Bitwise OR (∨)

Convert X and Y both to binary. Compare each bit of both X and Y and return 1 if either or both of them is 1, otherwise return 0. Convert this back to hexadecimal to get your new hex code.

Bitwise AND (∧)

Convert X and Y both to binary. Compare each bit of both X and Y and return 1 only if both of them are 1, otherwise return 0. Convert this back to hexadecimal to get your new hex code.

Bitwise XOR (⊻)

Convert X and Y both to binary. Compare each bit of both X and Y and return 1 if only one of them is 1, otherwise return 0. Convert this back to hexadecimal to get your new hex code.

Hex to binary conversion lookup table

HexBinaryHexBinaryHexBinaryHexBinary
000004010081000C1100
100015010191001D1101
2001060110A1010E1110
3001170111B1011F1111