LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAICN 510.84 CO! Digitized by the Internet Archive in 2013 http://archive.org/details/illiacordercode49nash UNIVERSITY OF ILLINOIS GRADUATE COLLEGE DIGITAL COMPUTER LABORATORY INTERNAL REPORT NO. ^+9 ILLIAC ORDER CODE By J. P. Nash October 12, 1953 THE ORDER CODE The Illiac is a binary computer in which the storage capacity of each register or memory location is *40 binary digits . The orders which the machine carries out are represented by numbers in the machine. The relation between the order types and the corresponding numbers is called a code, and the collection of all such numbers is called the order code of the machine. The order code is interpreted by the control circuits of the machine and completely determines what the machine does. The machine is designed so that any storage location in the memory may be used either for orders or for numbers, the only distinction being that the control must be instructed properly so that orders and numbers will be treated appropriately. It is not necessary to use *4-0 binary digits to describe an order. The Illiac uses 20 digits and packs two orders (an order pair ) into one location. These are the left hand order and the right hand order. Since many orders must refer to locations in the memory, each order contains an address. It is still called an address in those orders which do not refer to the memory. The electrostatic memory of the Illiac has 102*4- locations and because 102*4- -2 we require 10 binary digits for the address. These are the rightmost 10 digits of the 20 digits assigned to an order. Of the remaining 10 digits of each order, eight are used for the instruction or ( function ) and the other 2 are unused. The digit makeup of an order pair is then as in Figure 3-1- -2~ 8 DIGIT INSTRUCTION 10 DIGIT ADDRESS 8 DIGIT INSTRUCTION 1 I ; 10 DIGIT ADDRESS LEFT HAND ORDER (DIGITS 0-19) RIGHT' HAND ORDER (DIGITS 20-39) FIGURE 3.1 ORDER PAIR DIGIT MAKEUP The Instruction digits are 8 in number because of the convenience obtained by using a base l6 (sexadecimal) number system In which k binary digits may be represented by one sexadecimal digit. Thus each instruction may be coded as 2 sexadecimal digits. The symbols K, 8, N, J, F, L are used for 10, 11, 12, 13, ik, 15. As an example of an order pair, let us consider the following kO binary digits. 111101010000000111010100000000 000000110 When divided as in Figure 3*1* these digits look like this: 1111 0101 00 0000011101 0100 0000 00 0000000110 INSTRUCTION L„L ADDRESS INSTRUCTION R.H. ADDRESS The left hand instruction is made up of the two 4- digit numbers 11] 1 0101 which are the sexadecimal digits L5« The left hand address is interpreted as an integer which may go from to 1023 if we use decimal notation or from to 3LL if we use sexadecimal notation. In sexadecimal representation the left hand address is 1J which corresponds to the decimal number 29- Thus the left hand order is L501J where the has been supplied so that all 20 binary digits (including the unused 2) are accounted for. (We could have set the unused digits to l's and used N rather than if we had wished.) -3- Similarly the right hand order is ^0006, and we have, in sexa- decimal notation, the order pair L501J 40006. This order pair says, "Transfer the contents of memory location 1J to the accumulator; store the accumulator contents at location 6 of the memory . " It is quite inconvenient to have to write addresses in sexa- decimal form, and it is unnecessary if the machine contains a program which will take addresses written in decimal form and convert them to sexadecimal (i.e., binary) form for machine use. A program of this type is available for the Illiac, It is called the Decimal Order Input Routine. The Illiac operates by using orders which have been stored in the memory according to a plan determined by the programmer. The program is begun with a particular order chosen by the programmer. Let us suppose that it is the left hand order at location 10. (We shall refer to addresses in decimal notation.) The control will put into R the order pair from location 10, Then, until something is said to the contrary the control will follow a fixed pattern in executing orders. It will do the left hand order and then the right hand order in R . Then it will put the order pair at location 11 into R_ and again do the left and right hand orders „ It will continue to withdraw and execute order pairs from successive memory locations until one of two things occurs: (a) One of the orders brought out says "stop", (b) One of the orders brought out says "change the sequencing". The second kind of order, a control transfer orde^ permits the programmer to change the sequencing of orders and provides the flexibility required for iterative processes. It works in the following way. Let us suppose that after the machine has executed the left hand order at location 17 the programmer wishes to move to a sequence of orders beginning, say, with the right hand order at location 35- Then the right hand order at location 17 will say "Transfer Control to R.H. order at 35-" The execution of this order will consist of arranging that the next order pair is brought to R Q from location 35 and that the left hand order is skipped. Having done the right hand order in R~, the control brings out the order pair from location 36 and proceeds in the usual way. There are two kinds of control transfer orders, conditional transfers and unconditional transfers . We have just described the unconditional transfer. The conditional transfer is the same as- the unconditional transfer provided that the number in the accumulator is not negative . Otherwise it does nothing. In the example we have just used, if the right hand order at location 17 had been conditional, then if the accumulator had held zero or a positive number the next order executed would have been the right hand order at location 35- But if the accumulator had held a negative number the next order executed would have been the left hand order at location 18. There are four control transfer orders, the right and left unconditional and conditional orders . These have been further combined with a stop or not stop order, giving eight orders in all. If the programmer chooses one of the four "stop and transfer control orders" the machine will stop before transferring control and must be started again with a panel switch. The switch can be set so that these stop orders are ignored, -5- which of course makes these stop orders into ordinary control transfer orders o This is often useful in programming, and when it is done the machine can still be stopped with another kind of stop order which can- not he ignored . The number of orders which the Illiac can execute is quite large (more than 100 ), but not all of them are of general interest, What we shall do here is discuss the various types of orders, giving the vari- ants of each. Following this discussion will be a list of these Illiac orders which are of most use. This list is adequate for the coding of any problem and beginners are urged to confine themselves to it. Experienced coders will find uses for other variants. The two sexadecimal instruction digits of an order give the order type and the order variant , We shall refer to them as the T- and V- digits, respectively. In the example L5 cited earlier the T- digit is L and denotes addition. The V-digit is 5 and chooses one of the variants of the addition order. The order types are given in Table 3-1- It will be seen from Table 3.2 that except for the 0, 1, 8, 9, K and S orders the address of an order always refers to the memory. Let us now consider the variants obtained by changing the V- digit. The sexadecimal V-digit is made up of the four binary digits V"8, Vk, V2 and VI . There are 16 possible combinations, giving V-digits from to L, but not all are used. The results obtained with different V-digits are as follows : -6- 1 2 3 k 5 6 7 8 9 K S N J F L Order Type Left Shift Right Shift Unconditional Transfer Conditional Transfer Store from A Register Memory to Q Register Divide Multiply Input or Output Special Input or Output Increment Add from Q Add from Q Register Wot Used Extract Increment Add Add Table 3.1 ORDER TYPES The meaning of the address digits of the different order types is given in Table 3*2. ORDER TYPE 0,1 2,3 k 5 6 7 80, 82 92 K, S J F L ADDRESS SIGNIFICANCE Number of shifts (cannot exceed 63) Memory location from which next order pair will come Memory location at which storage will Occur Memory location from which word is brought to Q register., Memory location of divisor Memory location of multiplicand Number of binary digits to be input or output Character to be punched and number of punchings Address not used Same as for 5 order Memory location of addend Memory location of addend Table 3.2 MEANING OF ADDRESS DIGITS -7- (a) The Digit VI, If VI = 1, A will always be cleared to zero at the beginning of any order. If VI = 0, A will not be cleared. Thus an odd V-digit means clear A„ (b) The Digit V8. If VI = 1 and V8 = 1, the quantity l/2 will be put in A at the beginning of any order. This is how rounded multiplication is carried out. If V8 = 1 and VI = 0, the Illiac will hang up. (c) The Digit V2. This digit affects all orders except those of types 0, 1, 5 and J- See Table 3*3- (d) The Digit Vk. This digit affects all orders except those of types 0, 1, 5 and J. See Table 3°3- The following notation is convenient for a more detailed description of the orders: A = accumulator register Q = multiplier-quotient register AQ ss the double register formed from A and Q f excluding q N(R) = contents of register R N(n) = contents of memory location n a = sign digit of A o q = sign digit of Q If no ambiguity is possible, the symbols A and Q will also "be used to denote the contents of A and of Q. -8- 1 1 I 1 r © p ° s^ O U CO +3 «= s o a W bp P» g Pi © °°d cy "i O U 3 +3 ffi h c «H o -p eg «H CM > © d to co U CO -p b O CD Ph CO +s •H g P O 0) to © e p; ■si Eh o 43 Pi o o ■B •9 > Cz3 •P CO •P Cf b ■P P.-P 3 1 +3 CD O P O r-H O O T) o O CO cd m+3 d «H (0 CD ■H

