Unisys History Newsletter
Volume 5, Number 3
June 2001
UNIVAC I Instruction Set
by George Gray
The instruction sets of today's computers range from simple to complex. The instruction set of the UNIVAC I is given in this article as a basis for comparison.
A simulator for UNIVAC I and UNIVAC II has been written by Peter Zilahy Ingerman, PhD, who programmed a UNIVAC at the University of Pennsylvania from 1957 to 1963. If you are interested in having a copy of the simulator (which runs under Windows 9x but not, sadly, on Apple), you may write to Dr. Ingerman at 40 Needlepoint Lane, Willingboro NJ 08046-1997 or e-mail him at pzi@ingerman.org His simulator has an example factorial program.
Instructions on the UNIVAC I were six decimal digits (36 bits) in length; the first two (12 bits) were the function code, the third (6 bits) was not used, and the last three (18 bits) were the memory address. Each 72-bit word contained two instructions; the leftmost was executed first.
The UNIVAC I had the following registers:
A accumulator register which contained the result of addition, subtraction, multiplication, and division
L contained multiplicand or divisor
F used in multiplication and extraction
X contained the less significant half of a 22-digit product, or an unrounded 11-digit quotient
V two-word register used during transfer operations
Y ten-word register used during transfer operations
I 60-word input buffer
O 60-word output buffer
CR contained current pair of instructions
CC pointed to word containing next pair of instructions
Readers who do not want to get bogged down in the details of the instruction set can skip to the brief discussion which follows the instructions. For each instruction, we give the mnemonic, the value in binary, the value in octal, and a description of the instruction.
Add
Binary: 010100000000
Octal: 2400
Mnemonic: A
Load contents of memory into register X, then add contents of register X to value in register A
Load A
Binary: 010101000000
Octal: 2500
Mnemonic: B
Load contents of memory into register A
Store A and Clear
Binary: 010110000000
Octal: 2600
Mnemonic: C
Store contents of register A into memory, then clear register A to zero
Divide
Binary: 010111000000
Octal: 2700
Mnemonic: D
Divide contents of memory by value in register L, rounded quotient in register A, unrounded quotient in register X
Extraction
Binary: 011000000000
Octal: 3000
Mnemonic: E
Extraction permits replacement of one or more digits in a word with the corresponding digits from another word
Load F
Binary: 011001000000
Octal: 3100
Mnemonic: F
Load contents of memory into register F
Store F
Binary: 011010000000
Octal: 3200
Mnemonic: G
Store contents of register F into memory
Store A
Binary: 011011000000
Octal: 3300
Mnemonic: H
Store contents of register A into memory; retain value in A
Store X
Binary: 100100000000
Octal: 4400
Mnemonic: J
Store contents of register X into memory
Move A
Binary: 100101000000
Octal: 4500
Mnemonic: K
Move contents of register A into register L, then clear A to zero
Load L
Binary: 100110000000
Octal: 4600
Mnemonic: L
Load contents of memory into register L and register X
Multiply
Binary: 100111000000
Octal: 4700
Mnemonic: M
Load contents of memory into register X, then multiply contents of register L by contents of X, placing rounded 11-digit product in register A
Negative Multiply
Binary: 101000000000
Octal: 5000
Mnemonic: N
Same as M, except reverse sign of value from memory when loading into register X
Multiply
Binary: 101010000000
Octal: 5200
Mnemonic: P
Load contents of memory into register X, then multiply contents of register L by contents of X, placing 22-digit product in registers A and X
Transfer Equal
Binary: 101011000000
Octal: 5300
Mnemonic: Q
Jump (transfer control) to memory address if contents of A = contents of L
Record Control Counter
Binary: 101100000000
Octal: 5400
Mnemonic: R
Record value of control counter + 1 into memory in the form of an unconditional jump (U) instruction
Subtract
Binary: 110101000000
Octal: 6500
Mnemonic: S
Subtract contents of memory from value in register A
Transfer Greater
Binary: 110110000000
Octal: 6600
Mnemonic: T
Jump (transfer control) to memory address if contents of A > contents of L
Unconditional Transfer
Binary: 110111000000
Octal: 6700
Mnemonic: U
Unconditional jump to memory address
Load V
Binary: 111000000000
Octal: 7000
Mnemonic: V
Load two words from memory into register V
Store V
Binary: 111001000000
Octal: 7100
Mnemonic: W
Store two words from register V into memory
Add
Binary: 111010000000
Octal: 7200
Mnemonic: X
Add contents of register X to value in register A
Load Y
Binary: 111011000000
Octal: 7300
Mnemonic: Y
Load ten words from memory into register Y
Store Y
Binary: 111100000000
Octal: 7400
Mnemonic: Z
Store ten words from register Y into memory
Wait
Binary: 000100000011
Octal: 0403
Mnemonic: 10
Stop and wait for console input
Print
Binary: 001000000011
Octal : 1003
Mnemonic : 50
Print on console printer
Shift Instructions
For the following shift instructions, n was the number of digit positions to shift.
Shift Right
Binary: 010010nnnnnn
Octal: 22nn
Mnemonic: .n
Shift contents of A right n digits, zero fill. Example: .3 000 would shift all digits in A three places right and zero fill.
Shift Left
Binary: 010011nnnnnn
Octal: 23nn
Mnemonic: ;n
Shift contents of A left n digits, zero fill
Shift Right, Preserve Sign
Binary: 000010nnnnnn
Octal: 02nn
Mnemonic: -n
Shift A right n digits, but preserve sign digit
Shift Left, Preserve Sign
Binary: 000011nnnnnn
Octal: 03nn
Mnemonic: 0n
Shift A left n digits, but preserve sign digit
Input/Output Instructions
For the following input/output instructions, n was the unit number of the UNISERVO tape drive.
Read
Binary: 000100nnnnnn
Octal: 04nn
Mnemonic: 1n
Read tape block (60 words) from UNISERVO n into register I
Read Backward
Binary: 000101nnnnnn
Octal: 05nn
Mnemonic: 2n
Read backward on tape, place block (60 words) into register I
Transfer and Read
Binary: 000110nnnnnn
Octal: 06nn
Mnemonic: 3n
Transfer data from register I into memory, then read next tape block into I
Transfer and Read Backward
Binary: 000111nnnnnn
Octal: 07nn
Mnemonic: 4n
Transfer data from register I into memory, then read backward, putting next tape block into I
Write Tape
Binary: 001000nnnnnn
Octal: 10nn
Mnemonic: 5n
Write tape block from memory at 100 frames per inch (FPI) density. This density was used for data tapes.
Rewind
Binary: 001001nnnnnn
Octal: 11nn
Mnemonic: 6n
Rewind tape
Write Tape
Binary: 001010nnnnnn
Octal: 12nn
Mnemonic: 7n
Write tape block from memory at 20 FPI density. This density was used for print tapes.
Rewind Interlock
Binary: 001011nnnnnn
Octal: 13nn
Mnemonic: 8n
Rewind tape with interlock
Discussion
A complete multiplication involved three instructions:
(1) load multiplicand from memory to L, example: L 041
(2) multiply, example: M 048
(3) store result in memory, example: C 045
Similarly, a division required three instructions:
(1) load divisor from memory to L, example: L 041
(2) load dividend in A and divide, example: D 045
(3) store result in memory, example: C 046
The E instruction permitted replacement of one or more digits in a word with the corresponding digits from another word:
(1) load the control word into F, example: F 042
(2) load into A the word whose digits will be replaced, example: B 043
(3) get the replacement word and do the replacement, example: E 049
(4) store the result, example: C 017
Each digit in the control word which had a zero in its rightmost bit indicated replacement.
Trademarks
Unisys, UNIVAC, and UNISERVO are registered trademarks of Unisys Corporation.
Copyright 2001 by George Gray