Hi. I am doing computer systems as a subject and have an exam tomorrow and just need some quick help....
Is anyone familiar with MIPS, and the SPIM simulator? If so.. is the memory address of an instruction the same as the Program Counter? Ill show an example... this is a practice question...
2. Assume that the following program fragment is in memory (the number in square brackets
is the memory address of the instruction):
[0x5a00] bne $t1,$0,end
[0x5a04] sw $1,var # var resides in address [0xa000]
[0x5a08] div $1, $2
[0x5a0c] end: addi $v0,$0,10
- 2 -
i) What is the content of PC after the execution of ?bne $t1,$0,end?, where $t1=$0?
for question i).. would the PC be the memory address of 'end'.. which is 0x5a0c?
Also.. i have a question like this:
Assume a 8MB memory. How many wires do you need in a bus if the memory is:
a. byte-addressable
b. word-addressable, and the word size is 16-bits
Question 8 (LN4)
How many address lines (bits in the address) and I/O lines (bits in the actual data) are needed for
each of the following word-addressable memories?
a. 2K x 16
b. 16K x 8
c. 4M x 12
Basically.. i dont really know how to work this out..anybody able to help me or point me in the right direction?
Thanks guys
Is anyone familiar with MIPS, and the SPIM simulator? If so.. is the memory address of an instruction the same as the Program Counter? Ill show an example... this is a practice question...
2. Assume that the following program fragment is in memory (the number in square brackets
is the memory address of the instruction):
[0x5a00] bne $t1,$0,end
[0x5a04] sw $1,var # var resides in address [0xa000]
[0x5a08] div $1, $2
[0x5a0c] end: addi $v0,$0,10
- 2 -
i) What is the content of PC after the execution of ?bne $t1,$0,end?, where $t1=$0?
for question i).. would the PC be the memory address of 'end'.. which is 0x5a0c?
Also.. i have a question like this:
Assume a 8MB memory. How many wires do you need in a bus if the memory is:
a. byte-addressable
b. word-addressable, and the word size is 16-bits
Question 8 (LN4)
How many address lines (bits in the address) and I/O lines (bits in the actual data) are needed for
each of the following word-addressable memories?
a. 2K x 16
b. 16K x 8
c. 4M x 12
Basically.. i dont really know how to work this out..anybody able to help me or point me in the right direction?
Thanks guys