Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
I need to develop a binary multiplier using an adder tree method in C++ with 4 to 32 bits as the input. I also need to show a snapshot every five pipeline beats. I am NOT a good programmer and I have no idea were to begin. Any help would be appreciated. Please HELP! Thanks.
Well, for starters you are going to need some method of taking input. And then you are going to need some sort of a loop to do the addition. Every 5 iterations, you are going to have to print out the current state of the input. And you are going to need some way to know when you are done so that the loop terminates.
This sounds like a machine org type problem? I'm surprised that you are not doing it in MIPS.
Sure, you are just adding ones and zeros. I don't know if there any specific libraries for it, but it appears to me that the exercise is to code your own. I'm not sufficiently familiar with adders, although basically it is two inputs and a carry input, and a sum and a carry output. I can't think of a clean way to do it right off either.