Get AI summaries of any video or article — Sign up free
Understanding Binary, Hexadecimal, Decimal (Base-10), and more thumbnail

Understanding Binary, Hexadecimal, Decimal (Base-10), and more

Corey Schafer·
4 min read

Based on Corey Schafer's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Base-10 numbers are computed by multiplying each digit by a power of 10 based on its position and summing the results.

Briefing

Binary and hexadecimal become much easier once they’re treated as “base systems” built on the same positional idea as everyday base-10 numbers. In base 10, each digit’s place value is a power of 10: the rightmost digit is multiplied by 10^0 (ones), the next by 10^1 (tens), then 10^2 (hundreds), and so on. That’s why 1,234 works out as 1×10^3 + 2×10^2 + 3×10^1 + 4×10^0—each digit contributes its face value times the appropriate power of 10.

The key insight is that binary and hexadecimal use the same method, just with a different base. For binary, the base is 2, so place values are powers of 2. The transcript walks through 1010₂: 1×2^3 + 0×2^2 + 1×2^1 + 0×2^0 = 8 + 0 + 2 + 0 = 10 in decimal. A second example, 1111₂, becomes 1×2^3 + 1×2^2 + 1×2^1 + 1×2^0 = 8 + 4 + 2 + 1 = 15. Once the powers-of-the-base pattern is clear, any binary string can be converted by multiplying each digit (0 or 1) by its corresponding power of 2 and summing.

Hexadecimal uses base 16, which introduces a practical twist: a single digit must represent values from 0 up to 15. Since decimal digits only go 0–9, hexadecimal extends into letters: 10 becomes A, 11 becomes B, continuing through C (12), D (13), E (14), and F (15). The conversion method still relies on positional powers—now powers of 16. The transcript demonstrates BA55₁₆ by mapping B=11 and A=10, then computing 11×16^3 + 10×16^2 + 5×16^1 + 5×16^0 = 11×4096 + 10×256 + 5×16 + 5 = 47701 in decimal.

A real-world application ties the math to how computers store color. RGB values are often written in hexadecimal as three pairs of digits: the first pair is red, the second is green, and the third is blue. For white, the hex form is FF FF FF. Converting one pair shows the pattern: F=15, so 15×16^1 + 15×16^0 = 240 + 15 = 255. Repeating for all three channels yields 255 255 255.

Overall, the takeaway is procedural: treat each digit as a coefficient, multiply by the base raised to the digit’s position index, and sum. With that rule, binary (base 2) and hexadecimal (base 16) stop feeling like special cases and become straightforward variants of the same positional-number system.

Cornell Notes

The transcript explains how base-10 positional notation generalizes to binary and hexadecimal. In base 10, each digit is multiplied by a power of 10 based on its place (10^0 for ones, 10^1 for tens, etc.), and the results are added. Binary replaces the base with 2, so place values become powers of 2; for example, 1010₂ converts to 10 by summing 1×2^3 and 1×2^1. Hexadecimal replaces the base with 16 and uses letters for digits 10–15 (A=10 through F=15); for example, BA55₁₆ becomes 47701 by summing coefficients times powers of 16. The same conversion logic also explains RGB hex color values like FF FF FF turning into 255 255 255.

How does base-10 positional notation determine the value of a number like 1,234?

Each digit’s place corresponds to a power of 10. For 1,234: 1 is in the thousands place (10^3), 2 in the hundreds place (10^2), 3 in the tens place (10^1), and 4 in the ones place (10^0). The total is 1×10^3 + 2×10^2 + 3×10^1 + 4×10^0 = 1,000 + 200 + 30 + 4 = 1,234.

Why does converting 1010₂ to decimal work the same way as converting 1,234 to decimal?

Both rely on positional weights; only the base changes. In binary, the base is 2, so place values are powers of 2. For 1010₂: 1×2^3 + 0×2^2 + 1×2^1 + 0×2^0 = 8 + 0 + 2 + 0 = 10 (decimal). The digits act as coefficients for those powers.

What changes in hexadecimal compared with binary, and how are digits 10–15 represented?

Hexadecimal uses base 16, so place values are powers of 16. The digit set expands because a single hex digit must represent 0–15: 0–9 stay the same, and 10=A, 11=B, 12=C, 13=D, 14=E, 15=F. This mapping lets each hex character be treated as a numeric coefficient in the power-sum calculation.

How is BA55₁₆ converted to decimal?

Map letters to values: B=11 and A=10. Then use powers of 16: BA55₁₆ = 11×16^3 + 10×16^2 + 5×16^1 + 5×16^0. Since 16^3=4096, 16^2=256, 16^1=16, and 16^0=1, the sum is 11×4096 + 10×256 + 5×16 + 5 = 47701.

How do hex RGB values like FF FF FF translate into decimal RGB values?

Each color channel is one byte written as two hex digits. FF means 15×16^1 + 15×16^0 = 240 + 15 = 255. Because white is FF for red, green, and blue, the decimal RGB becomes 255 255 255.

Review Questions

  1. If a binary number has digits dₙ…d₀, what is the general decimal conversion formula using powers of 2?
  2. Convert 1101₂ to decimal using the positional power method.
  3. Convert C3₁₆ to decimal by mapping C to 12 and applying powers of 16.

Key Points

  1. 1

    Base-10 numbers are computed by multiplying each digit by a power of 10 based on its position and summing the results.

  2. 2

    Binary uses the same positional method but with base 2, so place values are powers of 2.

  3. 3

    Hexadecimal uses base 16 and extends digit symbols: A=10 through F=15, so each hex character becomes a coefficient.

  4. 4

    Converting any base-N number to decimal follows the same pattern: sum (digit value)×N^(position index).

  5. 5

    RGB hex colors split into three two-digit hex pairs (red, green, blue), each converting to a 0–255 decimal value.

  6. 6

    Once the powers-of-the-base rule is understood, binary and hexadecimal conversions become mechanical rather than memorization-based.

Highlights

1010₂ converts to 10 by summing 1×2^3 + 0×2^2 + 1×2^1 + 0×2^0.
Hexadecimal’s letters aren’t arbitrary: A through F directly represent 10 through 15 as numeric coefficients.
BA55₁₆ becomes 47701 through 11×16^3 + 10×16^2 + 5×16^1 + 5×16^0.
White in RGB—FF FF FF—maps to 255 255 255 because each FF equals 255.

Topics

  • Positional Number Systems
  • Binary Conversion
  • Hexadecimal Digits
  • RGB Color Values
  • Base-N to Decimal

Mentioned