A number base is a system for writing quantities using place values that are powers of a chosen base. Decimal uses base 10, but computers often use binary, octal, and hexadecimal because they match digital on and off states neatly. Learning number bases helps students see that the value of a digit depends on both the digit and its position.
It also builds a stronger understanding of place value, arithmetic, and how data is represented in computing.
In any base b, the rightmost place is b^0, then b^1, b^2, and so on moving left. To convert a number to decimal, multiply each digit by its place value and add the results. To convert from decimal to another base, repeatedly divide by the base and read the remainders from last to first.
Binary, octal, and hexadecimal are closely related because 8 = 2^3 and 16 = 2^4, so groups of 3 binary bits make one octal digit and groups of 4 binary bits make one hex digit.
Understanding Math: Number Bases (Binary, Octal, Hex)
A base changes the rules for carrying during counting. In base five, the available digits are zero through four. After four comes one zero, meaning one group of five and no single units.
After one four comes two zero. The written form changes, but the amount being counted does not. This is useful because it separates a number from its representation.
The same quantity can have several correct names, depending on the base. A digit is valid only when it is smaller than the base.
For example, a seven cannot appear in an octal number. Leading zeroes usually do not change a value, though they can matter when a computer expects a fixed number of bits.
Binary works well in electronics because a circuit can reliably distinguish two ranges of voltage. These are treated as zero and one. A binary digit is called a bit.
Bits are collected into fixed size groups so that machines can store and process information in regular blocks. Eight bits are commonly called a byte. A byte can represent a small whole number, a letter, part of an image, or one piece of a sound recording.
The meaning comes from an agreed code. The bit pattern itself has no built in meaning. This is why computers can use the same hardware to handle text, photos, music, and program instructions.
Octal and hexadecimal make long binary patterns easier for people to read. Instead of copying a long row of zeroes and ones, a programmer can split it into equal groups and replace each group with one shorter digit. This conversion is exact, not an estimate.
Zeroes may be added to the left of a binary pattern to complete a group. Those extra zeroes do not change its value. Hexadecimal is common in computing because one hex digit matches four bits neatly.
Students may meet it in web colour codes, memory addresses, file data, and debugging tools. In colour codes, pairs of hex digits describe how much red, green, and blue light a screen should use.
Arithmetic follows the same ideas in every base, but the carry point changes. In binary, adding one and one produces one zero with a carry of one, because two single units form one group of two. Borrowing works in the same way.
Borrowing one from the next place gives two units in binary, eight units in octal, or sixteen units in hexadecimal. Checking each step matters more than memorising patterns. Write the base beside a number when there could be confusion.
Fractions use places to the right of the point too. In binary, those places represent halves, quarters, eighths, and smaller parts. Some decimal fractions have no short binary form, which helps explain tiny rounding errors in calculators and computer programs.
Key Facts
- In base b, place values are powers of b: ..., b^3, b^2, b^1, b^0.
- The decimal value of digits d_n...d_1d_0 in base b is d_n b^n + ... + d_1 b + d_0.
- Binary is base 2 and uses digits 0 and 1.
- Octal is base 8 and uses digits 0 through 7.
- Hexadecimal is base 16 and uses digits 0 through 9 and A through F, where A = 10 and F = 15.
- Binary grouping rules: 3 bits convert to 1 octal digit, and 4 bits convert to 1 hexadecimal digit.
Vocabulary
- Base
- The base is the number of different digit symbols used in a place-value number system.
- Place value
- Place value is the value assigned to a digit because of its position in a number.
- Binary
- Binary is the base 2 number system that uses only the digits 0 and 1.
- Octal
- Octal is the base 8 number system that uses the digits 0 through 7.
- Hexadecimal
- Hexadecimal is the base 16 number system that uses digits 0 through 9 and letters A through F.
Common Mistakes to Avoid
- Using digits that are not allowed in a base, such as writing 8 in octal. Each base only permits digits from 0 up to one less than the base.
- Reading a nondecimal number as if it were decimal, such as treating 1010 base 2 as one thousand ten. The same written digits can represent different values in different bases.
- Writing division remainders in the wrong order when converting from decimal. Remainders must be read from last to first because the final remainder becomes the leftmost digit.
- Forgetting that hexadecimal letters are digit values, not variables. A, B, C, D, E, and F stand for 10, 11, 12, 13, 14, and 15.
Practice Questions
- 1 Convert 110101 base 2 to decimal.
- 2 Convert 345 decimal to hexadecimal using repeated division.
- 3 Explain why grouping binary digits into sets of 4 makes hexadecimal conversion easier than converting the whole binary number directly to decimal first.