Exercises
Here are some exercises that complement the concepts presented in this book. Their numbering refers to the chapter with which they are associated.
Chapter 1. Exercises
E1.1. Recall the definition of a register.
Answer. A register is a memory with one-word capacity in the format n bits, which operates at the speed of the component that integrates it. This means that a microprocessor’s register does not slow down its operation when it is accessed.
E1.2. Cite some elements (logic components or logic sub-sets) that are involved in the implicit addressing of a microprocessor.
Answer. The registers and the stack (so the main memory for modern MicroProcessor Units (MPU)).
E1.3. Calculate the maximum number of Imax instructions if the function field of the instruction word has a format f fixed at 5 bits.
Answer. Imax = 2format = 25 = 32 instructions.
E1.4. If the addressing mode field has a format a = 3 bits and the instruction set is symmetrical (cf. § 3.1.3), calculate the number of possibilities for coding one instruction, also taking the previous question into account.
Answer. There are 23 possible addressing modes. This makes 25 × 23 = 28 possibilities for coding one instruction.
E1.5. Inverse problem. The MCS6502 MPU has 151 legal operation codes. What is the minimal format c of this word of code?
Answer. You have to go through the logarithm function. This will give:
Cmin = [log2(151)] + 1 = 8
Chapter 2. Exercises
E2.1. Specify the correction algorithm for an addition ...
Get Microprocessor 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.