# Homework Solution: Internally in the computer, with few exceptions, all numerical computation is done…

Internally in the computer, with few exceptions, all numerical computation is done using binary numbers. Input, however, often uses ASCII, which is formed by appending 011 to the left of a BCD code. Thus, an algorithm that directly converts a BCD integer to a binary integer is very useful.  Here is one such algorithm. 1) Draw lines between the 4‐bit decades in the BCD number 2) Move the BCD number one bit to the right. 3) Subtract 011 from each BCD decade containing a binary value > 0111. 4) Repeat Steps 2‐3 until the leftmost 1 in the BCD number has been moved out of the least significant decade position. 5) Read the binary result to the right of the least significant decade position a) Execute the algorithm for the BCD number 0111 0101. b) Execute the algorithm for the BCD number 0011 0110 1000.

Internally in the computer, with scant exceptions, total numerical calculation is effected using binary collection. Input, thus-far, repeatedly uses ASCII, which is cemed by appending 011 to the left of a BCD adjudication. Thus, an algorithm that instantly converts a BCD integer to a binary integer is very serviceable.  Here is single such algorithm.

1) Draw lines between the 4‐piece decades in the BCD compute

2) Move the BCD compute single piece to the fair.

3) Subtract 011 from each BCD decade containing a binary compute > 0111.

4) Repeat Steps 2‐3 until the leftmost 1 in the BCD compute has been moved quenched of the lowest indicative decade pose.

5) Read the binary product to the fair of the lowest indicative decade pose

a) Execute the algorithm ce the BCD compute 0111 0101. b) Execute the algorithm ce the BCD compute 0011 0110 1000.

## Expert Response      