wilj;
I'm gonna take a stab at this from the example I found referencing the notation. It seems that the operands are all considered binary expressions; therefore, in context, what you're looking at is a string of individual number values. That makes the 42 and 56 two sets of two integers each. The first set of two consists of the numerical values 4 and 2 rather than components of the expression forty-two. The same goes for the next set of integers, 5 and 6, which should not be construed as anything like 56.
The sequence in which the operators are to be applied to the individual operands relies upon proximity. The equations, as written, are + / 4 2 + 5 6 ... In this type of notation, the operators are put ahead of the operands. That is, the action to take is put ahead of the things acted upon. This means that what is closest to being resolvable gets evaluated first. What is seen of what's written, when observed closely, is + 5 6.
This means add 5 and 6. The result is 11. The expression then looks like this:
+ / 4 2 11...
The next decipherable equation that you can see is / 4 2... That means divide 4 by 2. You are now left with an equation that looks like this: + 2 11... This is the last expression to be seen in the lot, and just means "add two to eleven". The answer should be thirteen..
.............+ / 4 2 + 5 6 .........................
.............+ / 4 2 ....11 .........................
.............+.....2......11 .........................
....................13..................................
This type of logic is supposed to be related to the way stacks are utilized, and is taught in order to familiarize people to the concept, judging from what I read... Hope it helps... You try the second one, and see if you can apply it... Have fun... jb

Good catch, but too late to edit it, so it has to stay as is. I was just playing around with Macromedia Captivate, my new toy.

I use stack notation every day as a PostScript developer. Everything goes on the stack. Operands precede operators. To add 5 plus 3 (giving 8) and divide by 2 (giving 4): 5 3 add 2 div

It is known as reverse Polish notation or postfix form, introduced by Lukasiewicz. Unlike the Polish notation, in which the operation sign precedes the operands, in reverse Polish the operation sign follows the operands.

In RPN, an operator is "Executed". So 2, 3, 4 all go on the "stack". When "*" is encountered it is executed. It consumes the two topmost operators and replaces them with the value. You just pile up values until an operator encounters, and then you execute the operator immediately. It helps to draw a picture:

The stack works like cafeteria trays (if you have those, or remember them). You add a new tray to the stack, it pushes the rest of the stack "down". You can only grab the top tray.

Ive been here (and there) for quite some time as a guest
Been wondering - seeing DW with (hardly) no new content from people like Dani or other staff - ...

Hello everyone, I will take this chance to reintroduce myself to the community. I was a member on the Daniweb forums back in 2006 and 2007. I can see a ...

I just posted something and had to go through the "Click the photos with street signs" test before my post was accepted. I was logged in. I don't remember ever ...