answers "experts" have given me wrong answers 4 times in a
row on this, so please if you do not know how to answer this do not
attempt to. I don't mean to be rude, but it is getting very
frustrating. I want to learn how to do this problem, it is the only
one I have left. I have 2 attempts remaining. I have to learn a ton
of correct information, I don't have room to keep learning things
that are wrong.
DO NOT COPY AND PASTE THE ANSWER THAT STARTS AT TABLE
#10!
THE ANSWER THAT STARTS AT TABLE #10 IS INCORRECT, PLEASE
ANSWER CORRECTLY
1. Consider the following Hack computer block diagram shown in
Figure 1.
3. Imagine that you are at the beginning of the LOOP (#11).
Assume that the values of n1 and n2 are 6 and 2. The variables n1,
n2, and q are stored at registers 16, 17, and 18, respectively.
2. Imagine the Hack computer shown in Figure 1 is tasked with
executing the Hack assembly code shown in Figure 2. The objective
of this program is to implement integer division and
store the result. Specifically, it carries out the
following operation: q = n1/n2. It should be assumed
that in all instances, n2 > 0.
4. Complete the Table 1 to show what occurs at each entity, at
each line of the code during this iteration
5. Create the given Table 1 in a Word document and then fill in
the information for lines 13 - 23
Code Line # A- D- M- ALU Data Instruction Program Control/Address/ register register Register memory Memory Counter Data bus (starting from 12) #12 NA NA The A- register is set to 16 M reg- ister points to the memory that stores the vari- able nl, RAM[16] The data mem- ory is ac- cessed to read RAM[16] that stores the value of nl The in- struction memory input is set to address of #13 The program counter is set to PC++ ad- dress of #13 in- struction The control bits are sent to A register to load the value 16. The address of vari- able nl is put into the address bus to access the memory location. The control bits are sent to the PC to in- crement its value by 1. #13 #14 #15 #16 #17 #18 #19 #20 #21 #22 #23 Table 1: Line by line explanations
#1 @RO //set RO DOM #2 43 @nl MED// nl-RO #4 @R1 //set Bl. Assume the value in B1 will always be>0 DM #5 #6 #7 #8 @n2 MED// n2-R2 #9 #10 eg M=0 // 4-0 #11 #12 #13 #14 #15 #16 //q - ni/n2 (LOOP) @ni DM @n2 DED-M @FINISH DEJT #17 418 @nl M = D// nl - nl-n2 #19 120 da M - M +1 #21 #22 #23 #24 LOOP OH JMP (FINISH) #25 #26 #27 (END) @END OHJMP Figure 2: Hack assembly code for integer division
answers "experts" have given me wrong answers 4 times in a row on this, so please if you do not know how to answer this do
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
answers "experts" have given me wrong answers 4 times in a row on this, so please if you do not know how to answer this do
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!