The hypothetical machine of Figure 3.4 has two I/O instructions:
0011 = Load AC from I/O
0111 = Store AC to I/O
In these cases, the 12-bit address identifies a particular I/O device. Show the program execution (using the format of Figure 3.5) for the following program:
1. Load AC from device 5.
2. Add contents of memory location 940.
3. Store AC to device 6.
Assume that the next value retrieved from device 5 is 3 and that location 940 contains a value of 2.
The answer is
Step1: 3005 -> IR
Step2: 3->AC
Step3: 5940->IR
Step4: 3+2=5->AC
Step5: 7006->IR
Step6: AC-> Device6
How did the step 3 5940 come from and step 5 how did 7006 come from?
The hypothetical machine of Figure 3.4 has two I/O instructions: 0011 = Load AC from I/O...
The hypothetical machine of Figure 3.4 also has two I/O instructions:0011 = Load AC from I/O0111 = Store AC to I/OIn these cases, the 12-bit address identifies a particular I/O device. Show the program execution (using the format of Figure 3.5) for the following program:1. Load AC from device 5.2. Add contents of memory location 940.3. Store AC to device 6.Assume that the next value retrieved fromdevice 5 is 3 and that location 940 contains a value of 2.Example of Program...
[20 pts] 5- Consider the following hypothetical 1-address assembly instruction called "Store Accumulator Indirect with Post-increment" of the form STA (x)- : M(M(x)) ← AC, M(x) ← M(x)+1 Suppose we want to implement this instruction on the pseudo-CPU discussed in class augmented with a temporary register TEMP. An instruction consists of 16 bits: A 4-bit opcode and a 12-bit address. All operands are 16 bits. PC and MAR each contain 12 bits. AC, MDR, and TEMP each contain 16 bits,...
Pertaining to the assembly language: Modify the Figure below to show the actions necessary for a call instruction that saves the return address on the stack instead of a register. Step Action 1 Memory address DPC]. Read memory, IR Memory data, PC [PC] 4 2 Decode instruction RA [R9] 3 PC-Temp CPC], PC CRA] 4 RY IPC-Temp 5 Register LINK [RY]
1) We would like to design a bus system for 32 registers of 16 bits each. How many multiplexers are needed for the design? Select one: 5 16 1 4 32 2) The basic computer can be interrupted while another interrupt is being serviced. Select one: True False 3) If the Opcode bits of an instruction is 111, then the basic computer instruction type is either memory-reference or input-output. Select one: True False 4) The content of AC in the...
all info in picture 3. Let's say that Marie added a new command: inc X that adds 1 to the value stored at memory location X. a. Is there an opcode available for this instruction? If so, what opcode would you use? b. Show the RTN for the inc command. Bus 0 Main Memory MAR 2 PC MBR ALU AC InREG 6 OutREG 16-bit bus 4. Write a MARIE program that computes and outputs the absolute value of an input...
(2+2+1 5 points) Problem 10.1: simple cpu machine code = The following program has been written for the simple central processing unit introduced in class. The table below shows the initial content of the 16 memory cells. The first column denotes the memory address. Machine Code Assembly Code Description 001 1 0001 0 010 0 1111 1 001 1 0000 3 101 1 0100 110 1 0110 4 111 1 0000 5 6 001 0 001 1 100 1 0001...
Consider the following assembly code. 1. 1, LOAD R, #1 2, LOADS, #1 3, LOAD T, #(k-3) 4. ADD AC, R, S 5. LOAD R, S 6. LOAD S, AC 8. BRP 4, T 9. STOR AC, M where R, S, T, AC are is addressing and BRP stands for "branch if positive". sters, M is a memory location, # indicates immediate (a) Explain what this code computes (assuming that k is a natural number greater than two). (6 marks)...
Here is the listing file for a program for the 68HC12 SOA02 SB7 $OC23 SOAOD 00000A02 OA02 SA A6 OA04 B6 0c23 BB 0A0D OA0A 86 E7 1: 2: org staa ldaa adda 3: 4: a) #SE7 1daa bra 5: loop 6: 7: OA0C 20 Fc a. I have "erased" the address of the add instruction. What is it? b. Also, notice also that I have erased the target of the branch ("loop"). Even so, you should be able to...
Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped with a Micro-1 processor Memory contains an array of integer cells: int cell[] = new int[CAP]; where CAP is the capacity of memory. Initially this is set to 256. Internally, the Micro-1 processor is equipped with eight 32-bit data/address registers and two 32 bit control registers: PC, the program counter, contains the address of the next instruction to execute. IR, the instruction register, contains...
Question 12 The datapath for 5-stage MIPS pipelined architecture is given below. IFAD IDEX EX/MEM MEMWB Add 4 Add Add result Shift left 2 PC Address Instruction ALU Instruction memory Read register 1 Read data 1 Read register 2 "Registers Read Write data 2 register Write data Zero ALU result Address Read data Data memory Write data 16 32 Sign- extend Choose all the components that generate a useful result during the execution of the following instruction: LW R1, 8(R2)...