HW3_Key - Homework #3: A Solution Chapter 3: Section 3.2...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework #3: A Solution Chapter 3: Section 3.2 (read carefully); Sections 3.3-3.5 (lightly) HW3-1. Do review questions 8-11 on p. 105 (5 pts each) 8) OPCODE is shorthand for operation code . An instruction format can be used to define a straightforward, simple rule for encoding machine instructions in binary notation. As neither the text nor the course slides up to this point state clearly the purpose of an instruction format, most student answers regarding instruction format should receive full credit. 9) An assembler encodes a symbolic program (in binary notation). 10) The MAR (memory address register) is used to hold the address of the memory location that is to be involved in the memory access. The MDR (memory data register) holds the data value associated with the memory access (either the value read from or written to the memory). 11) A program counter (PC) is a CPU register that stores the address of the next instruction to be executed. HW3-2. Do exercises 8a-d (15 pts), 9 (10 pts), 14a (15 pts) starting on p. 107 8a/9: 100 10101 LOAD 21; acc = b 010 10111 MPY 23; acc = b*d; 101 11100 STORE 28; temp = b*d; 100 10100 LOAD 20; acc = a; 000 11100 ADD 28; acc = a + b*d; 101 11000 STORE 24; e = a + b*d or
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
100 10101 LOAD 21; acc = b 010 10111 MPY 23; acc = b*d; 000 10100 ADD 20; acc = a + b*d; 101 11000 STORE 24; e = a + b*d 8b/9 100 10101 LOAD 21; acc = b 010 10110 MPY 22; acc = b*c; 101 11100 STORE 28; temp = b*c; 100 10100 LOAD 20; acc =a;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

HW3_Key - Homework #3: A Solution Chapter 3: Section 3.2...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online