1951 IAS Machine Architecture

This section is made to grasp a basic understand of how a computer architecture works, and it's not meant to be studied thoroughly.

The IAS Machine had a 1000 word memory, with a 40b word (40000b = 5000B ~ 5kB).

Word

Words are CA2 integers

0000000000000000000000000000000000000000
\(\pm 2^{39} \cdot bit\)\(value\)

Instruction words contain two instructions

0000000000000000000000000000000000000000
\(0..7\)\(8..19\)\(20..27\)\(28..39\)
opcodeaddressopcodeaddress

CPU

NameDescription
MBRMemory Buffer Registerreceives & sends data to memory and I/O
MARMemory Address Registercurrent memory address
PCProgram Counteraddress of the instruction to execute
IRInstruction Registercontains instruction to execute
IBRInstruction Buffer Registercontains the second instruction
ACAccumulatorfor partial calculation results
MQMultiplier Quotientfor partial calculation results

Instructions

This isn't the full ISA of the IAS Machine, check it out here.

Transfer Instructions

Description
LOADAC \(\leftarrow\) AC operation Memory[Address]
LOADAC \(\leftarrow\) operation Memory[Address]
LDMQMQ \(\leftarrow\) Memory[Address]
STMemory[Address] \(\leftarrow\) AC
AMODLMemory[Address][0..11] \(\leftarrow\) AC[0..11] (low)
AMODHMemory[Address][20..31] \(\leftarrow\) AC[0..11] (high)

Jumps

Like in modern assembly, jumps can be unconditional, conditional; for the IAS machine you had to specify either a low or high address.

Description
UBLPC \(\leftarrow\) [Address]
UBHPC \(\leftarrow\) [Address] + 1
CBLif AC \(\ge\) 0 { PC \(\leftarrow\) [Address] }
CBHif AC \(\ge\) 0 { PC \(\leftarrow\) [Address] + 1 }

Operations

Description
MULAC, MQ \(\leftarrow\) AC \(\cdot\) Memory[Address]
DIVAC \(\leftarrow\) AC / Memory[Address]
DIVMQ \(\leftarrow\) AC % Memory[Address]
LSHIFTAC, MQ \(\leftarrow\) AC, MQ << X
RSHIFTAC, MQ \(\leftarrow\) AC, MQ >> X
MOVEAC \(\leftarrow\) AC operation MQ
IOTransfer from and to I/O devices

Example Program

LOAD 101
ADD 102
ST 103

How does it work?

  1. Fetch
    • MAR \(\leftarrow\) PC
    • IR, IBR \(\leftarrow\) MBR \(\leftarrow\) Memory[MAR]
  2. Decode
    • MAR \(\leftarrow\) IR[8..19] ; address
    • CU \(\leftarrow\) IR[0..8] ; opcode
  3. Exec
    • AC \(\leftarrow\) MBR \(\leftarrow\) Memory[101]
  4. Decode
    • MAR \(\leftarrow\) IBR[8..19] ; address
    • CU \(\leftarrow\) IBR[0..8] ; opcode
  5. Exec
    • AC \(\leftarrow\) AC + MBR \(\leftarrow\) Memory[102]
  6. PC
    • PC \(\leftarrow\) PC + 1
  7. Fetch
    • MAR \(\leftarrow\) PC
    • IR, IBR \(\leftarrow\) MBR \(\leftarrow\) Memory[MAR]
  8. Decode
    • MAR \(\leftarrow\) IR[8..19] ; address
    • CU \(\leftarrow\) IR[0..8] ; opcode
  9. Exec
    • Memory[103] \(\leftarrow\) MBR \(\leftarrow\) AC