Convert the following decimal numbers to BCD and add them. Convert the result back to decimal to check your answer.
(a) 52 + 63 (b) 78 + 69
\begin{array}{l} \text{(a)}& 52 &=& 0101 & 0010 \\ &+63 &=& \underline{0110 }& \underline{0011} \\ &\text{Sum }&=& 1011 & 0101 \\ &&&&\nwarrow \\ &\text{Add }6 &= & \underline{0110 }& &&\text{invalid BCD number} \\&&& 1~ 0001 &0101 &=& 0001 \quad 0001 \quad0101_{BCD} \\ &&&&&=& \quad\overset{\nwarrow }{1}\qquad \overset{\uparrow }{1} \qquad \overset{\nearrow }{5_{10}} \end{array} .
\begin{array}{l} \text{(b)} & 78 &=& 0111 & 1000 & \\ &+69 &=& \underline{0110 }& \underline{1001} &\swarrow \text{ Both groups of 4 BCD bits are invalid}\\ &\text{Sum }&=& 1110 & 0001 \\ &&&& \nwarrow \\ &&&&\text{carry} \\ &\text{Add }6& =& \underline{~~~~~~~~} & \underline{0110} \\ &&&1110 & 0111 \\ &\text{Add }6 &=& \underline{0110} & \underline{~~~~~~~~} \\ &&&10100& 0111 &= 0001 \quad 0100 \quad 0111_{BCD} \\ &&&&&= \quad\overset{\nwarrow }{1} \qquad \overset{\uparrow }{4} \qquad\overset{\nearrow }{7_{10}}\end{array}