Hexadecimal explained | Higher than base-10 positional numeral systems
text
Unraveling the Mystery of Bases and Digits
We're back exploring another interesting mathematical concept: positional numeral systems. Today, we'll dive into bases, digits, and what happens when we wander beyond the familiar territory of base 10.
To get started, let's break down the basic steps of understanding this concept:
- Understand what a digit is
- Explore different bases
- Learn about carrying over in different bases
- Experiment with base 16 (hexadecimal)
- Examine how base relationships work
What is a Digit?
As we embark on this journey, it's crucial to understand what a digit is. A digit is a single symbol that represents a number. It serves as a building block in positional numeral systems. In layman's terms, digits are the symbols we use to write down numbers.
Digits and Bases
A base in positional numeral systems tells us how many distinct digits are available. For example, base 2
has 2
digits (0
and 1
), base 3
has 3
digits, and so on. The key thing to remember is that the number of digits matches the base.
- Base 2 (Binary): 0, 1
- Base 3 (Ternary): 0, 1, 2
- Base 4 (Quaternary): 0, 1, 2, 3
- Base 5 (Quinary): 0, 1, 2, 3, 4
- Base 6 (Senary): 0, 1, 2, 3, 4, 5
- Base 7 (Septenary): 0, 1, 2, 3, 4, 5, 6
- Base 8 (Octal): 0, 1, 2, 3, 4, 5, 6, 7
- Base 9 (Nonary): 0, 1, 2, 3, 4, 5, 6, 7, 8
- Base 10 (Decimal): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
The real fun starts when we venture beyond base 10
. What happens when our base gets higher than 10
? Let's explore this by examining base 16
, also known as hexadecimal.
Hexadecimal: Base 16
In base 16
, counting starts to look a bit different. After the digits 0-9, we still need additional symbols to represent numbers before carrying over. The symbols chosen are often letters. For example, the number 10
in base 16
is represented by the symbol A.
let hexDigits = ["0", "1", "2", ..., "9", "A", "B", ..., "F"];
By the time we get to 15
, we represent it as F. Once we get to 16
, we carry over and start again, now with 1 in the 16s
place.
To summarize, we've seen that we can continue this pattern all the way up to base 36
, using the letters of the alphabet after running out of numerical digits.
Beyond Base 36
We could technically keep going beyond base 36
. To do this, we would just need to invent new symbols. So, if we're feeling adventurous, the sky's the limit!
We chose to work with hexadecimal because it's prevalent in computing, mostly because of its neat relationship with base 2
.
In closing, it's vital to remember that bases using unfamiliar symbols help us understand the difference between numbers (the abstract concept) and numerals (the symbols used to represent numbers).
We're now ready to delve deeper into patterns involving bases and digits, which we'll do in the next lesson. Stay tuned!
quiz
resources
updates
Committed by on