Computer Architectures:
Today's Outline



von Neumann Machine

The vast majority of computers in use today are von Neumann machines.



Algorithm

pc = 0;
do {
  instruction = memory[pc++];
  decode(instruction);
  fetchoperands();
  execute();
  storeresults();
} while (instruction != halt);

Different (von Neumann) architectures differ mainly in how they implement

fetchoperands()
,
execute()
, and
storeresults()
;



Stack Architecture

Figure 1.3



Stack Machine Algorithm



Accumulator Machine

Figure 1.4



Accumulator Machine Algorithm



Load-Store machines

Figure 1.5



Load-Store Machine Algorithm



Load-Store Machine Algorithm

pc = 0;
do {
  instruction = memory[pc++];
  if (ismemop(instruction)) {
    addr = memaddr(instruction);
    reg = regnum(instruction);
    if (isload(instruction))
      memory[addr] = r[reg];
    else
      r[reg] = memory[addr];
  } else {
    r1 = reg1num(instruction);
    r2 = reg2num(instruction);
    r3 = reg3num(instruction);
    r[r3] = execute(op(instruction),
                    r[r1], r[r2]);
} while (instruction != halt);



Load-Store machine



Mailing List



Homework