Four bit adder: Difference between revisions
m
→{{header|Quackery}}: tweaked commentary
m (→{{header|Quackery}}: tweaked commentary) |
m (→{{header|Quackery}}: tweaked commentary) |
||
Line 5,509:
After this, <code>over</code> does its thing again, again working on the topmost items on the stack, and then <code>and</code> takes two arguments from the stack and returns one result to the stack. By convention, words other than stack management words consume their arguments. Words can take zero or more arguments, and leave zero or more results.
<code>unrot</code> is another stack
Finally <code>and</code> and <code>or</code> both take two items from the stack and return one, leaving one item. So we can see from the diagram that <code>xor</code> takes two items and returns one. The stack comment <code>( b b --> b )</code> reflects this, with the <code>b</code>'s standing for "Boolean".
|