answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
CaHeK987 [17]
2 years ago
12

In the description of the Hack machine language in chapter 4, it is stated that in well-written programs a C-instruction that ma

y cause a jump should not contain a reference to M, and vice versa. Discuss why this should be avoided.
The last instruction (0; JMP) effects an unconditional jump. Since the C-instruction syntax requires that we always effect some computation, we instruct the ALU to compute 0 (an arbitrary choice), which is ignored.
The programmer can use the A register to select either a data memory location for a subsequent C-instruction involving M, or an instruction memory location for a subsequent C-instruction involving a jump. Thus, to prevent conflicting use of the A register, in well-written programs a C-instruction that may cause a jump (i.e., with some non-zero j bits) should not contain a reference to M, and vice versa.

Computers and Technology
1 answer:
kati45 [8]2 years ago
4 0

Answer:

To avoid conflicting uses of A register, few well-written programs follow the best practice, i.e, avoiding reference to M and vice versa. The programmer can use the A register to select either a data memory location for a subsequent C-instruction involving M, or an instruction memory location for a subsequent C-instruction involving a jump. Thus, to prevent the conflicting use of the A register, in well-written programs a C-instruction that may cause a jump (i.e., with some non-zero j bits) should not contain a reference to M, and vice versa.

Image is attached for better demonstration and understanding.

You might be interested in
Your company has decided it wants to build a file server and store data that can be shared by coworkers. You were asked to resea
Yuri [45]
Tylenuuutiunumiiute joy. Until ouuu I gotta y us huh iuoihtytutb to the ng ru
3 0
2 years ago
"the file that specifies how netbeans builds and deploys the application when you run the application is called the ____________
katen-ka-za [31]
Called the<span>. </span>script<span>. build. When you run a web application, NetBeans. automatically compiles all the files that need to be compiled, deploys th</span>
5 0
2 years ago
What conclusion can be made about the state of the program when the while loop terminates? Assume answer is a declared and initi
stellarik [79]

<u>Answer:</u>

<em>1. The loop will run unless the value of answer equals to Capital N.</em> The method equals is “case-sensitive” that is lower case letter and upper case letters are considered different. That “a” and “A” means the same to us, but for the method equals it is different and equals method will return false if the case is not matching.

<em>2. a (int)(Math.random() * (upper − lower) ) + lower </em>

Since we need to consider the lower limit value together to get the desired results we need to add the value of lower limit to the multiplied answer.

<em>3. b while(userGuess != secretNumber || userGuess >= lowerLimit && userGuess <= upperLimit)</em>

Here the program is required to check the while loop and exit when user guess the number or we can say the loop should continue until the user guess the number, so that is why we have taken <em>userGuess!=secretNumber. </em>Next the loop should be exited if it is not within the range or we can say that the loop should run only if the guessed number is within the upper and lower limit.<em> That is why we have opted for the condition userGues>=lowerlimit && userGuess<=upperlimit.</em> Why we have taken && as the operator is that, it’s a range of values so && operator best suit for this kind of logical condition.

3 0
2 years ago
There are n coins, each showing either heads or tails. We would like all the coins to show the same face. What is the minimum nu
faust18 [17]

Answer:

Its nCr = n!/(r!.(n-r)! =n!/!!.(n-1)! = n

Explanation:

Here. the arrangement of outcome does not matters, and hence it is a combination. You should know that when arrangement matters then we have to calculate the permutation and its formula is n!/(n-r)!. However, here it is the combination, and hence its nCr or n!/r!. (n-r)!. And here r is 1 as we can have all heads or all tails. And n is n. Hence,

Its nCr = n!/(r!.(n-r)!

           =n!/!!.(n-1)!

           = n

6 0
2 years ago
Give a recursive (or non-recursive) algorithm to compute the product of two positive integers, m and n, using only addition and
LiRa [457]

Answer:

Multiply(m,n)

1. Initialize product=0.

2. for i=1 to n

3.      product = product +m.

4. Output product.

Explanation:

Here we take the variable "product" to store the result m×n. And in this algorithm we find m×n by adding m, n times.

6 0
2 years ago
Other questions:
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    9·2 answers
  • What technique creates different hashes for the same password? ccna routing protocols final answers?
    7·1 answer
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    7·1 answer
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • You have several pictures of different sizes that you would like to frame.A local picture framing store offers two types of fram
    15·1 answer
  • Assuming that the valid cost should be between 100 and 200, does the following code snippet test this condition correctly?
    10·1 answer
  • int) You are the head of a division of a big Silicon Valley company and have assigned one of your engineers, Jim, the job of dev
    8·1 answer
  • Ishmael would like to capture a selected portion of his screen and then capture actions he preforms on that selected portion. Wh
    7·1 answer
  • Which option describes how to apply a left indent to a selected paragraph?
    12·2 answers
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!