Skip to main content
Mathematics LibreTexts

2.3: Standard written algorithms

  • Page ID
    23445
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Problem 48 Use standard column arithmetic (i.e. long multiplication) to evaluate 9009 × 37. Why should you have foreseen the outcome?

    Problem 49 In the long division shown here, all the digits are missing.

    Ch02-001.jpeg

    But the “shape” of the constituent numbers is clear.

    Can you work out all possibilities for the two-digit divisor?

    Problem 50 (For those readers who can write simple computer code.) In these problems you may choose your favourite programming language, and a device of your choice.

    (a) Two non-negative integers m and n are to be entered in base 10, digit by digit, via a keyboard. Write computer code to implement the standard algorithms of column arithmetic in order to output to the screen (in the same format):

    (i) m + n

    (ii) mn

    (iii) m × n

    (iv) (if n is a divisor of m) m ÷ n

    (v) (if n is not a divisor of m) the integer part q of the quotient m ÷ n and the remainder r.

    (b) Repeat the challenge of part (a), but this time try to write shorter code by using recursion (or other programming tricks).

    (c) Repeat the challenge of parts (a) and (b), but this time with inputs and outputs in the binary numeral system (see Section 2.8).


    This page titled 2.3: Standard written algorithms is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Alexandre Borovik & Tony Gardiner (Open Book Publishers) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?