Is My Solution for the STA Instruction in Computer Architecture Correct?

AI Thread Summary
The discussion centers on solving problems related to the STA instruction in a basic computer architecture context. The user seeks clarification on filling in values for specific registers and memory locations, particularly for the STA instruction, which involves storing the accumulator's content in memory. There is confusion regarding the initial state of the address register and the significance of the instruction code. Additionally, the user inquires about the bit allocation for various instruction components in a computer with 4M words and 32 registers. The conversation emphasizes the need for users to demonstrate their own work to receive tutorial assistance effectively.
itech4814
Messages
10
Reaction score
0
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.
 
Physics news on Phys.org
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.
 
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.
 
itech4814 said:
Memory Location, Instruction, PC, AR, DR, AC, IR
INITIAL, 100, -, -, ABCD, -
100, STA, *, *, *, *, *

I need the values for the asteriks.
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.
 
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?
 
itech4814 said:
Basic Computer has initial I=0, PC=100, AC=ABCD Address 055
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).


itech4814 said:
I looked up STA and it says STA= D3T4: M[AR]<-AC, SC <- 0
What does this mean?
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:
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-
address-
 
itech4814 said:
I am still lost on these charts.
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.

itech4814 said:
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-
address-
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.
 
Ha ok. Let's try another one.

Address=100; Hexadecimal code=2400;

What is the statement or the symbolic name of the opcode?
 
  • #10
itech4814 said:
What is the statement or the symbolic name of the opcode?
You'll need to look at the upper bits of the hexidecimal code (which is the instruction) to determine the opcode.
 
  • #11
itech4814 said:
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.

itech4814 said:
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.

itech4814 said:
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?

itech4814 said:
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-
address-

itech4814 said:
Ha ok. Let's try another one.

Address=100; Hexadecimal code=2400;

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

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
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?
 
Back
Top