## Computer Science: An Overview: Global Edition (12th Edition)

a. There are two parts in the given base ten representations. First is integer part and the other is the fractional part. $4\frac{1}{2}$ is equivalent to $4.5$ Step $1 :$ To convert the integer part of the base ten representations which is $(4)$ to its equivalent binary representations, we have to divide the number by $(2)$ until the quotient is zero, as shown in the table below. $$\begin{array}{|c|c|c|}\hline \text { remainder } & {\text { divide by } 2} & {\text { number }} \\ \hline 0 & {2} & {4} \\ \hline 0 & {2} & {2} \\ \hline 1 & {2} & {1} \\ \hline & {2} & {0\ (stop)} \\ \hline\end{array}$$ Therefore, the binary representation is the sequence of the remainder from bottom to top: $(4)_{10} = (100)_{2}$ Step $2 :$ To convert the fractional part of the base ten representations which is $( \frac{1}{2} = 0.5)$ to its equivalent binary representation, we have to multiply the fractional number by $(2)$ and keep track of the resulting integer and fractional part. Continue multiplying by $(2)$ until you get a resulting fractional part equal to zero. Then just write out the integer parts from the results of each multiplication from the top to bottom as shown below: $0.5 * 2 = 1.0$ fractional part equal to zero. Then just write out the integer parts from the results of each multiplication from the top to bottom. Therefore, $(0.5)_{10} = (0.1)_{2}$ Step $3 :$ concatenate integer part and fractional part Therefore, $(4.5)_{10} = 100 + 0.1 = (100.1)_{2}$ ---------- b. $2\frac{3}{4}$ is equivalent to $2.75$ Step $1 :$ convert integer part (2) to binary $$\begin{array}{|c|c|c|}\hline \text { remainder } & {\text { divide by } 2} & {\text { number }} \\ \hline 0 & {2} & {2} \\ \hline 1 & {2} & {1} \\ \hline & {2} & {0 (stop)} \\ \hline\end{array}$$ Therefore, $(2)_{10} = (10)_{2}$ Step $2 :$ convert fractional part (0.75) to binary $0.75 * 2 = 1.5 = 1 + 0.5$ $\ \ 0.5 * 2 = 1 \ \ \ = 1 + 0.0$ fractional part equal to zero. Then just write out the integer parts from the results of each multiplication from top to bottom. Therefore, $(0.75)_{10} = (0.11)_{2}$ Step $3 :$ concatenate integer part and fractional part Therefore, $(2.75)_{10} = 10 +0 .11 = (10.11)_{2}$