Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Problem 1

a. In what way are general-purpose registers and main memory cells similar? b. In what way do general-purpose registers and main memory cells differ?

Problem 3

Suppose a block of data is stored in the memory cells of the Vole from address \(0 \mathrm{x} 98\) to \(0 \mathrm{xA} 2\), inclusive. How many memory cells are in this block? List their addresses.

Problem 8

Suppose a machine language is designed with an op-code field of 4 bits. How many different instruction types can the language contain? What if the op-code field is increased to 6 bits?

Problem 21

Suppose the memory cells at addresses \(0 x A F\) through \(0 \mathrm{xB} 1\) in the Vole contain the following bit patterns: \(\begin{array}{cc}\text { Address } & \text { Contents } \\ \text { 0xAF } & \text { 0xB0 } \\ \text { 0xB0 } & \text { 0xB0 } \\ \text { 0xB1 } & \text { 0xAF }\end{array}\) What would happen if we started the machine with its program counter containing \(0 \mathrm{xAF}\) ?

Problem 23

In each of the following cases, write a short program in Vole to perform the requested activities. Assume that each of your programs is placed in memory starting at address \(0 \times 00\). a. Move the value at memory location \(0 x D 8\) to memory location \(0 \mathrm{xB} 3\). b. Interchange the values stored at memory locations \(0 \times D 8\) and \(0 \times B 3\). c. If the value stored in memory location \(0 x 44\) is \(0 x 00\), then place the value \(0 x 01\) in memory location \(0 \mathrm{x} 46\); otherwise, put the value \(0 \mathrm{xFF}\) in memory location \(0 x 46\).

Problem 35

Identify both the mask and the logical operation needed to accomplish each of the following objectives: a. Put \(1 \mathrm{~s}\) in the upper 4 bits of an 8-bit pattern without disturbing the other bits. b. Complement the most significant bit of an 8 -bit pattern without changing the other bits. c. Complement a pattern of 8 bits. d. Put a 0 in the least significant bit of an 8-bit pattern without disturbing the other bits. e. Put \(1 \mathrm{~s}\) in all but the most significant bit of an 8-bit pattern without disturbing the most significant bit. f. Filter out all of the green color component from an RGB bitmap image pixel in which the middle 8 bits of a 24 -bit pattern store the green information. g. Invert all of the bits in a 24-bit RGB bitmap pixel. h. Set all the bits in a 24-bit RGB bitmap pixel to 1 , indicating the color white.

Problem 37

Identify a logical operation (along with a corresponding mask) that, when applied to an input string of 8 bits, produces an output string of all 0 s if and only if the input string is 10000001 .

Problem 39

Describe a sequence of logical operations (along with their corresponding masks) that, when applied to an input string of 8 bits, produces an output byte of all 0 s if the input string both begins and ends with 1s. Otherwise, the output should contain at least one 1 .

Problem 42

What would be the result of performing a 2-bit right circular shift on the following bytes represented in hexadecimal notation? (Give your answers in hexadecimal notation.) a. \(0 \times 3 \mathrm{~F}\) b. \(0 \times 0 \mathrm{D}\) c. \(0 \mathrm{xFF}\) d. \(0 \times 77\)

Problem 44

Write a Vole program that reverses the contents of the memory cell at address \(0 x 8 C\). (That is, the final bit pattern at address \(0 \times 8 \mathrm{C}\) when read from left to right should agree with the original pattern when read from right to left.)

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Get Vaia Premium now
Access millions of textbook solutions in one place

Recommended explanations on Computer Science Textbooks