Problem M.1
CPUs contain a specially designated register called a
program counter. Explain what the program counter does.
The program counter holds the memory address indicating where
to load the next instruction to be executed. It essentially
keeps track of where the computer is currently located within
the program it is executing.
Problem M.2
What distinguishes the Harvard architecture (which
the MINIAC uses) from the von Neumann architecture (used by ARM
processors)?
In a Harvard architecture computer, the program instructions
and the program data are stored in two separate memories, with
different address spaces;
by contrast, a von Neumann architecture stores both instructions
and data alongside each other in the same memory.
Problem M.3
Distinguish between the terms machine language and
assembly language.
Machine language specifies how a machine decodes binary data
as instructions for it to execute.
Assembly language specifies a textual representation
easier for humans to read and write,
that translates to machine language in a transparent manner.
Problem M.5
Write MINIAC assembly code that places into data memory at address
4 the negation of the value found in data memory at address 7.
LI 0 # to negate RAM[7], compute 0 - RAM[7] and store at RAM[4]
SB 7
ST 4
Problem M.6
Write MINIAC assembly code that looks at data memory at
address 8 and places a 0 into data memory at address 6
if the number is even and 1 if it is odd.
LM 8 # load input, rotate 7 spots so 1 bit is in -128's bit
RL 7
BN odd # if top bit is 1, then original number was odd
LI 0 # otherwise, store 0 at address 8 and halt
ST 8
BZ 0
odd LI 1 # sore 1 at address 8 and halt
ST 8
LI 0
BZ 0