Jump to content


 


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.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Binary Multiplier Using C++


  • Please log in to reply
4 replies to this topic

#1 bac5006

bac5006

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:06:58 PM

Posted 06 November 2007 - 09:56 AM

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.

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:58 PM

Posted 06 November 2007 - 05:25 PM

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.

#3 bac5006

bac5006
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:06:58 PM

Posted 07 November 2007 - 01:31 PM

I could probably pull it off if it was in MIPS. What I don't know is there a way to do binary addition in C++?

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:58 PM

Posted 07 November 2007 - 03:54 PM

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.

#5 drummerdude

drummerdude

  • Members
  • 28 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:PA
  • Local time:06:58 PM

Posted 15 November 2007 - 05:59 PM

hey bac5006, just a quick question, where do you go to school at? this sounds identical to the C++ project I have to do




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users