CSC 200 Study Guide - Quiz Guide: Circular Shift, Instruction Register, Machine Code

28 views3 pages
21 Feb 2023
Course
Professor
CSC 210 Assignment 2 Spring 2023 Name: ____________________
1. For the machine instruction 709F, the op-code field is ___ and the operand field is ____.
Write the instruction as an actual 16-bit pattern. _____________________(6 points)
2. Suppose a block of data is stored in the memory cells of the machine described in Appendix C
from address B8 to C2, inclusive. List their memory addresses. (4 points )
3. Assume that the machine described in Appendix C uses memory-mapped I/O and that the
address A5 is the location within the printer port to which data to be printed should be sent. If
register 8 contains the ASCII code for the letter A, what machine language instruction should
be used to cause that letter to be printed at the printer? (4 points )
4 . Perform the indicated operations: (4 points each)
(a) 10110011 (b) 01011001 (c) 11101011
XOR 11011111 AND 10011011 OR 11001110
5. Translate the following instruction into machine language described in Appendix C. (4 points each)
(1) XOR the bit patterns found in register 6 and register 7 and place the result in register 8.
(2) LOAD register 0 with the bit pattern found in memory cell whose address is 12.
(3) JUMP to the instruction located in the memory cell 69 if the content of the register 3 is
equal to the content of register 0. Otherwise, follow the normal execution order.
(4) ROTATE the bit pattern found in register 4 to the right 2 times.
6. Suppose you want to place 0s to the right 4 bits of a byte and leave the other 4 bits
unchanged. What mask must you use together with what operation? (4 points )
7. Suppose you want to complement the right 4 bits of a byte and leave the other 4 bits
unchanged. What mask must you use together with what operation? (4 points )
8. Performing a 3-bit right circular shift (rotation) on the following bit pattern. (4 points )
11000011
9. Suppose the memory cells at addresses 10 through 12 in the machine described in Appendix C
contain the following bit patterns. ( 4 points )
Address Contents
10 23
11 34
12 56
a. What is the 1st instruction that will be executed if we start the machine with its program
counter containing 10?
b. What is the 1st instruction that will be executed if we start the machine with its program
counter containing 11?
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Name: ___________________: for the machine instruction 709f, the op-code field is ___ and the operand field is ____. Write the instruction as an actual 16-bit pattern. _____________________(6 points: suppose a block of data is stored in the memory cells of the machine described in appendix c from address b8 to c2, inclusive. If register 8 contains the ascii code for the letter a, what machine language instruction should be used to cause that letter to be printed at the printer? (4 points ) Perform the indicated operations: (4 points each) (a) 10110011 (b) 01011001 (c) 11101011. What mask must you use together with what operation? (4 points : suppose you want to complement the right 4 bits of a byte and leave the other 4 bits unchanged. What mask must you use together with what operation? (4 points : performing a 3-bit right circular shift (rotation) on the following bit pattern. (4 points )

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related textbook solutions

Related Documents

Related Questions