Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4566196
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:45:17+00:00 2026-05-21T18:45:17+00:00

I read a wiki that says for multiplication the CPU adds! From wiki: Pass

  • 0

I read a wiki that says for multiplication the CPU adds!

From wiki:

Pass the only weight-1 wire through, output: 1 weight-1 wire
Pass the two weight-2 wires through, outputs: 2 weight-2 wires
Add a full adder for weight 4, outputs: 1 weight-4 wire, 1 weight-8 wire
Add a full adder for weight 8, and pass the remaining wire through, outputs: 2 weight-8 wires,     1 weight-16 wire
Add a full adder for weight 16, outputs: 1 weight-16 wire, 1 weight-32 wire
Pass the two weight-32 wires through, outputs: 2 weight-32 wires
Pass the only weight-64 wire through, output: 1 weight-64 wire

I not understand whole, but I think it keeps adding then if it not know how to add it pass and goes next addition. here full article: http://en.wikipedia.org/wiki/Dadda_tree

I do lot research and I think it is slow. So instead of the CPU doing multiplication I want to do it myself.

I wrote this function:

function do_multiply($a, $b)
{
    while($b > 0) { 
        $a = $a + $a;
        $b = $b-1;
}

All I want to do is if I asked function to multiply 2 and 3, I want to add 2 to 2, three times, correct?

So I want to do this:

2+2+2

This is same as 2*3, correct?

When I run this it gives me 16. Why do I get the wrong answer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:45:18+00:00Added an answer on May 21, 2026 at 6:45 pm
    function do_multiply($a, $b)
    

    {

    $res = 0;
    while($b > 0) { 
        $res += $a;
        $b = $b-1;
    }
    return $res;
    

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SharePoint Wiki that I'm permitting anonymous users read-only access to. However
I have read the explanation in http://en.wikipedia.org/wiki/PageRank and i understand that the page rank
I read on OSDev wiki, that protected mode of x86 architecture allow you to
I need to create a CouchDB user which can only read documents from any
I've read a couple of times in different sources (e.g. Wikipedia: http://en.wikipedia.org/wiki/C_variable_types_and_declarations#Size ), that
I read in reddit wiki that reddit moved to indextrunk but when I reviewed
http://www.opengl.org/wiki/Rendering_Pipeline_Overview says that primitives that lie on the boundary between the inside of the
So I have read this - https://wiki.archlinux.org/index.php/Python And it is clear from this wiki
I read the wiki and it looks like that this will do the job
I read that docs.jquery.com uses wiki to do the API documentation. I have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.