×
Get Full Access to Electrical Engineering: Principles & Applications - 6 Edition - Chapter 8 - Problem P8.45
Get Full Access to Electrical Engineering: Principles & Applications - 6 Edition - Chapter 8 - Problem P8.45

×

# Write a subroutine called MUL3 that rounds the content of ISBN: 9780133116649 150

## Solution for problem P8.45 Chapter 8

Electrical Engineering: Principles & Applications | 6th Edition

• Textbook Solutions
• 2901 Step-by-step solutions solved by professors and subject experts
• Get 24/7 help from StudySoup virtual teaching assistants Electrical Engineering: Principles & Applications | 6th Edition

4 5 1 409 Reviews
29
2
Problem P8.45

Write a subroutine called MUL3 that rounds the content of A to its nearest integer multiple of 3. Assume that the initial content of A is a positive integer in twos-complement form. Memory location \$0A can be used for temporary storage. Include comments in your source code to explain the program and its operation to human readers. (Hint: Repeatedly subtract 3 until the result becomes negative. If the result is 3, the original content of A was a multiple of 3 and should not be changed. If the result is 2, the original content of A was one plus an integer multiple of 3, and we should subtract one from the original number to obtain the nearest multiple of 3. If the result is 1, the original content of A is 2 plus an integer multiple of 3, and we should add 1 to the original number to obtain the nearest multiple of 3.)

Step-by-Step Solution:
Step 1 of 3

Step 2 of 3

Step 3 of 3

##### ISBN: 9780133116649

The full step-by-step solution to problem: P8.45 from chapter: 8 was answered by , our top Engineering and Tech solution expert on 11/15/17, 04:19PM. This textbook survival guide was created for the textbook: Electrical Engineering: Principles & Applications, edition: 6. Electrical Engineering: Principles & Applications was written by and is associated to the ISBN: 9780133116649. Since the solution to P8.45 from 8 chapter was answered, more than 240 students have viewed the full step-by-step answer. The answer to “Write a subroutine called MUL3 that rounds the content of A to its nearest integer multiple of 3. Assume that the initial content of A is a positive integer in twos-complement form. Memory location \$0A can be used for temporary storage. Include comments in your source code to explain the program and its operation to human readers. (Hint: Repeatedly subtract 3 until the result becomes negative. If the result is 3, the original content of A was a multiple of 3 and should not be changed. If the result is 2, the original content of A was one plus an integer multiple of 3, and we should subtract one from the original number to obtain the nearest multiple of 3. If the result is 1, the original content of A is 2 plus an integer multiple of 3, and we should add 1 to the original number to obtain the nearest multiple of 3.)” is broken down into a number of easy to follow steps, and 154 words. This full solution covers the following key subjects: multiple, original, content, result, Integer. This expansive textbook survival guide covers 17 chapters, and 1349 solutions.

Unlock Textbook Solution