Read the entire problem set thoroughly before beginning to write your solutions.
Your solution should be sent via email as an attachment or in the body of the email. Please use a standard format that I can read. If you are not sure, check with me in advance.
Do the problem set on your own. If you need assistance, ask questions in class, in group conference, via email, or make an appointment with me to discuss the assignment in more detail.
Write each of the following decimal representations in binary and hexadecimal. Show your for converting from decimal to binary.
13 65 190
Complete the table to show how each sequence of eight bits can be interpreted in multiple different ways. The first row is filled in as an example. For the column labeled "ASCII", show the character that corresponds to the last seven bits of each sequence.
| binary | hexadecimal | decimal | ASCII |
|---|---|---|---|
| 11000100 | C4 | 196 | D |
| 01011001 | |||
| 11101111 | |||
| 10100001 |
Complete the following truth table. What can you conclude from the sixth and eighth columns of the table?
a b c a AND b a AND c (a AND b) OR (a AND c) b OR c a AND (b OR c) ----------------------------------------------------------------------------- F F F F F F F F
From the course text, Chapter 6 (p. 285): exercise 4.
A palindrome is a sequence of symbols that is unchanged when its order is reversed. For example, the base-10 representations of the numbers 313, 44, and 508805 are all palindromes. Likewise the binary numbers 101, 0110, and 10011001 are all palindromes. For this problem we consider the problem of determining if a three-bit binary number is a palindrome.
Write a truth table representing the three-bit palindrome-testing function assuming its input bits to be a, b, and c, and its output bit to be p. (It should output a 1 only in the cases where the values of a, b, and c, in that order, represent a palindrome.)
Use the sum-of-products algorithm to write a Boolean expression for p in terms of ANDs, ORs, and NOTs of a, b, and c.
By thinking about the structure of the problem (or by looking at the structure of the truth table), how can you simplify the Boolean expression?
Would the same simplification be available if you were solving the four-bit palindrome problem? Explain.
Translate each of the following instructions into the machine language and assembly language specified in Figure 6.5 (p. 248). Write the machine code both in binary and in hexadecimal. For example, "Decrease the contents of memory cell 24 by one" would be translated to:
| binary | 0110 0000 0001 1000 |
|---|---|
| hexadecimal | 6018 |
| assembly | DECREMENT 24 |
Clear the contents of memory cell 132.
Increment the contents of memory cell 132.
Load the contents of memory cell 132 into the accumulator.
Add the contents of memory cell 132 to the accumulator.
Store the contents of the accumulator to memory cell 88.
If these instructions are executed in succession, after they are all completed, what (in decimal notation) is stored in memory cell 132? In memory cell 88? In the accumulator?
Consider the following machine-language program (the address column is presented in decimal):
address machine instruction assembly instruction ---------------------------------------------------- 2 0010000000010001 CLEAR 17 3 0010000000010000 4 0000000000001111 5 0111000000010000 6 1010000000001100 7 0000000000010001 8 0011000000001110 9 0001000000010001 10 0100000000010000 11 1000000000000100 12 1110000000010001 13 1111000000000000
Indicate next to each machine instruction its assembly language equivalent. (The first instruction has been translated for you.)
Assume immediately prior to the execution of this program, the value of memory cell 14 is 9, the value of memory cell 15 is 3, and the value of the program counter is 2. Show the step-by-step execution of this program indicating the values (in decimal) of memory cells 16 and 17 after each step. What value is output (in decimal)?
In a clear and concise sentence, explain what this algorithm does.
Modern electronic computers represent everything as sequences of bits. Does this mean that computers force the world into a false dichotomy - that everything must somehow be represented as black or white? Or does this say something about the way the world really works? Or does this question impose a false dichotomy on the answerer? Explain.