Now let's compare the number 827.25

_{10}using the four number systems we have discussed. The table below gives the value of this number in binary, octal, decimal, and hexadecimal.

System |
Number |
Base |
Length of # |

Binary | 1100111011.01_{2} |
2 | 12 digits |

Octal | 1473.2_{8} |
8 | 5 digits |

Decimal | 827.25_{10} |
10 | 5 digits |

Hexadecimal | 33B.4_{16} |
16 | 4 digits |

When we order these numbers by the size of the base, we can see a general pattern: the smaller the base, the more digits that are needed to represent the same number. We can also see a special relationship between three of these number systems. Binary, octal, and hexadecimal all have bases that are powers of 2. This relationship allows us to convert between these systems quite easily.

To convert 1473.2

_{8}to binary, we simply replace each digit with an equivalent 3-bit binary number.

Octal |
1473.2 | |||||

1 | 4 | 7 | 3 | . | 2 | |

Binary |
001 | 100 | 111 | 011 | . | 010 |

001100111011.010 |

We can see the 3 to 1 relationship between octal and binary when we compare their bases. Octal has a base of 8 or 2

^{3}and binary has a base of 2 or 2^{1}. As you might guess, binary and hexadecimal have a 4 to 1 relationship since the base of hexadecimal is 16 or 2^{4}. We can also convert easily between binary and hexadecimal using this 4 to 1 relationship.

Hexadecimal |
33B.4 | ||||

3 | 3 | B | . | 4 | |

Binary |
0011 | 0011 | 1011 | . | 0100 |

001100111011.0100 |

Since octal and hexadecimal are easy to convert to binary, they are often used as a shorthand method for writing binary numbers. For example, the code for the color blue in this text is 0033CC

_{16}which is much easier to read and write than the binary number below which is what the computer actually understands.000000000011001111001100

_{2}= BLUE