Solution to Show that the hexadecimal expansion of a positive integer can be obtained from its binary … - Sikademy
Author Image

Archangel Macsika

Show that the hexadecimal expansion of a positive integer can be obtained from its binary expansion by grouping together blocks of four binary digits, adding initial zeros if necessary, and translating each block of four binary digits into a single hexadecimal digit.

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question

We have to show that the hexadecimal expansion of a positive integer can be obtained from its

binary expansion by grouping together blocks of four binary digits adding initial zeros if

necessary, and translating each block of four binary digits into a single hexadecimal digit. 

The binary number is given as

\left(\ldots b_{13} b_{12} b_{11} b_{10} b_{03} b_{02} b_{01} b_{00}\right)_{2}

Adding up to 3 leading zeros if necessary, write the binary expansion as

\left(\ldots b_{i 3} b_{i 2} b_{i 1} b_{i 0} \ldots\right)_{2}

The binary expansion is expressed as

\begin{aligned} \left(\ldots b_{11} b_{10} b_{03} b_{02} b_{01} b_{00}\right)_{2} &=\left(2^{0} b_{00}+2^{1} b_{01}+2^{2} b_{02}+2^{3} b_{03}\right)+\left(2^{4} b_{10}+2^{5} b_{11}+2^{6} b_{12}+2^{7} b_{13}\right) \\ &+\left(2^{8} b_{20}+2^{9} b_{21}+2^{10} b_{22}+2^{11} b_{23}\right)+\ldots \\ \left(\ldots b_{11} b_{10} b_{03} b_{02} b_{01} b_{00}\right)_{2} &=\left(2^{0} b_{00}+2^{1} b_{01}+2^{2} b_{02}+2^{3} b_{03}\right)+2^{4}\left(2^{0} b_{10}+2^{1} b_{11}+2^{2} b_{12}+2^{3} b_{13}\right) \\ &+2^{8}\left(2^{0} b_{20}+2^{1} b_{21}+2^{2} b_{22}+2^{3} b_{23}\right)+\ldots \end{aligned}

We know that

 \begin{aligned} &\left(2^{0} b_{i 0}+2^{1} b_{i 1}+2^{2} b_{i 2}+2^{3} b_{i 3}\right)=b_{i 0}+2 b_{i 1}+4 b_{i 2}+8 b_{i 3} \\ &\left(2^{0} b_{i 0}+2^{1} b_{i 1}+2^{2} b_{i 2}+2^{3} b_{i 3}\right)=h_{i} \end{aligned}

Where h_{i} is a hexadecimal digit

Therefore

\begin{aligned} &\left(\ldots b_{13} b_{12} b_{11} b_{10} b_{03} b_{02} b_{01} b_{00}\right)_{2}=\left(h_{0}\right)+2^{4}\left(h_{1}\right)+2^{8}\left(h_{2}\right)+\ldots \\ &\left(\ldots b_{13} b_{12} b_{11} b_{10} b_{03} b_{02} b_{01} b_{00}\right)_{2}=16^{0}\left(h_{0}\right)+16^{1}\left(h_{1}\right)+16^{2}\left(h_{2}\right)+\ldots \end{aligned}

This is the hexadecimal expansion for

\left(\ldots h_{3} h_{2} h_{1} h_{0}\right)_{16}

Hence proved that the hexadecimal expansion of a positive integer can be obtained from its

binary expansion by grouping together blocks of four binary digits adding initial zeros if

necessary, and translating each block of four binary digits into a single hexadecimal digit. 


Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-942-qpid-797