SWAC commands
The 37 binary digit (bit) SWAC word consists of a sign bit and 36 data bits. For a command, these 36 bits are broken into 5 parts: 4 groups of 8 bits and 1 group of 4 bits. The first four 8-bit groups refer to any cells of the high speed memory (any of the 256 cells of the Williams tube). The 4 bit group is the function portion of the command. Its values range from 00 to 15. This value determines the command that SWAC will execute.
For example, the addition command treats these 5 parts as:
Address of Address of Address of Address of Add
Augend Addend Sum next command 04
The multiplication command treats these 5 parts as:
Address of Address of Address of (not used) Multiply
Multiplier Multiplicand Product 10
Suppose that the value of a variable A is stored in memory cell 011, the value of B is stored in 012, the value of their sum (A+B) is stored in cell 013, and the value of their product (A times B) is stored in cell 014.
The addition command is stored in cell 002 and the multiplication command in cell 003. . Then, the commands that will add and multiply A and B are:
Cell 002 011 012 013 003 04
Cell 003 011 012 014 10
Cell 004 ...
At the end of the multiplication, control is given to cell 004 for the next command.
The meaning of the addresses for the commands used by SWAC are summarized in a table. There are 13 commands.although the function code has provision for 16.There is no division command and there are 2 versions of add, subtract, multiply, compare and input. The product command gives a double precision answer for multiplication.