From Table G.1 we see that 3 bits are needed to represent any octal digit, and 4 bits to are needed to represent any hexadecimal digit. We can use this fact to convert between binary, octal, and hexadecimal systems, as shown in Figure G.1.

The procedure for converting an octal to a binary is shown by the arrow marked (a). We can prove that replacing each octal digit by its 3-bit equivalent binary value gives the right result:

173_{8} | = 1×8^{2} | + 7×8^{1} | + 3×8^{0} |

= 1×(2^{3})^{2} | + 7×(2^{3})^{1} | + 3×(2^{3})^{0} | |

= 1×2^{6} | + 7×2^{3} | + 3 | |

= (001)×2_{2}^{6} | + (111)×2_{2}^{3} | + (011 ... |

Start Free Trial

No credit card required