If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Algebra (all content)

### Course: Algebra (all content)>Unit 1

Lesson 14: Binary and hexadecimal number systems

The hexadecimal number system is a way of counting that uses 16 different symbols instead of just the ten we're used to. It uses the numbers 0-9 like we do, but it also uses the letters A-F to represent the numbers 10-15. This system is useful in computer science because it can represent large numbers in a shorter, more compact way.

## Want to join the conversation?

• i get the the binary base is useful because electricity can only be on or off, so there are only 2 options, but what about the 16 base? is it really used only because it takes less space? there must be other reasons...
• If it was just to save space we would use a higher base than 16. Base-16 is a convenient way for humans to "see" binary as we would only need to learn 16 different patterns.
`0 - 0000 | 8 - 10001 - 0001 | 9 - 1001 2 -0010 | A - 10103 - 0011 | B - 10114 - 0100 | C - 11005 - 0101 | D - 11016 - 0110 | E - 11107 - 0111 | F - 1111`
If we know what pattern goes with what number/letter we can convert a large Binary number to Hexadecimal for ease of use.
Example:
If we split the Hexadecimal 6F28A to look like this 6 | F | 2 | 8 | A
We can see the patterns in 01101111001010001010 which split up look like
0110 | 1111 | 0010 | 1000 | 1010

Here is a tool to play with http://www.binaryhexconverter.com/hex-to-binary-converter
• Base-11 has 11 symbols (0 → 9 and A), base-12 has 12 symbols (0 → 9, A and B). They have letters! I wonder when these number systems were invented. Middle Ages? Early modern period?
• You can get all the way up to base 62 using capital letters, lowercase letters, and numbers as digits.
• How does hexadecimal work in other languages? A,B,...F are all part of the English language, so what about Arabic, or Mandarin? Do they use English letters?
• Not sure I got this one correct stated on the video: AF3 Base-16/Hexadecimal
10*10+15+3 = 118
Solved by A^2 (Tens) + F fifteens + 3 ones = 10*10+15+3=118 Does this look correct?
(1 vote)
• If you want to convert AF3 from hexadecimal system to the decimal one, the result will be: AF3 (in 16-base) = 10*16^2 + 15*16^1 + 3*16^0 = 2803 (in 10-base).

Don't mistake the base!
• For really high base systems, what symbols do you use if there are no more letters left?
• Is FF=255? If so then that is why they use it for color coding because the intensity is from 0-255(or FF)
• Yes. 255 just represents 2 bytes - the binary number 1111 1111 or the hexadecimal number FF.
• What happens with higher bases when you run out of letters
• Since we are arbitrarily constructing these systems in a cultural context that is already decimal based (with some applications of binary and hexadecimal), we must do as Sandeep mentioned -- that is, apply other symbols to provide a convention for use. However, there are cultures from antiquity (and currently to a lesser extent) whose number systems were base-60, base-12, or base-20. These cultures had their own system of writing, which means they had the symbols such as lines, small dots, reeds, large dots, and others to represent these amounts.
• FF is 255 and I'm a fourth grader doing this stuff. Seriously I'm a fourth grader.
• It doesn't matter how old you are, the happiness of knowing even a tiny bit about the universe is wonderful!
• What's the highest base number system that's used for any practical purpose?
• This is the highest complete unit, but it is not exactly the same as a base system. We still write the amounts of degrees for the angle measures in decimal numerals, and we rarely* keep track of the number of full rotations since trigonometric functions are cyclical (i.e., the sine of 360 degrees is equal to the sine of 1080 degrees). This better resembles a modular system (where we start over after we reach the "full amount").
*The primary application I can think of where the number of rotations would matter is in physics with a rotational motion of an object where a full rotation could translate into linear distance as with a wheel or where a full rotation has used or produced a certain amount of joules (energy through work).
• hex means 6 but why we using 16 in hexadecimal system?