How to multiply - SLUniverse Forums
Navigation » SLUniverse Forums > Off Topic Discussion > Science and Tech » How to multiply


Science and Tech Discuss questions of science, science and progress, that do not speak as loud as your heart. Also, tech stuff.

 
Sponsor:
charity: water
Reply
 
LinkBack Thread Tools Display Modes
Old 06-12-2010, 11:05 AM   #1 (permalink)
Senior Member
 
Tess Whitcroft's Avatar
On Pandora
 
Join Date: Sep 2007
Posts: 7,883

Awards: 1
Thread Title of the Week 
How to multiply

177 x 23

After writing down the numbers halve the first one and double the second, writing the new numbers below the preceding ones. If the number being halved is odd, just ignore the remainder. Repeat this operation as long as you can:

177 x 23
88 . 46
44 . 92
22 . 184
11 . 368
5 . 736
2 . 1472
1 . 2944

Now remove from the second column all numbers where the corresponding number in the first column is even:

177 x 23
88 . 46 < remove
44 . 92 < remove
22 . 184 < remove
11 . 368
5 . 736
2 . 1472 < remove
1 . 2944

Then add up the remaining numbers:

23 + 368 + 736 + 2944 = 4071

This works for any two numbers

Tess
__________________
Studies have shown that people who have more birthdays live longer



Tess Whitcroft is offline   Reply With Quote
3 Users Said Thanks :
Old 06-12-2010, 02:37 PM   #2 (permalink)
SUPER BANNED

*SLU Supporter*
 
Free Xue's Avatar
I'm not finished.
 
Join Date: May 2009
Posts: 51,478
My Mood:
SL Join Date: May 2008
Blog Entries: 10

Awards: 2
SLU Creepy Avatar Competition 2014 Participant 
Lost your calculator?
__________________
Mass starvation of virtual bunnies due to a cease and desist order. Now THAT is Second Life!
la lucha sigue...
Free Xue is offline   Reply With Quote
Old 06-13-2010, 06:44 PM   #3 (permalink)
Wordcrafter
 
Rema Quandry's Avatar
Always Learning
 
Join Date: Jun 2008
Location: Cleveland, OH
Posts: 1,285
My Mood:
SL Join Date: June 3, 2008
Business: DG Productions
Client: Firestorm
Blog Entries: 5
So is there an analysis--on the web or elsewhere--of why this works?
__________________


--- Rema




Artifacts at Aedificii (mainstore): http://slurl.com/secondlife/juree/206/203/81
Aedificii: An Ancient Roman Town: http://slurl.com/secondlife/juree/198/188/86
Rema Quandry is offline   Reply With Quote
Old 06-13-2010, 09:19 PM   #4 (permalink)
Emergency Mustelid
 
Argent Stonecutter's Avatar
 
Join Date: Sep 2009
Posts: 19,195
This is called "Russian Peasant" arithmetic. If you think about it a bit it's pretty obvious what's happening.

