TD Computer Architecture by Eng. Ibrahim Jomaa
TD Computer Architecture by Eng. Ibrahim Jomaa
Computer Architecture
By Eng. Ibrahim Jomaa
Consider the following binary codes of a set of
instructions represented over one byte:
Binary Assembly Signification
000 xxxxx END End of Execution, x can have any value.
Load into the accumulator the content of the
001 xxxxx LD A X
memory address xxxxx
Add the content of the memory address xxxxx to
010 xxxxx ADDA X
the accumulator
Store the content of the accumulator at memory
011 xxxxx STAX X
address xxxxx
The next instruction to be executed is at memory
101 xxxxx JP X
address xxxxx
The next instruction to be executed is at memory
110 xxxxx JNEG X address xxxxx if the content of the accumulator
is negative
Having the following program at address 0 in main
memory:
Address Content
0 001 01001 1. During the execution of the instruction in the
010 01010 address 2, what are the contents of the program
1
counter and the instruction register.
2 011 01011
2. What is the content of the program counter at the
3 101 00111 end of execution of the program. (when the
4 001 10001 programs stops, the program counter contains the
address of the last executed instruction).
5 101 11000
3. Describe in a few lines the operations executed by
6 110 01011 this program.
7 000 10101 4. What are the contents of the memory from address 0
101 01000 to address 11 after the execution of the program.
8
9 000 01110
10 101 11001
11 000 00000
PC IR ASM Reg. A