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

Click For Summary

Discussion Overview

The discussion revolves around solving problems related to computer architecture, specifically focusing on the STA instruction and the values associated with various registers and memory locations in a basic computer model. Participants seek clarification on how to derive specific values from given initial conditions and instructions.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant requests help in filling in values for a table related to the initial state of a basic computer, specifically for the STA instruction.
  • Another participant questions whether the dashes in the initial state represent undefined values, suggesting they may not need to be filled in.
  • There is a clarification regarding the STA instruction, with one participant explaining that it involves storing the accumulator's content into memory at the address specified by the address register.
  • One participant expresses confusion about the significance of certain internal CPU components and their relevance to programming versus understanding CPU operations.
  • Another participant notes that additional information is needed to determine how many bits are allocated for different parts of an instruction in a computer with specific memory and register configurations.
  • A participant mentions the need to analyze the upper bits of a hexadecimal code to determine the opcode, indicating a method for deriving information from the instruction format.
  • One participant reiterates their need for help with the STA instruction and presents their calculated values for the program counter, address register, data register, accumulator, and instruction register, seeking validation of their results.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the STA instruction and the initial state of the computer. Some participants agree that certain values may be undefined, while others provide differing interpretations of how to derive the necessary values. The discussion remains unresolved regarding the correctness of the calculated values presented by one participant.

Contextual Notes

Participants highlight the need for additional context regarding the instruction format and the specific architecture being discussed, indicating that assumptions about addressing modes and register configurations may affect the answers.

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?
 

Similar threads

Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
10
Views
4K
Replies
29
Views
6K
  • · Replies 1 ·
Replies
1
Views
13K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K