132 Part 1 ½ Fundamentals
Section 3 ½ Computers of Historical
Significance
information is operated on in the stack, operands are eliminated from the stack and results of operations are returned to the stack. As information in the stack is used up by operations being performed, it is possible to cause "pushups, i.e., a word is brought from the memory area addressed by the S register, and the address in the S register is decreased by one.
To eliminate unnecessary pushdowns and pushups, the A and B registers both have indicators used for remembering whether the registers contain information or are empty. When an operand is to be placed in the stack and either of the registers is empty, no pushdown into memory occurs. Also, when an operation leaves one or both of the registers empty, no automatic pushup occurs.
Polish Notation
The Polish logician, J. Lukasiewicz, developed a notation which allows
the writing of algebraic or logical expressions which do not require grouping
symbols and operator precedence conventions. For example, parentheses are
necessary as grouping symbols in the expression A(B + C) to convey the
desired interpretation of the expression. In the expression A + B/C, the
normal interpretation is A+(B/C), rather than (A+B)/C, because of
the convention that the / operator is of higher precedence than
the + operator. The right-hand Polish notation used in the B 5000 is based
on placing the operators to the right of their operands: A + B becomes
AB + in Polish notation. A+B+C can be written either as AB+C+, or as ABC+
+. In the expression ABC+ +, the first + operator says to add the operands
B and C. The second + operator says to add A to the sum of B and C. Returning
to the first examples above, A(B+C) can be written as BC+A´
or ABC+´ in Polish. The second example
is written as BC/A+ or ABC/+. The extension of Polish notation to handle
equations is shown in the following example:
The Stack in Use
To illustrate the functioning of the stack, two simple examples are shown in Figs. 4 and 5. In the examples, the letters P, Q, and R represent syllables in the program that cause the operands P, Q, and R to be picked up and placed in the stack. The symbols + and ´ represent syllables that cause the add and multiply operations to occur. The two examples represent different ways of writing P(Q+R) in Polish notation. The first example in Fig. 4 does not require pushdowns or pushups. The second example, shown in Fig. 5, requires a pushdown in the execution of the syllable R, and a pushup in the execution of the syllable ´ . The columns in the
table represent the contents of the various registers after execution of the syllable listed in the first column.
Independence of Addressing
One of the goals set in the design of the B 5000 was to make the programs independent of the actual memory locations of both the program itself and the data, in order to provide really automatic program segmentation. Through automatic program segmentation, it is possible to have program size practically independent of the size of core memory. The systems analyst or programmer intending to do multi-processing is then no longer faced with the difficult task of planning what jobs are to be run together in order that system storage capacities are not exceeded.
In achieving independence of addressing, a solution requiring large contiguous areas of memory was not deemed satisfactory. Each segment of the program and each data area should be completely relocatable without modification to the program. It is