Monday, December 17, 2012

Comparing Decimal, Hexadecimal, and Binary


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^32^22^12^0
8421
  •  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.
DecimalHexadcimalBinary
2^32^22^12^0
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
10A1010
11B1011
12C1100
13D1101
14E1110
15F1111

Other Resources

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

A+

Network+

Security+