Jump to content
Nytro

Ethiopian multiplication

Recommended Posts

Ethiopian multiplication

A method of multiplying integers using only addition, doubling, and halving.

Method:

Take two numbers to be multiplied and write them down at the top of two columns.

In the left-hand column repeatedly halve the last number, discarding any remainders, and write the result below the last in the same column, until you write a value of 1.

In the right-hand column repeatedly double the last number and write the result below. stop when you add a result in the same row as where the left hand column shows 1.

Examine the table produced and discard any row where the value in the right column is even.

Sum the values in the right-hand column that remain to produce the result of multiplying the original two numbers together

In fine, nu asta e ideea. Ideea e ca acest algoritm e scris intr-o gramada de limbaje. Asa puteti vedea cum arata un cod scris intr-o multitudine de limbaje si poate o sa va placa unul si o sa il invatati.

Link:

http://rosettacode.org/wiki/Ethiopian_Multiplication

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...