Peasant Multiplication: Interactive Visualization of an Ancient Algorithm

Peasant Multiplication: Interactive Visualization of an Ancient Algorithm
Loading the math board and drawing, please wait…
2017-01-17 14:09
① This GeoGebra example interactively demonstrates the complete calculation process of 'peasant multiplication' (also known as Russian or Egyptian multiplication), turning the abstract binary decomposition and accumulation operations into a visual table and step-by-step display. ② Core mathematical concepts include integer multiplication, binary decomposition (repeatedly dividing the multiplier by 2 and recording remainders), parity checking, cumulative summation, and the underlying principle that any integer can be expressed as a sum of powers of 2. ③ Construction highlights: using GeoGebra commands such as Textfield (input boxes for two integers a and b), Mod (to check parity), CountIf and Sequence (to generate iterative sequences), TableText (to build the step table), and the crossout object to mark eliminated rows; the ANSWER object outputs the final product. The construction involves multiple point and text objects (A1-A14, B1-B14) and auxiliary objects (C1-D3) to create a fully interactive algorithmic demonstration. ④ Suitable for upper elementary to middle school students learning multiplication principles and algorithmic thinking, as well as for mathematics history lessons or introductory programming, helping to understand binary representation and algorithm optimization.

GeoGebra Commands & Parameters

  1. Textfield(a) → InputBox1
  2. Textfield(b) → InputBox2
  3. Mod(round(abs(a)), 10000) → A1
  4. Mod(round(abs(b)), 10000) → B1
  5. CountIf(n > 0, n, A1:A14) → steps
  6. Sequence(If[crossout ≟ true, If[Mod[Element[A1:A14, k], 2] ≟ 1, Text[Element[C1:C14, k], true], Text[Element[D1:D14, k], true]], Text[Element[C1:C14, k], true]], k, 1, steps) → list1
  7. Sequence(If[crossout ≟ true, If[Mod[Element[A1:A14, k], 2] ≟ 1, Text[Element[E1:E14, k], true], Text[Element[F1:F14, k], true]], Text[Element[E1:E14, k], true]], k, 1, steps) → list2
  8. TableText({list1, list2}, "vr|_") → text2