- Advanced
- About 16 min
- 5 practice questions
Layered codes: substitution with interchanges, and reverse decoding
Handle questions that combine a sign code with a number interchange, find which interchange repairs an equation, and work out an unknown code from solved examples.
If something looks wrong, please tell us.
Advanced mathematical operations questions rarely test one idea at a time. A sign code is combined with an interchange of two numbers; or the code is hidden and you must recover it from equations that are already solved; or you are asked which swap repairs a wrong equation. Each layer is simple on its own. The skill is to keep the layers apart so that one change never contaminates another.
Principle: one layer per line
Sign changes and number changes are independent: a sign code never moves a number, and a number swap never changes a sign. So you may apply them in either order, but you must apply each one completely, on its own line, before calculating. Mixing them in a single pass is the main source of errors.
Worked example 1: a code plus a number swap
Code: + means ×, × means −, − means ÷ and ÷ means +. Also, the numbers 4 and 8 are interchanged. Find 8 + 6 × 4 − 2 ÷ 3.
- Number swap: 4 + 6 × 8 − 2 ÷ 3.
- Sign code: 4 × 6 − 8 ÷ 2 + 3.
- BODMAS: 24 − 4 + 3 = 23.
Reverse decoding: recovering a hidden code
Sometimes the letters stand for unknown operations and you are given equations that are already correct, for example 6 A 3 B 2 = 20 and 8 A 2 B 3 = 19, where A and B are two different signs. You must find what A and B stand for. There are only twelve ordered pairs of two different signs, but trying all twelve is slow. Use sizes and parity to cut them down.
Worked example 2
In 6 A 3 B 2 = 20, the result 20 is bigger than 6 + 3 + 2 = 11, so a × must be involved. If B were ×, then 3 × 2 = 6 and 6 A 6 = 20 is impossible with any sign. So A is ×: 6 × 3 = 18, and 18 B 2 = 20 makes B = +. Confirm with the second equation: 8 × 2 + 3 = 16 + 3 = 19. Correct. Now any new coded expression can be decoded, for example 7 A 5 B 4 = 7 × 5 + 4 = 39.
Always confirm with every given equation. A pair that fits one equation may fail another; only the pair that fits all of them is the code.
Repairing an equation by a swap
When asked which two signs must be interchanged, first estimate the left side as written and compare with the right side. That tells you whether the repair must make the value much smaller or larger, which points to the swap worth trying first.
Worked example 3
Which two signs must be interchanged to make 4 ÷ 6 × 12 − 4 + 16 = 14 correct? As written, 4 ÷ 6 × 12 = 8, so the left side is 8 − 4 + 16 = 20, a little too large. The first term needs to shrink, which suggests swapping × and ÷: 4 × 6 ÷ 12 − 4 + 16 = 2 − 4 + 16 = 14. Correct. For safety, note that swapping + and − instead gives 8 + 4 − 16 = −4, and the other swaps do not balance either.
Keep the layers apart: swap numbers on one line, decode signs on the next, calculate on the third. For a hidden code, use size to guess and every given equation to confirm.
Key takeaways
- Sign codes and number swaps are independent; apply each completely before calculating.
- A number swap touches only whole numbers equal to those named; 48 is not changed by swapping 4 and 8.
- For a hidden code, the size of the result usually reveals where × or ÷ sits.
- A candidate code must satisfy every solved example, not just the first.
Check your understanding
-
1. If + means −, − means ×, × means ÷ and ÷ means +, and the numbers 3 and 9 are interchanged, what is the value of 9 − 4 + 18 × 3 ÷ 5?
- 19
- 11
- 15
- 27
Show answer
Answer: C. Swap the numbers: 3 − 4 + 18 × 9 ÷ 5. Decode the signs: 3 × 4 − 18 ÷ 9 + 5. Then 12 − 2 + 5 = 15.
-
2. A and B stand for two different signs, and 5 A 4 B 2 = 18 and 9 A 2 B 3 = 15 are both correct. What is the value of 7 A 6 B 5?
- 47
- 37
- 35
- 8
Show answer
Answer: B. The results are larger than the plain sums, so × is involved. A = × and B = − fits both: 5 × 4 − 2 = 18 and 9 × 2 − 3 = 15. So 7 A 6 B 5 = 7 × 6 − 5 = 42 − 5 = 37.
-
3. Which two signs must be interchanged to make 24 × 16 − 3 ÷ 3 + 24 = 16 correct?
- − and ×
- + and −
- + and ×
- × and ÷
Show answer
Answer: C. Swap + and ×: 24 + 16 − 3 ÷ 3 × 24 = 40 − 1 × 24 = 40 − 24 = 16. Correct. As written the left side is 384 − 1 + 24 = 407, far too big, so the × had to go. Swapping − and × gives 32, + and − gives 361, and × and ÷ gives 16.5.
-
4. If × and ÷ are interchanged and the numbers 2 and 6 are interchanged, which equation is correct?
- 2 ÷ 4 × 6 + 3 = 15
- 6 × 3 ÷ 2 − 1 = 8
- 12 ÷ 2 × 3 + 6 = 20
- 18 × 6 ÷ 3 + 2 = 9
Show answer
Answer: A. Apply both swaps to each left side: 2 ÷ 3 × 6 − 1 = 4 − 1 = 3, not 8; 12 × 6 ÷ 3 + 2 = 24 + 2 = 26, not 20; 18 ÷ 2 × 3 + 6 = 27 + 6 = 33, not 9; 6 × 4 ÷ 2 + 3 = 12 + 3 = 15, correct.
-
5. A and B stand for two different signs, and 12 A 3 B 2 = 6 and 20 A 5 B 3 = 7 are both correct. What do A and B stand for?
- A is × and B is −
- A is ÷ and B is +
- A is − and B is ÷
- A is ÷ and B is −
Show answer
Answer: B. The results are small compared with the first numbers, so ÷ is likely. With A = ÷ and B = +: 12 ÷ 3 + 2 = 4 + 2 = 6 and 20 ÷ 5 + 3 = 4 + 3 = 7, both correct. The others fail the first equation: 36 − 2 = 34; 12 − 1.5 = 10.5; 4 − 2 = 2.
Sign in to keep track of the lessons you finish.