If you're working on a certification exam such as the CompTIA A+, Network+, or Security+ certification, you might need to review your knowledge of decimal, hexadecimal, and binary. It's basic knowledge, but it's needed and I've found that some people never learned it.

## Decimal

Decimal numbers use a base of ten and include the numbers 0 to 9.

## Hexadecimal

Hexadecimal numbers use a base of 16 and include the numbers 0 to 9 and the characters A to F.

## Binary

Binary numbers use a base of 2 and include only the numbers 0 and 1. The following table shows how binary is raised to different powers to give different values in a four bit binary number.

2^3 | 2^2 | 2^1 | 2^0 |
---|---|---|---|

8 | 4 | 2 | 1 |

- Any number raised to the power of 0 is 1 so 2^0 is 1.
- Any number raised to the power of 1 is itself so 2^1 is 2
- 2 raised to the power of 2 is the same as 2 x 2 (2 squared or4)
- 2 raised to the power of 3 is the same as 2 x 2 x 2 (2 cubed or 8)

## Comparing Numbers

The following table compares each of these number systems side by side.

Decimal | Hexadcimal | Binary | |||
---|---|---|---|---|---|

2^3 | 2^2 | 2^1 | 2^0 | ||

0 | 0 | 0 | 0 | 0 | 0 |

1 | 1 | 0 | 0 | 0 | 1 |

2 | 2 | 0 | 0 | 1 | 0 |

3 | 3 | 0 | 0 | 1 | 1 |

4 | 4 | 0 | 1 | 0 | 0 |

5 | 5 | 0 | 1 | 0 | 1 |

6 | 6 | 0 | 1 | 1 | 0 |

7 | 7 | 0 | 1 | 1 | 1 |

8 | 8 | 1 | 0 | 0 | 0 |

9 | 9 | 1 | 0 | 0 | 1 |

10 | A | 1 | 0 | 1 | 0 |

11 | B | 1 | 0 | 1 | 1 |

12 | C | 1 | 1 | 0 | 0 |

13 | D | 1 | 1 | 0 | 1 |

14 | E | 1 | 1 | 1 | 0 |

15 | F | 1 | 1 | 1 | 1 |

## Other Resources

If you plan on taking the A+, Network+ or Security+ exams to give yourself the CompTIA Trio, check out these resources: