Four bit adder: Difference between revisions

m
→‎{{header|Quackery}}: tweaked commentary
m (→‎{{header|Quackery}}: tweaked commentary)
m (→‎{{header|Quackery}}: tweaked commentary)
Line 5,511:
<code>unrot</code> is another stack management word, which moves the top of stack down below the third on stack, the third and second on stack becoming the second on stack and top of stack respectively. (The converse action is <code>rot</code>. It moves the third on stack to the top of stack.)
 
Finally <code>not</code> takes one item from the stack and returns one, <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".
 
Looking further down the code, <code>halfadder</code> uses the word <code>2dup</code>, which is equivalent to <code>over over</code>, and <code>dip</code>.
1,462

edits