3 CO CO CD O «H °H © +3 -P O o Pi pi PD E> 6 S H p Js; CO CO ss S3 H o CM !> « O H 8 o H I 1 H O H H o H o h o © Pi Tj © 1 'E o -p 3 "2 •£f X! CO > ■p to co fe W> «H CD CO J-i CD •H CD Pi H ss $t Cj T3 u O O 43 43 •P ■p CO X) fi Xl 4> CD w o P, Pi CD CD CD o CD 11 b CD O •H ■p o tH *H <»H 8 ° H 8 O H 1 H O H O o H ^ | ►4 TS H E EH M P. Ok C o CD g h <3 h CD +3 a) Eh O Ok CO & i O *H 43 0) 2 o -p CO b CD •p Ok Pi CD Ok & H «H en a °k J3 •» Pi O CO CM Eh _=t «i CO c m £3 Eh -9- On the following pages there are detailed descriptions of the results obtained by changing the V-digit of the 15 order types used in Illiac. After the detailed descriptions is an abbreviated list of orders . The orders in the abbreviated list have been underlined in the detailed descriptions. -10- 0V n Left Shift of AQ 3 Orders Final Stop 1 Order If n = 0, the machine will stop. If not, repeat n times the operation which replaces the contents a Q> a ]_> a 2' ' • ' f a ?.Q> a 39 °^ and by and q > ip q 2 > • • • , ^q, qo 9 of Q a l' a 2* a V ° ' ' ' a 39' ^1 q > q 2 , q 3 g> °° The number n will he interpreted modulo 6^. Variants 0, 2, h, 6 Order as described above. 1> 3) 5> 7 Clear A and then execute as described. 8, K, N Illiac will hang up. Avoid these. 9, S, J, L Clear A, insert l/2 in A, and then execute order as described above. F Final stop. Use only 00, 01, 09 for shifts Use OF with n = for final stop -11- IV n Right Shift of AQ 3 Orders If n = 0, the machine will stop. If not, repeat n times the operation which replaces the contents a 0' a l* a 2' ' " ° ' a ^>8 , a 39 °^ and ty and q 0' q l' ^2* * * " ' q 38' q 39 ° f Q V V a l' * * * ' a 37' a 38 %, a^, q 1 , . . . , q 3? , q^. The number n will be interpreted modulo 6k. Variants 0, 2, k, 6 Order as described above . 1> 3> 5) 7 Clear A and then execute as described. 8, K, N, F Illiac will hang up. Avoid these. 9, S, J, L Clear A, insert l/2 in A, and then execute order as described above. Use only 10, 11, 19 -12- 2V n Unconditional Control Transfer 12 Orders Bring the next order pair from memory location n and choose the left or right hand order of this pair, stopping beforehand or not, depending upon V. Variants Stop. The first order after starting with the STAET switch will be the right hand order at memory location n„ The stop can be ignored by setting a panel switch. 2 Transfer control to right hand order at memory location, k Same as except take left hand order. 6 Same as 2 except take left hand order. 1> 3> 5> 7 Same as 0, 2, h, 6 except clear A first. 8, K, N, F Illiac will hang up. Avoid these. 9 } S, J, L Same as 1, 3> 5> 7 except also make A = l/2 after clearing. USE 20, 21, 22, 23, 2k, 25, 26, 27, 29, 2S, 2J, 2L. STARTING AFTER A STOP . When the ILLIAC has been stopped by one of the control transfer stop orders, it is usually started again by moving the black switch to START, from which position the switch automatically returns to OBEY. The Illiac can also be started again by moving the white switch through EXECUTE to FETCH and then back to RUN. If this is done, the control transfer order which stopped the Illiac will be ignored. The normal sequencing will then follow unless the stop order is a right hand order -13- transf erring control to the right hand side of a word. In this case, the order first obeyed after starting will he the right hand instead of the left hand order of the order pair brought out. For example consider the following orders" p L5 F 20 p+2 p+1 1*0 IF 2h P p+2 7J 2F IA 3F If we stop with the 20 order, the black switch will start with Ik 3F and the white switch with 24 p. If we stop with the 2h order, the black switch will start with L5 F and the white switch with 7 J 2F. -!k- 3V n Conditional Control Transfer h Orders If A ^ 0, bring the next order pair from memory location n and choose the left or right hand order of this pair, stopping beforehand or not, depending upon V. If A <( 0, go on to the next order. Variants 0, 2,4,6 If A^ 0, do the same operation as for the corres- ponding 2 V order. If A 7 Identical with corresponding 2V orders. 8, K, N, F Illiac will hang up. Avoid these. 9, S, J, L Identical with corresponding 2V orders. Use only 30, 32, 3k, 36. Starting After A Stop The discussion given with the 2V orders applies here to the corresponding 3V orders . -15- ^V n Store 9 Orders Copy into memory location n all of the contents of A, the contents corresponding to the address of a left hand order, or the contents corresponding to the address of a right hand order, depending upon V. Variants Replace N(n) by A. Replace N(n) and A by 0. Replace address digits of right hand order at memory location n by the corresponding digits of A, Same as 2 except clear A first. Same as 2 except take left hand order. Same as 6 except clear A first. Illiac will hang up. Avoid these „ Replace N(n) and A by l/2. Replace A by l/2 and address digits of right hand order at memory location n by o. Same as S except take left hand order. Use only ^+0, kl, kg, ^3, k6, ^7 , ^9, ks, kL. o, k Ij 5 2 3 6 7 8, K, N, F 9, J s -16- 5V n Memory to Q 3 Orders Transfer N(n) to Q. Variants 0, 2, kj 6 Transfer N(n) to Q. 1, 3, 5, 7 Clear A and transfer N(n) to Q. 8, K, N, F Illiac will hang up. Avoid these. 9, S, J, L Put l/2 in A and transfer N(n) to Q. Use only 50, 51, 59- -17- 6V n Divide 3 Orders Divide AQ "by N(n), placing the rounded quotient in Q (the least significant digit being 1 for the roundoff) and leaving a residue in A. If f A > N(n) the Illiac will stop after dividing. If A = N(n) and if A ^. 0, the Illiac will stop after dividing; if A <^ 0, the Illiac will not stop after dividing. Variants 6 As described above. 7 Make A = 0, Then proceed as above. L, S Make A = l/2 . Then proceed as above . 8, K, N, F Illiac will hang up. Avoid these. 0, 1, 2, 3, ^ ) 5> These give incorrect results or results which are correct only under certain conditions. 9, J Avoid them. Use only 66, 67, 6L. 7V n -18- Multiply 12 Orders Put Q x P(n) + 2~ 39 A into AQ the least significant 39 digits being in Q, with q = 1 2 3 k 5 6 7 8, K, N, F 9 s J I Variants P(n) = -N(n) P(n) = -N(n); A = "UNROUNDED NEGATIVE MULTIPLY" P(n) = - |N(n)| P(n) = - |N(n)| ; A = P(n) = N(n). "HOLD MULTIPLY" P(n) = N(n); A = "UNROUNDED MULTIPLY" P(n) = |N(n)| P(n) = JN(n) | ; A = Illiac will hang up. Avoid these. P(n) = - N(n); A = l/2. "ROUNDED NEGATIVE MULTIPLY" P(n) = N(n) ; A = 1/2 P(n) = N(n); A = l/2 "ROUNDED MULTIPLY" P(n) = |N(n)| ; A = l/2 Use only 70, 71, 72, 73, 7^, 75, 76, 77, 79, 7S, 7J, 7L, -19- 8V n Input -Output 9 Orders Transfer words between A and the input tape, output punch, or magnetic drum. The address n must be a multiple of h for the tape and punch orders and is interpreted modulo 6h, The address must be 11 for drum orders . Variants Shift AQ h places left as in the 00 order and replace a ,-, a , a o, a by the binary digits corresponding to the sexadecimal character being read. This is done n/h times. 1, 9 Clear A and then do as in 80 order, 2 Punch the digits a„, a , a , a as one sexadecimal character and shift AQ h places left as in the 00 order „ This is done n/k times. 3 Clear A and do as in 82 order. 5 This is a 40-digit order of the form 85 11 TV p. We distinguish two cases. (l) T is not 0, 1, 8, 9« In this case, A and Q are shifted left 11 places as in the 00 order and the word at drum location p is placed in A. Then the T order is executed using address p. Complete freedom is not available in drum addresses because p may interfere with V. -20- (2) T is 0, 1, Q, 9- In this case after the word at drum location p is placed in A the right hand order is skipped. This permits use of any drum address for p. 6 This is a VO-digit order of the form 8fr 11 TV p.. We again have two cases; (1) T is not 0, 1, 8, 9° In this case A is transferred to drum location p, and A and Q are shifted 11 places left as in the 00 order. Then the T order is executed using address p. Complete freedom is not available in drum addresses because p may interfere with V. (2) T is 0, 1, 8, 9- In this case the right hand order is skipped after doing the left hand order as in case (l) This permits use of any drum address p. 7 Same as 86 except clear A first. S Put l/2 in A and do as in 82 order. L Put l/2 in A and do as in 86 order. 8, K, N, F Illiac will hang up. Avoid these. k t J These are not useful. Avoid them<, Use 80, 81, 82, 83, 85, 86, 87, 8S, 8L. -21- 9V n Special Input- Output 1 Order Variants 2 Letter output „ Punch on the tape a character depending upon the address digits q. Three quantities are defined by the 10 binary address digits: (1) The leftmost h digits define the usual h digit positions in the output tape . (2) The rightmost digit defines the 5th hole in the output tape. (3) The rightmost 6 digits determine the number b of times that the above-defined character is punched and also the number of right shifts executed. The number of characters punched will be found by dividing the number in the rightmost 6 digits by k and rounding up_ to the next integer. The address n may always be found from the following formula: n = 6ka + 4b + c - 2 where a is the character punched, a = 0, 1, 2, . . . , J, F, L b is the number of characters punched, 1 f^- b /- 16 c determines the fifth hole, c = 0, 1. The number of right shifts executed is 4b + c - 2. Example . Punch the character 7 thirteen times . n=64x7+4xl3+0-2=498 It will be found that the last 6 digits contain the number 50 which when divided by k and rounded up gives 13» There will be 50 right shifts. -22- Figure 3.2 shows the relationship between the tape holes and the address digits of the 92 order. The address shown (decimal ^98) will print the character 7 thirteen t ime s . FIGURE 3.2. ADDRESS DIGITS OF 92 ORDEE -23- KV n Increment Add from Q 12 Orders These orders are identical with the FV orders with Q instead of 5(b). Variants Add -Q - 2~^ to A. (See footnote). 1 Put -Q - 2~ 39 in A. 2 Same as if Q :> 0; same as k if Q 0; same as if Q ^ 0. 7 Same as 5 if Q^ 0; same as 1 if Q4. 0. 8, K, N, F Illiac will hang up. Avoid these. 9 Put -Q - 2~ 39 + l/2 in A. S Same as 9 if Q ^ 0; same as J if Q<0. J Put Q + 2~ 39 + l/2 in A. L Same as J if Q ^ 0; same as 9 if Q < 0. Use K0, Kl, K2, K3, Kk f K5, K6, K7, K9, KS, KJ, KL. NOTE: -Q - 2 J7 is the digitwise complement of Q. SV n -2h- Add from Q 12 Orders Q is added, subtracted, etc., to A. These orders are identical with the LV orders with Q instead of N(n). 1 2 3 k 5 6 7 8, K, N, F 9 s J L Variants Subtract Q from A. Put -Q in A. Subtract |q from A. Put - Q inA. Add Q to A. Put Q in A, Add ft | to A. Put I Q|in A. Illiac will hang up. Avoid these Put 1/2 - Q in A, Put l/2 - |Q in A, Put l/2 + Q in A. Put l/2 + Q in A. Use SO, SI, S2, ££, Sk_, S£, S6, SJ, S9, SS, SJ, SL -25- JV n Extract 30rders If two corresponding digits of N(n) and Q are "both l's, put 1 in that place of Q„ Otherwise put 0. This order gives the logical product of W(n) and Q. Variants 0, 2, h, 6 As described above. 1> 3> 5> 7 Clear A and do JO order. 8, K, N, F Illiac will hang up. Avoid these. 9, S, J, L Put l/2 in A and do JO order. Use only JO, Jl, J9. -26- FV n Increment Add 12 Orders Variants Add -N(n) - 2~ 39 to A, (See footnote). 1 Put -N(n) - 2~ 39 in A, 2 Same as if N(n) ^0; same as k if N(n) ^~ 0. 3 Same as 1 if N(n) -> 0; same as 5 if N(n) r0; same as J if N(n) C 0. J Put N(n) + 2~ 39 + l/2 in A. L Same as J if N(n)^ 0; same as 9 if N(n) u