Problem

Internally in a computer, with few exceptions, all computation is done using binary number...

Internally in a computer, with few exceptions, all computation is done using binary numbers. Output, however, often uses ASCII, which is formed by appending 011 to the left of a BCD code. Thus, an algorithm that directly converts a binary integer to a BCD integer is very useful. Here is one such algorithm:

1. Draw lines to bound the expected BCD decades to the left of the binary number.

2. Move the binary number one bit to the left.

3. Add 0011 to each BCD decade containing a binary value > 0100.

4. Repeat steps 2 and 3 until the last bit in the binary number has been moved into the least significant BCD decade position.

5. Read the BCD result.

(a) Execute the algorithm for the binary number 1111000.


(b) Execute the algorithm for the binary number 01110010111.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 1