# Computer Architecture Problem

1. Feb 13, 2012

### itech4814

I need some help on solving a few problems....

Basic Computer has initial I=0, PC=100, AC=ABCD Address 055

Memory Location, Instruction, PC, AR, DR, AC, IR
INITIAL, 100, -, -, ABCD, -
100, LDA, 101, 055, 7777, 7777, 2055

I need to find out what the values for the dashes are and how you got those values.

2. Feb 13, 2012

### rcgldr

Are you sure you're supposed to fill in those dashes? It would see like those are don't care or undefined values, since this is the initial state for the cpu.

3. Feb 13, 2012

### itech4814

Sorry I posted the wrong set...

Memory Location, Instruction, PC, AR, DR, AC, IR
INITIAL, 100, -, -, ABCD, -
100, STA, *, *, *, *, *

I need the values for the asteriks.

4. Feb 13, 2012

### rcgldr

In this case you're missing the address to store AC into. You'll also need to look up the instruction code for STA which goes into IR bits 14..12, assuming this is a "basic computer" used in some programming classes.

5. Feb 13, 2012

### itech4814

Basic Computer has initial I=0, PC=100, AC=ABCD Address 055

I looked up STA and it says STA= D3T4: M[AR]<-AC, SC <- 0

What does this mean?

6. Feb 13, 2012

### rcgldr

Address 055 is AR, address register, but that should mean the address to use for the STA instruction, not the initial state of AR, which won't matter, since the STA instruction includes an address field (assuming this is the basic computer).

M means memory, M[AR] means memory at location AR, M[AR]<-AC means that M[AR] is stored with the content of AC. Link to documnet (pdf) for basic computer:

http://web.cecs.pdx.edu/~mperkows/CLASS_573/573_2007/xx.pdf

Last edited: Feb 13, 2012
7. Feb 13, 2012

### itech4814

I am still lost on these charts. But I do have another question...

Computer uses a memory unit with 4M words of 32 bits each and 32 registers. How many bits are for each part of the instruction?

indirect-
opcode-
register code-

8. Feb 13, 2012

### rcgldr

I'm not sure if it's mportant to understand SC and internal timiings of the cpu, if the goal is to understand how to program, versus understanding how a cpu works.

This isn't enough information. 4M words requires 22 bits of addressing. Indirect mode may not be supported. You didn't specify the number of registers or if the machine supports a variety of indexing modes. Not all 32 bits of a word may be used for a single instruction, or a single instruction might require two 32 bit words.

9. Feb 13, 2012

### itech4814

Ha ok. Lets try another one.

What is the statement or the symbolic name of the opcode?

10. Feb 13, 2012

### rcgldr

You'll need to look at the upper bits of the hexidecimal code (which is the instruction) to determine the opcode.

11. Feb 13, 2012

### Staff: Mentor

Per the PF rules (see the Rules link at the top of the page) you need to show your own work on your schoolwork questions before we can offer tutorial help. Stop asking questions expecting us to give you the answers. That's not how it works here at the PF.

Please post your work on each of your questions, so that we can offer some tutorial hints.

12. Feb 15, 2012

### itech4814

I have an issue with my computer architecture problem.

Computer has intial I=0, PC=100, AC=ABCD, Address 055. The content of memory location (055) is 7777. I have to find PC, AR, DR, AC, and IR from that information using the STA instruction.

The STA instruction is M[AR] <-AC

I calculated the following values and believe it is correct...

PC=101;
AR=055;
DR=ABCD;
AC=ABCD;
IR=3055;

Can anyone tell me if this is correct?