‹ Class 9 · Ch 11
The World of Algorithms · Principle 3 of 29

Steps we just know

Basic steps of an algorithm

Stuck? Ask Guru

NCERT: 11.1.1 Adding Numbers Digit by Digit

Think

What do we already know?

In 473 + 695, the tens column asks for 7 + 9. You write 16 at once. You don't draw 7 dots and 9 dots and count them.

Does the addition algorithm ever tell you how to find 7 + 9?

What this lesson covers

The idea

Any algorithm is built from basic steps that we assume we can perform directly.

What do we already know?

In 473 + 695, the tens column asks for 7 + 9. You write 16 at once. You don't draw 7 dots and 9 dots and count them.

Does the addition algorithm ever tell you how to find 7 + 9?

  • Yes, in one of its steps
  • No, it assumes we already know it
  • Only for numbers bigger than 10

Spot the basic steps

Run the algorithm on the book's 3347 + 2729. Each column asks you to add two digits and a carry. Notice: you do this directly, without counting.

Built from basic steps

Any algorithm is built from basic steps that we assume we can perform directly.

The book points out an important assumption in the addition algorithm: we know how to add single-digit numbers without counting them out. So adding 3347 + 2729 takes 4 basic steps, one for each column: 7 + 9 + 0, 4 + 2 + 1, 3 + 7 + 0 and 3 + 2 + 1.

Notes

Every algorithm is built from basic steps we assume we can do directly. For addition, the basic step is adding single-digit numbers (and a carry).

Check yourself

Which of these is a basic step of the addition algorithm?

How many basic steps (single-digit additions) does the algorithm use for 3347 + 2729?

Answer: 4

There are 4 columns, so 4 single-digit additions. (The last carry is just written down.)

  • Adding 8 + 6 + 1, two digits and a carry — correct. Yes. We assume we can add single digits and a carry directly.
  • Adding 473 + 695. That is the whole problem the algorithm solves, not a basic step.
  • Counting 1168 dots. The algorithm avoids counting dots altogether.