Answer to Question #264320 in Discrete Mathematics for khan

Question #264320

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.


1
Expert's answer
2021-11-12T05:44:23-0500

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}\n\n\\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) \\\\\n\n&+\\left(2^{8} b_{20}+2^{9} b_{21}+2^{10} b_{22}+2^{11} b_{23}\\right)+\\ldots \\\\\n\n\\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) \\\\\n\n&+2^{8}\\left(2^{0} b_{20}+2^{1} b_{21}+2^{2} b_{22}+2^{3} b_{23}\\right)+\\ldots\n\n\\end{aligned}"

We know that

 "\\begin{aligned}\n\n&\\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} \\\\\n\n&\\left(2^{0} b_{i 0}+2^{1} b_{i 1}+2^{2} b_{i 2}+2^{3} b_{i 3}\\right)=h_{i}\n\n\\end{aligned}"

Where "h_{i}" is a hexadecimal digit

Therefore

"\\begin{aligned}\n\n&\\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 \\\\\n\n&\\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\n\n\\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. 


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS