My *nix world

Fast multiplication by 11

One of my favourite techniques is that which allows us to fast multiplication by 11.

To get your attention I will say that I can multiply in my head the following numbers:

748346274 x 11 = 8231809014

The technique is quite simple:

  • the last digit of our product will be the last digit of number which is not 11 (e.g.  748346274) : 4
  • the next digit of our product is calculate by adding the n digit to the n-1 digit: 4 + 7 = 11; we write down 1 and save 1 into memory
  • the next digit of our product is calculated by adding the n-1 digit to the n-2 digit: 7 + 2 = 9; recall the 1 saved previously so we get 10; the next digit of our product becomes 0 and save 1 into memory
  • the next digit of our product is calculated by adding the n-2 digit to the n-3 digit: 2 + 6 = 8; recall the 1 saved previously so we get 9; the next digit of our product becomes 9
  • we continue the process until to the first digit (on the left) of our number; that way we obtain the final product as 8231809014

Very simple!

Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.

 
The following two tabs change content below.
Fast multiplication by 11

Eugen Mihailescu

Founder/programmer/one-man-show at Cubique Software
Always looking to learn more about *nix world, about the fundamental concepts of math, physics, electronics. I am also passionate about programming, database and systems administration. 16+ yrs experience in software development, designing enterprise systems, IT support and troubleshooting.
Fast multiplication by 11

Latest posts by Eugen Mihailescu (see all)

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: