In a hypothetical computer, the processor has four registers: an 8-bit Program Counter (PC), a 16-bit...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In a hypothetical computer, the processor has four registers: an 8-bit Program Counter (PC), a 16-bit Accumulator (AC), a 16-bit Counter (CTR), and a 12-bit Pointer (PTR). The memory is divided into words each of which is 16-bit long. Each word can hold either an instruction or a piece of data. For each instruction X, the four most significant bits (denoted by X15-12) represent an opcode. The rest of the instruction (denoted by X11-0) can be either an address or a value of an operand. The table below explains some of the instructions supported by the processor. Opcode (binary) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 Operation Load AC from a memory location whose address is X1-1-0. Store AC into a memory location whose address is X11-0. Add to AC the contents of a memory location whose address is the value of PTR. The result is saved to AC. 1100 Subtract from AC the contents of a memory location whose address is the value of PTR. The result is saved to AC. Multiply AC times X₁10. The result is saved to AC. Divide AC by X11-0. The result is saved to AC. Reset AC. Load PTR with X11-0. Increment PTR (by one). Load CTR with X11-0. Decrement CTR (by one). If CTR is not 0, branch to an instruction whose address is X70 (i.e., load PC with X7-0), else continue normally (i.e., do not change PC). Halt execution. Given the following program: Address (Hexadecimal) 05D 05E 05F 060 061 062 063 064 065 066 Contents (Hexadecimal) 03BE 73BF 9002 2FFF 8000 A333 BF60 5003 15D3 CFFF Show, using the table below, the execution trace of that program by filling in the contents of every register and memory location after the fetch cycle and after the execute cycle of every instruction. All values are in hexadecimal. Instruction Cycle PC AC CTR PTR Initially 5D B300 F43A 0C8 03BE Fetch SE B300 F43A OC8 Execute 5E 0007 F43A OC8 Fetch Execute 73BF CFFF Fetch Execute *** VAL *** *** *** *** .... *** *** Location: 3BE 0007 0007 0007 ..... ... Location: Location: Location: 3C0 3BF 5D3 000A FFFF 000A FFFF 000A FFFF +44 0001 0001 0001 *** 44* ... *** (a) PC is 8-bit long. Thus, the maximum program length is 2³ = 256 instructions. (b) Execution trace of the given program: Instruction Cycle PC AC CTR PTR Location: Location: Location: Location: 6DE 6DF 6E0 A5B Initially 0014 000A 0005 FFFF 9B C350 F3A 0D9 Fetch 9C C350 F3A OD9 Execute 9C 0014 F3A 0D9 0014 000A 0005 06DE FFFF 0014 000A 0005 FFFF Fetch 9D 0014 F3A 0D9 0014 000A 0005 FFFF 76DF Execute 9D 0014 F3A 6DE 0014 000A 0005 FFFF 000A FFFF Fetch OF 0014 F3A 6DF 0014 Execute 9E 0014 002 6DF FFFF 0014 Fetch 9F 0014 002 6DF 0014 Execute 9F 0008 002 6DF FFFF 0014 FFFF 0014 0014 Fetch A000C8 002 6DF Execute A0 00C8 002 GEO Fetch A 00C8 002 6E0 Execute A1 00C8 001 6E0 0014 0014 6E0 0014 Fetch A2 00C8 001 Execute 900C8 001 6E0 0014 6E0 0014 Fetch 9F 00C8 001 Execute 9F 001 6E0 0014 03E8 001 6E0 0014 03E8 001 GET 0014 Fetch Execute A0 Fetch Execute Al 03E8 03E8 001 6E1 0014 0014 0014 000 6E1 Fetch A2 03E8 000 6E1 Execute A2 03E8 000 6E1 0014 Fetch A3 03E8 000 6E1 0014 Execute A3000A 000 6E1 Fetch 000A 000 6E1 0014 Execute A4 000A 000 6E1 Fetch 0014 0014 000A 000 6E1 0014 Execute A5 000A 000 6E1 0014 9002 41A3 8727 A545 BF9E 41A3 8727 A545 BF9E 5003 1A5B CCD3 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF DODA 000A 000A In a hypothetical computer, the processor has four registers: an 8-bit Program Counter (PC), a 16-bit Accumulator (AC), a 16-bit Counter (CTR), and a 12-bit Pointer (PTR). The memory is divided into words each of which is 16-bit long. Each word can hold either an instruction or a piece of data. For each instruction X, the four most significant bits (denoted by X15-12) represent an opcode. The rest of the instruction (denoted by X11-0) can be either an address or a value of an operand. The table below explains some of the instructions supported by the processor. Opcode (binary) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 Operation Load AC from a memory location whose address is X1-1-0. Store AC into a memory location whose address is X11-0. Add to AC the contents of a memory location whose address is the value of PTR. The result is saved to AC. 1100 Subtract from AC the contents of a memory location whose address is the value of PTR. The result is saved to AC. Multiply AC times X₁10. The result is saved to AC. Divide AC by X11-0. The result is saved to AC. Reset AC. Load PTR with X11-0. Increment PTR (by one). Load CTR with X11-0. Decrement CTR (by one). If CTR is not 0, branch to an instruction whose address is X70 (i.e., load PC with X7-0), else continue normally (i.e., do not change PC). Halt execution. Given the following program: Address (Hexadecimal) 05D 05E 05F 060 061 062 063 064 065 066 Contents (Hexadecimal) 03BE 73BF 9002 2FFF 8000 A333 BF60 5003 15D3 CFFF Show, using the table below, the execution trace of that program by filling in the contents of every register and memory location after the fetch cycle and after the execute cycle of every instruction. All values are in hexadecimal. Instruction Cycle PC AC CTR PTR Initially 5D B300 F43A 0C8 03BE Fetch SE B300 F43A OC8 Execute 5E 0007 F43A OC8 Fetch Execute 73BF CFFF Fetch Execute *** VAL *** *** *** *** .... *** *** Location: 3BE 0007 0007 0007 ..... ... Location: Location: Location: 3C0 3BF 5D3 000A FFFF 000A FFFF 000A FFFF +44 0001 0001 0001 *** 44* ... *** (a) PC is 8-bit long. Thus, the maximum program length is 2³ = 256 instructions. (b) Execution trace of the given program: Instruction Cycle PC AC CTR PTR Location: Location: Location: Location: 6DE 6DF 6E0 A5B Initially 0014 000A 0005 FFFF 9B C350 F3A 0D9 Fetch 9C C350 F3A OD9 Execute 9C 0014 F3A 0D9 0014 000A 0005 06DE FFFF 0014 000A 0005 FFFF Fetch 9D 0014 F3A 0D9 0014 000A 0005 FFFF 76DF Execute 9D 0014 F3A 6DE 0014 000A 0005 FFFF 000A FFFF Fetch OF 0014 F3A 6DF 0014 Execute 9E 0014 002 6DF FFFF 0014 Fetch 9F 0014 002 6DF 0014 Execute 9F 0008 002 6DF FFFF 0014 FFFF 0014 0014 Fetch A000C8 002 6DF Execute A0 00C8 002 GEO Fetch A 00C8 002 6E0 Execute A1 00C8 001 6E0 0014 0014 6E0 0014 Fetch A2 00C8 001 Execute 900C8 001 6E0 0014 6E0 0014 Fetch 9F 00C8 001 Execute 9F 001 6E0 0014 03E8 001 6E0 0014 03E8 001 GET 0014 Fetch Execute A0 Fetch Execute Al 03E8 03E8 001 6E1 0014 0014 0014 000 6E1 Fetch A2 03E8 000 6E1 Execute A2 03E8 000 6E1 0014 Fetch A3 03E8 000 6E1 0014 Execute A3000A 000 6E1 Fetch 000A 000 6E1 0014 Execute A4 000A 000 6E1 Fetch 0014 0014 000A 000 6E1 0014 Execute A5 000A 000 6E1 0014 9002 41A3 8727 A545 BF9E 41A3 8727 A545 BF9E 5003 1A5B CCD3 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 000A 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF DODA 000A 000A
Expert Answer:
Answer rating: 100% (QA)
Lets break down the execution trace for the given program using the opcode definitions provided Initially PC 5D AC B300 CTR F43A PTR 0C8 Location 3BE 0007 Location 3BF 000A Location 3C0 0001 Location ... View the full answer
Related Book For
Posted Date:
Students also viewed these operating system questions
-
To use cache memory, main memory is divided into cache lines, typically 32 or 64 bytes long. An entire cache line is cached at once. What is the advantage of caching an entire line instead of a...
-
All the following questions concern ethyl (2-oxocyclohexane) carboxylate
-
Please answer the two questionsPlease answer all the following questions The measurement which is close to true value is described as accurate precise average error
-
For Table 24.1, suppose you think that you omitted a relevant variable, physicians per capita. Would this harm your results for S or H? Explain your view. Table 24.1 (Model 1) The Effect of Community...
-
One column total of a special journal is posted at month end to only two general ledger accounts. One of these two accounts is Accounts Receivable. What is the name of this special journal? What is...
-
Patter's Pastry Parlor offers eight different kinds of pastry and six different kinds of muffins. In addition to bakery items one can purchase small, medium, or large containers of the following...
-
Question: Donald Waide had a contracting business. He bought most of his supplies from Paul Bingham's supply center. Waide fell behind on his bills, and Bingham told Waide that he would extend no...
-
Garnett Printing Corp. uses a job order cost system.The following data summarize the operations related to the first quarter??s production.1. Materials purchased on account $192,000, and factory...
-
Tiggie's Dog Toys, Inc., reported a debt-to-equity ratio of 1.80times at the end of 2021. If the firm's total debt at year-end was$30 million, how much equity does Tiggie's have on its balancesheet 2...
-
Real option analysis can be used to alter the timing, scale, or other aspects of an investment in response to market conditions. Businesses face the dilemma of whether to invest in a project or...
-
Total test time of a device is 50,000 h. The test is terminated after the first failure. If the PDF of the device TTF is known to be exponentially distributed, what is the probability that the...
-
What is the main objective of a responsibility report for a cost centre?
-
The following output from MINITAB presents a confidence interval for the mean difference between matched pairs. a. What is the point estimate of d? b. How many degrees of freedom are there? c. Fill...
-
What are the top three SME grade VCA platforms?
-
Over the past few decades, hedge funds have become among the most controversial and largest investment vehicles on Wall Street. Critics of hedge funds argue that their high-risk investment strategies...
-
In a test for the difference between two proportions, the sample sizes were n1 = 68 and n2 = 76, and the numbers of events were x1 = 41 and x2 = 25. A test is made of the hypotheses H0: p1 = p2...
-
in how many years will an investment of $500 double at 7.2% compounded quarterly?
-
A supermarket chain is interested in exploring the relationship between the sales of its store-brand canned vegetables (y), the amount spent on promotion of the vegetables in local newspapers (x1)...
-
Give the structure of the product formed when each of the following alkenes reacts with bromine in water: (a) 2-Methyl-2-butene (b) 3-Methyl-1-butene (c) 1-Methylcyclopentene
-
Provide a structural formula for each of the following compounds: (a) 2-Ethyl-1-butanamine (b) N-Ethyl-1-butanamine (c) Dibenzylamine (d) Tribenzylamine (e) Tetraethylammonium hydroxide (f)...
-
We noted in section 13.13 that an NMR spectrum is an average spectrum of the conformations populated by a molecule. From the following data, estimate the percentages of axial and equatorial bromine...
-
Clarkson Inc. purchased \(10 \%\) of the 10,000 shares of common stock in Nashville Inc. for \(\$ 40,000\) in January 2020. Shelton Inc. purchased 35\% of the 10,000 shares of common stock in...
-
On December 31, 2020, Raven Company's portfolio of equity securities was valued at \(\$ 1,800\). The original cost of the investments in the portfolio was \(\$ 1,600\). Raven does not have...
-
On January 1, 2020, Evergreen Inc. purchased 3,750 of the 15,000 outstanding shares of common stock of Nature Net Inc. obtaining significant influence of the company. The shares were purchased for...
Study smarter with the SolutionInn App