Welcome to the World of Number Bases!

Ever wondered how a computer, which is essentially a collection of millions of tiny electronic switches, can show you high-definition movies or solve complex math problems? It all starts with how we represent data. In this chapter, we are going to look at Number Bases. While we humans love the number 10 (mostly because we have ten fingers!), computers prefer much simpler systems.

Don't worry if you find math a bit intimidating—we’re going to break this down into easy, bite-sized steps with plenty of tricks to help you along the way!

1. What is a Number Base?

A number base (or radix) is simply the number of digits available in a counting system. It tells you how many different symbols you can use before you have to "carry over" to the next column.

The Three Bases You Need to Know:

  • Decimal (Base 10): The system we use every day. It uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
  • Binary (Base 2): The language of computers. It uses only 2 digits: 0 and 1.
  • Hexadecimal (Base 16): A "shorthand" for binary. It uses 16 symbols: 0-9 and then A-F.

Did you know? Computers use binary because it represents the two states of electricity: On (1) and Off (0). It’s much easier for hardware to distinguish between "power" and "no power" than to try to measure ten different levels of voltage!

Key Takeaway:

The base tells you how many symbols you have. Base 2 has two symbols, Base 10 has ten, and Base 16 has sixteen.


2. Binary (Base 2)

In binary, each column is worth two times the one to its right. We call a single binary digit a bit.

The Binary Place Value Table

To understand binary, we use a table. We always start from the right with the value 1 and double it as we move left:

\(128 | 64 | 32 | 16 | 8 | 4 | 2 | 1\)

How to Convert Binary to Decimal:

Imagine the binary number is a row of "light switches." If the switch is 1, it's on (we count that value). If it's 0, it's off (we ignore it).

Example: Convert 10101000 to Decimal

  1. Put the number in the table:
    \(128(1) + 64(0) + 32(1) + 16(0) + 8(1) + 4(0) + 2(0) + 1(0)\)
  2. Add up the "On" values: \(128 + 32 + 8 = 168\)
  3. Answer: 168

Quick Review: To go from Binary to Decimal, just add up the place values where you see a '1'.


3. Hexadecimal (Base 16)

Binary numbers like 110101101011 are very long and hard for humans to read. Hexadecimal (or "Hex") makes these numbers shorter and easier to manage.

The "Letters" Problem

Because we only have digits 0-9, Hex needs more symbols for the values 10, 11, 12, 13, 14, and 15. We use letters:

  • A = 10
  • B = 11
  • C = 12
  • D = 13
  • E = 14
  • F = 15

Memory Aid: Just remember that A is the first "double-digit" number (10). From there, you can just count on your fingers! B=11, C=12, and so on.

Key Takeaway:

Hexadecimal uses 0-9 and A-F. It is used by programmers to make binary easier to read (e.g., in Color Codes or MAC addresses).


4. Converting Between Bases

The exam requires you to move comfortably between these three systems. Here is the easiest way to do it.

A. Binary to Hexadecimal (The "Group of 4" Trick)

This is the most important shortcut! One Hex digit represents exactly four bits (a nibble).

  1. Split your binary number into groups of 4, starting from the right.
  2. Calculate the decimal value of each group (using 8, 4, 2, 1).
  3. Convert any value over 9 into its Hex letter.

Example: Convert 11101011 to Hex

1. Split: 1110 | 1011
2. Calculate first group (1110): \(8+4+2+0 = 14\). In Hex, 14 is E.
3. Calculate second group (1011): \(8+0+2+1 = 11\). In Hex, 11 is B.
4. Answer: EB

B. Hexadecimal to Binary

Just do the "Group of 4" trick in reverse! Take each Hex digit and turn it into 4 bits.

Example: Convert 3F to Binary

1. 3 in binary (using 4 bits) is 0011.
2. F (15) in binary is 1111.
3. Answer: 00111111

C. Decimal to Binary (The "Subtraction Method")

  1. Look at your place value table: \(128, 64, 32, 16, 8, 4, 2, 1\).
  2. Start from the left (128). Can you subtract 128 from your number?
  3. If Yes: Write a 1 and subtract the value.
  4. If No: Write a 0 and move to the next column.

Common Mistake: Students often forget to write the 0s. Every column must have either a 1 or a 0!


5. Summary Table for Quick Reference

Here is a quick look at how the first few numbers compare:

Decimal | Binary (4-bit) | Hexadecimal
0 | 0000 | 0
5 | 0101 | 5
9 | 1001 | 9
10 | 1010 | A
12 | 1100 | C
15 | 1111 | F


Final Review Checklist

  • Can you list the place values for Base 2? (1, 2, 4, 8, 16...)
  • Do you remember that A=10 and F=15 in Hex?
  • Can you use the "Group of 4" rule to switch between Binary and Hex?
  • Do you know that computers use Binary because of transistors/switches?

Don't worry if this seems tricky at first! Like learning a new language, the more you practice "speaking" in Binary and Hex, the more natural it will feel. Try converting your age or your house number into Binary today!