Arithmetic Assignment
For this assignment, you will demonstrate subtraction using nine’s complement arithmetic in decimal and show how to perform bit shifts in binary.
Background Material
Requirements
Prepare a video presentation in which you solve the following problems. SHOW ALL WORK. You can record the video using your cell phone and do the work on pencil and paper, or you can use screencasting software and do the work on the computer screen.
Part A
For each of the following problems, show how to perform subtraction using diminished radix complement in decimal (in other words, nine’s complement):
- 12 - 7
- 10 - 10
- 147 - 61
- 2278 - 1152
- 51 - 6
- 10 - 24
- 121 - 399
- 200 - 300
- 9 - 10
- 7 - 77
Part B
This section uses special notation borrowed from the Java programming language:
- a << b means perform a left shift of b places on the binary value a. The answer should have the same number of bits as a has. For example, 1010 << 1 == 0100.
- a >>> b means perform a logical right shift of b places on the binary value a. Again, the answer should have the same number of bits as a has. For example, 1010 >>> 1 == 0101.
- a >> b means perform an arithmetic right shift of b places on the signed binary value a, once again keeping the same number of bits in the answer. For example, 1010 >> 1 == 1101.
Show how to perform each of the following shift operations:
- 0000 << 2
- 0001 << 2
- 1001 << 1
- 1100 << 1
- 1111 << 4
- 0010 >>> 1
- 0010 >> 1
- 1001 >>> 3
- 1001 >> 3
- 1111 >>> 4
Grading
Please review the Numbers and Arithmetic Rubric before submitting this assignment to Moodle.