IAS Instruction Set

The complete reference table (the one printed in the exam’s supplementary sheet). You mainly need LOAD / ADD / SUB / STOR — but know where the others live.

All IAS instructions operate on the accumulator (AC); MQ is the multiply-quotient partner register. M(X) = the 40-bit word at address X. Opcodes are 8 bits.
opcode8 bits0 – 7address (X)12 bits8 – 19
One IAS instruction — 8-bit opcode + 12-bit address = 20 bits

Data transfer

OpcodeSymbolicMeaning
00001010LOAD MQAC ← MQ
00001001LOAD MQ,M(X)MQ ← M(X)
00100001STOR M(X)M(X) ← AC
00000001LOAD M(X)AC ← M(X)
00000010LOAD −M(X)AC ← −M(X)
00000011LOAD |M(X)|AC ← |M(X)|
00000100LOAD −|M(X)|AC ← −|M(X)|

Unconditional branch

OpcodeSymbolicMeaning
00001101JUMP M(X,0:19)Next instruction from left half of M(X)
00001110JUMP M(X,20:39)Next instruction from right half of M(X)

Conditional branch

OpcodeSymbolicMeaning
00001111JUMP + M(X,0:19)If AC ≥ 0, next instruction from left half of M(X)
00010000JUMP + M(X,20:39)If AC ≥ 0, next instruction from right half of M(X)

Arithmetic

OpcodeSymbolicMeaning
00000101ADD M(X)AC ← AC + M(X)
00000111ADD |M(X)|AC ← AC + |M(X)|
00000110SUB M(X)AC ← AC − M(X)
00001000SUB |M(X)|AC ← AC − |M(X)|
00001011MUL M(X)AC×MQ: MSBs → AC, LSBs → MQ
00001100DIV M(X)AC ÷ M(X): quotient → MQ, remainder → AC
00010100LSHAC × 2 (shift left one bit)
00010101RSHAC ÷ 2 (shift right one bit)

Address modify

OpcodeSymbolicMeaning
00010010STOR M(X,8:19)Replace left address field of M(X) with 12 rightmost bits of AC
00010011STOR M(X,28:39)Replace right address field of M(X) with 12 rightmost bits of AC
The four you use constantly (memorize the opcodes): LOAD M(X) = 00000001 · ADD M(X) = 00000101 · SUB M(X) = 00000110 · STOR M(X) = 00100001.
Handy for “double the value” questions (Autumn-24 Q1a): LSH multiplies AC by 2. So reading X and writing back double it is: LOAD M(X)LSHSTOR M(X).