What you're basically doing is converting the first number to binary, lowest bit first, and multiplying the second number by the corresponding powers of two. Where the lowest bit is 0 (it's even) you leave that row out, where the lowest bit is 1 (it's odd) you keep it.
__________________
Argent Stonecutter -- Skyhook Station -- Coonspiracy Store

"And now I'm going to show you something really cool."


The previous is a cybernetic datum published - in direct contravention of DoD Regulation #229RR3X3 - as being conducive to the physical, psychological and/or social well-being of the population.
Argent Stonecutter is offline   Reply With Quote
Old 06-13-2010, 09:26 PM   #5 (permalink)
Senior Member
 
Tess Whitcroft's Avatar
On Pandora
 
Join Date: Sep 2007
Posts: 7,883

Awards: 1
Thread Title of the Week 
It is the technique the Romans used to multiply with Roman Numerals so it comes in really handy if you are in a Roman ruin and have forgotten the regular way to multiply.

Tess
Tess Whitcroft is offline   Reply With Quote
1 User Laughed:
Old 06-16-2010, 03:59 AM   #6 (permalink)
Senior Member
 
Nibb Tardis's Avatar
Gore
 
Join Date: Sep 2008
Location: France
Posts: 1,647
SL Join Date: 2004
Business: primOptic eyewear
What about the Mayan method:
Nibb Tardis is offline   Reply With Quote
2 Users Said Thanks :
Old 06-16-2010, 06:22 AM   #7 (permalink)
Ginger Supremacist
 
Ramen Jedburgh's Avatar
Heya ^_^
 
Join Date: Apr 2010
Location: Illinois, USA
Posts: 4,942
My Mood:
SL Join Date: 3/9/2006
Client: Firestorm
Quote:
Originally Posted by Nibb Tardis View Post
What about the Mayan method:
YouTube - mayan math incredible
WITCHCRAFT! BURN THEM AND THE COMPUTER!
__________________
--
Ramen Jedburgh

http://allaroundthegrid.blogspot.com/
Ramen Jedburgh is offline   Reply With Quote
Old 06-16-2010, 06:25 AM   #8 (permalink)
Senior Member
 
Cat Fratica's Avatar
Wondering...
 
Join Date: Sep 2009
Posts: 1,323
My Mood:
Quote:
Originally Posted by Ramen Jedburgh View Post
WITCHCRAFT! BURN THEM AND THE COMPUTER!
Too late - Spanish already did that...
Cat Fratica is offline   Reply With Quote
Old 06-17-2010, 11:12 AM   #9 (permalink)
Wordcrafter
 
Rema Quandry's Avatar
Always Learning
 
Join Date: Jun 2008
Location: Cleveland, OH
Posts: 1,285
My Mood:
SL Join Date: June 3, 2008
Business: DG Productions
Client: Firestorm
Blog Entries: 5
Quote:
Originally Posted by Tess Whitcroft View Post
It is the technique the Romans used to multiply with Roman Numerals so it comes in really handy if you are in a Roman ruin and have forgotten the regular way to multiply.

Tess
Now you've hooked me. Do you have a source you can point me to? TIA.
Rema Quandry is offline   Reply With Quote
Old 06-17-2010, 11:18 AM   #10 (permalink)
Wordcrafter
 
Rema Quandry's Avatar
Always Learning
 
Join Date: Jun 2008
Location: Cleveland, OH
Posts: 1,285
My Mood:
SL Join Date: June 3, 2008
Business: DG Productions
Client: Firestorm
Blog Entries: 5
Quote:
Originally Posted by Argent Stonecutter View Post
This is called "Russian Peasant" arithmetic. If you think about it a bit it's pretty obvious what's happening.

What you're basically doing is converting the first number to binary, lowest bit first, and multiplying the second number by the corresponding powers of two. Where the lowest bit is 0 (it's even) you leave that row out, where the lowest bit is 1 (it's odd) you keep it.
I can see what's being done, but what I'd really like to see is a math analysis of why it works, using more familiar algebra (number theory). I'm too lazy to do it myself.
Rema Quandry is offline   Reply With Quote
Old 06-17-2010, 12:15 PM   #11 (permalink)
Emergency Mustelid
 
Argent Stonecutter's Avatar
 
Join Date: Sep 2009
Posts: 19,195
OK, start with the number 177. In binary that's 10110001.

Dividing by two is equivalent to shifting one bit to the right. 177/2 is 88, that's 1011000.

So, here's what you're doing in binary:

Code:
LHS       RHS          LO BIT OF LHS   RHS = 23 * 2^N
10110001  10111        1               23 * 2^0 = 23 * 1 = 23
1011000   101110       0
101100    1011100      0
10110     10111000     0
1011      101110000    1               23 * 2^4 = 23 * 16 = 368
101       1011100000   1               23 * 2^5 = 23 * 32 = 736
10        10111000000  0
1         101110000000 1               23 * 2^7 = 23 * 128 = 2944
Look at the third column I added. That's the LHS number in binary, reversed (read from bottom to top). So the process of dividing extracts the binary equivalent of the number starting from the low bit, by looking at the low bit of the value... the values where the number is odd have a low bit of 1. The values where the number is even have a low bit of 0.

At the same time you're calculating 2^n * LHS by multiplying it by two each time.

So what we've done is this:

177 * 23 is (2^0 + 2^4 + 2^5 + 2^7) * 23

By pulling out the values where it's odd, you've extracted:

2^0 * 23 + 2^4 * 23 + 2^4 * 23 + 2^7 * 23

And because multiplication is distributive... that's the value you want.

Last edited by Argent Stonecutter; 06-17-2010 at 12:21 PM. Reason: man it's hard to line these tables up...
Argent Stonecutter is offline   Reply With Quote
Old 06-17-2010, 12:26 PM   #12 (permalink)
Wordcrafter
 
Rema Quandry's Avatar
Always Learning
 
Join Date: Jun 2008
Location: Cleveland, OH
Posts: 1,285
My Mood:
SL Join Date: June 3, 2008
Business: DG Productions
Client: Firestorm
Blog Entries: 5
So much for being lazy. The pointer to the Russian Peasant Method was a good one. (Thx Argent) . . . and the web is rife with articles. Here's one of the more succinct, clearer explanations:

==================================

Now, let's see why the algorithm works.

Since halving and doubling play such an important role in the algorithm, it should not come as a great surprise that its real foundation lies in the binary system. To obtain the binary representation of a number, the number is to be repeatedly divided by two, the remainders recorded and then written in the reverse order. Check now the "Show binary" box:



We see two additional columns: the first indicates the step (and a power of 2), the second contains the binary digits of 85 written from the bottom upwards:

85 = 10101012,

which essentially means that

85 = 10101012
= 126 + 025 + 124 + 023 + 122 + 021 + 120
= 64 + 16 + 4 + 1.

Note that a binary digit is the remainder of division by 2: it is 1 for odd numbers and 0 for even numbers. Which bring forth the connection between the binary digits of the first multiplicand, 85 in our case, and the parity of the number in the column beneath it. The numbers are odd exactly when the remainder that appears to their left is 1. This makes the algorithm tick:

8518 = (64 + 16 + 4 + 1)18
= 1152 + 288 + 72 + 18
= 1530.

For the product 1885 we get:

18 = 100102
= 124 + 023 + 022 + 121 + 020
= 16 + 2.

and subsequently

1885 = (16 + 2)85
= 1360 + 170
= 1530.

===================================

Last edited by Rema Quandry; 06-17-2010 at 12:38 PM.
Rema Quandry is offline   Reply With Quote
Old 06-17-2010, 12:29 PM   #13 (permalink)
Wordcrafter
 
Rema Quandry's Avatar
Always Learning
 
Join Date: Jun 2008
Location: Cleveland, OH
Posts: 1,285
My Mood:
SL Join Date: June 3, 2008
Business: DG Productions
Client: Firestorm
Blog Entries: 5
Quote:
Originally Posted by Argent Stonecutter View Post
OK, start with the number 177. In binary that's 10110001.

Dividing by two is equivalent to shifting one bit to the right. 177/2 is 88, that's 1011000.

So, here's what you're doing in binary:

Code:
LHS       RHS          LO BIT OF LHS   RHS = 23 * 2^N
10110001  10111        1               23 * 2^0 = 23 * 1 = 23
1011000   101110       0
101100    1011100      0
10110     10111000     0
1011      101110000    1               23 * 2^4 = 23 * 16 = 368
101       1011100000   1               23 * 2^5 = 23 * 32 = 736
10        10111000000  0
1         101110000000 1               23 * 2^7 = 23 * 128 = 2944
Look at the third column I added. That's the LHS number in binary, reversed (read from bottom to top). So the process of dividing extracts the binary equivalent of the number starting from the low bit, by looking at the low bit of the value... the values where the number is odd have a low bit of 1. The values where the number is even have a low bit of 0.

At the same time you're calculating 2^n * LHS by multiplying it by two each time.

So what we've done is this:

177 * 23 is (2^0 + 2^4 + 2^5 + 2^7) * 23

By pulling out the values where it's odd, you've extracted:

2^0 * 23 + 2^4 * 23 + 2^4 * 23 + 2^7 * 23

And because multiplication is distributive... that's the value you want.
Thx much. It seems as if our posts "crossed in the aether". Two good explanations.

I like your explanation better.
Rema Quandry is offline   Reply With Quote
Old 06-17-2010, 01:15 PM   #14 (permalink)
Ginger Supremacist
 
Ramen Jedburgh's Avatar
Heya ^_^
 
Join Date: Apr 2010
Location: Illinois, USA
Posts: 4,942
My Mood:
SL Join Date: 3/9/2006
Client: Firestorm
Quote:
Originally Posted by Tess Whitcroft View Post
It is the technique the Romans used to multiply with Roman Numerals so it comes in really handy if you are in a Roman ruin and have forgotten the regular way to multiply.

Tess

IV X MXXI Wait, which of the Xes is multiply? do i carry an I or a V?

I ended up with WTF as the answer. What's the value of T again?
Ramen Jedburgh is offline   Reply With Quote
1 User Laughed:
Old 06-17-2010, 01:17 PM   #15 (permalink)
Emergency Mustelid
 
Argent Stonecutter's Avatar
 
Join Date: Sep 2009
Posts: 19,195
Thanks for asking, too. I had run into this before but never bothered thinking through the usual explanation, and figuring out the details. Explaining it helped get it straight in my head too.
Argent Stonecutter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On




SEO by vBSEO