School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,579 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,241 people online right now. Registration is fast and FREE... Join Now!




ALU simulation in C++

 

ALU simulation in C++, Unclear about argument decription

vincek

17 Nov, 2007 - 11:18 AM
Post #1

New D.I.C Head
*

Joined: 11 Nov, 2007
Posts: 6


My Contributions
Main Program segment:
Void DisplayControlSignals (void)
{ fprintf(stdout, "\tControl Signals: %0x%0x%0x%0x%03x%0x% .....%0x\n",
controls.RegDst,
controls.Jump,
controls.Branch,
controls.MemRead, ............

Function segment:

int ALU_ (unsigned A, unsigned B, char ALUControl, unsigned *ALUresult, char *Zero)

Switch (ALUControl)
case ' ***Don't know what to put here!!!! ***'
ALUresult = A + B
break;
case ' ***Don't know what to put here!!!!!***'
ALUresult = A - B
break;
I'm confused with "char ALUControl" instead of using "Int ALUControl". I am required to
use "char ALUControl" Could you lead me in the right direction? Thanks in advance.

User is offlineProfile CardPM
+Quote Post


RodgerB

RE: ALU Simulation In C++

17 Nov, 2007 - 11:40 PM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,237



Thanked: 32 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
Welcome to </DIC>, vincek. Just a reminder that no programming help will be provided in this forum, it would proberly be more suited that you post in the C/++ forum.

Also: code.gif
User is offlineProfile CardPM
+Quote Post

ferrari12508

RE: ALU Simulation In C++

18 Nov, 2007 - 08:37 AM
Post #3

D.I.C Lover
Group Icon

Joined: 2 Nov, 2007
Posts: 1,113



Thanked: 3 times
Dream Kudos: 150
My Contributions
Welcome to DIC, Hope you find what you need
this isnt a programming forum, please repost your code and question in the proper language forum up at the top left
User is offlineProfile CardPM
+Quote Post

vincek

RE: ALU Simulation In C++

18 Nov, 2007 - 09:32 AM
Post #4

New D.I.C Head
*

Joined: 11 Nov, 2007
Posts: 6


My Contributions
QUOTE(RodgerB @ 18 Nov, 2007 - 12:40 AM) *

Welcome to </DIC>, vincek. Just a reminder that no programming help will be provided in this forum, it would proberly be more suited that you post in the C/++ forum.

Also: code.gif



Sorry about that. I'm trying to get us to navigating on this website.
Thanks for your reply.

QUOTE(ferrari12508 @ 18 Nov, 2007 - 09:37 AM) *

Welcome to DIC, Hope you find what you need
this isnt a programming forum, please repost your code and question in the proper language forum up at the top left


Thanks for your input.
Rookie mistake on my part.
User is offlineProfile CardPM
+Quote Post

Louisda16th

RE: ALU Simulation In C++

18 Nov, 2007 - 09:56 AM
Post #5

dream.in.assembly.code
Group Icon

Joined: 3 Aug, 2006
Posts: 1,893



Thanked: 5 times
Dream Kudos: 755
My Contributions
Welcome to </DIC> smile.gif
User is offlineProfile CardPM
+Quote Post

vincek

RE: ALU Simulation In C++

18 Nov, 2007 - 11:25 AM
Post #6

New D.I.C Head
*

Joined: 11 Nov, 2007
Posts: 6


My Contributions
QUOTE(Louisda16th @ 18 Nov, 2007 - 10:56 AM) *

Welcome to </DIC> smile.gif


Thanks.
User is offlineProfile CardPM
+Quote Post

Jayman

RE: ALU Simulation In C++

20 Nov, 2007 - 10:53 AM
Post #7

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 8,544



Thanked: 226 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Welcome to Dream in Code. Look forward to seeing you around the forums.
User is offlineProfile CardPM
+Quote Post

WolfCoder

RE: ALU Simulation In C++

20 Nov, 2007 - 07:30 PM
Post #8

ヒヒヒー
Group Icon

Joined: 5 May, 2005
Posts: 5,130



Thanked: 29 times
Dream Kudos: 1575
Expert In: ゲームのプログラム、かわいい

My Contributions
Welcome to Dream In Code!!!
User is offlineProfile CardPM
+Quote Post

PsychoCoder

RE: ALU Simulation In C++

20 Nov, 2007 - 07:41 PM
Post #9

Dyslexics Untie!
Group Icon

Joined: 26 Jul, 2007
Posts: 14,714



Thanked: 501 times
Dream Kudos: 11450
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
Welcome to </dream.in.code> vincek, glad you could make it! Hope to see you around the forums someday smile.gif
User is offlineProfile CardPM
+Quote Post

jjhaag

RE: ALU Simulation In C++

20 Nov, 2007 - 08:03 PM
Post #10

me editor am smartastic
Group Icon

Joined: 18 Sep, 2007
Posts: 1,789



Thanked: 9 times
Dream Kudos: 775
Expert In: C,C++

My Contributions
Howdy and welcome to </DIC>, vincek. Glad you could join us.

-jjh
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 08:25AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month