Please give thumbs up if you like it
Register Memory Architecture
Expression: F = (B+C)/A
R1, R2 are registers
M[] is any memory location
MOV |
R1, B |
R1 = M[B] |
ADD |
R1, C |
R1 = R1 + M[C] |
MOV |
R2, A |
R2 = A |
DIV |
R1, R2 |
R1 = R1 / R2 |
Accumulator Based
Expression: F = (B+C)/A
AC is accumulator
M[] is any memory location
M[T] is temporary location
LOAD |
B |
AC = M[B] |
ADD |
C |
AC = AC + M[C] |
DIV |
A |
AC= AC/A |
|
|
|
|
|
|
|
|
|
STORE |
F |
M[F] = AC |
Memory Memory
Expression: F = (B+C)/A
M[] is any memory location
ADD |
X,B,C |
M[X]= M[B]+ M[C] |
DIV |
E,X,A |
M[E] = M[X] / M[A] |
STORE |
F |
M[F]= M[E] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|