|
-
February 27th, 2012, 01:15 PM
#1
Infix to Reverse Polish notation
I have to convert..
X=A+((B+C)*D)-E
to reverse polish notation
I think it's...
BC+D*A+E-
Is this correct?
-
February 28th, 2012, 12:24 PM
#2
Re: Infix to Reverse Polish notation
Yes.
However, it's probably tricky to implement that in assembly language without even knowing for what platform...
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
February 28th, 2012, 12:40 PM
#3
Re: Infix to Reverse Polish notation
Thank you. I also completely do not understand this problem...
Write a program to evaluate the arithmetic statement using a general register computer with three-operand instructions
X = A*(B + C) + D / E* F +G
-
February 28th, 2012, 01:05 PM
#4
Re: Infix to Reverse Polish notation
 Originally Posted by halt4814
I also completely do not understand this problem...
Well, the actual problem is quite common and I'd say it's on an intermediate level. I could write a program for it without any notable problems if only I'd know in which concrete language to write it.
[...] using a general register computer with three-operand instructions
Now this is a bit more of information about your target platform, yet not enough. Haven't you been given a more detailed description of the hypothetical target platform? Perhaps there's sort of an academic standard hypothetical platform that refers to, but in this case I don't know it, and I didn't find anything on Wikipedia either.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|