wu :: forums
« wu :: forums - MULTIPLY WITHOUT MULTIPLYING »

Welcome, Guest. Please Login or Register.
May 7th, 2024, 6:47am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: ThudnBlunder, Icarus, SMQ, towr, Grimbal, Eigenray, william wu)
   MULTIPLY WITHOUT MULTIPLYING
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: MULTIPLY WITHOUT MULTIPLYING  (Read 3092 times)
eviljed
Newbie
*





   


Posts: 16
MULTIPLY WITHOUT MULTIPLYING  
« on: Aug 9th, 2002, 10:50am »
Quote Quote Modify Modify

Multiply by 8 without using multiplication or addition. Now do the same with 7.  
 
For 8:  Convert to binary.  Shift left twice.  That'll do it. (note that the shifts put zeros in the least significat values).
 
For 7:  I'll have to get back to you on that.
IP Logged
eviljed
Newbie
*





   


Posts: 16
Re: MULTIPLY WITHOUT MULTIPLYING  
« Reply #1 on: Aug 9th, 2002, 11:02am »
Quote Quote Modify Modify

I just had an ID-10T error. (aka, i'm an idiot).  You shift to the left three times.  Two shifts only multiplies it by 4.
IP Logged
Aaron
Newbie
*





   


Gender: male
Posts: 14
Re: MULTIPLY WITHOUT MULTIPLYING  
« Reply #2 on: Aug 9th, 2002, 11:54am »
Quote Quote Modify Modify

I am assuming that addition and subtraction are different functions here...
 
n = (n << 3) - n;
 
I am still fiddling with the bits for a solution that involves no arithmatics, short of going all the way to implementing a binary subtraction function with logigates.   Tongue
IP Logged
-D-
Guest

Email

Re: MULTIPLY WITHOUT MULTIPLYING  
« Reply #3 on: Aug 9th, 2002, 4:27pm »
Quote Quote Modify Modify Remove Remove

There is a long thread on this already furthur down the page with several ideas on it.
-D-
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board