馃攳
Hexadecimal number system | Applying mathematical reasoning | Pre-Algebra | Khan Academy - YouTube
Channel: Khan Academy
[0]
- [Voiceover] We're all
familiar with the base 10
[2]
number system, were
often called the decimal
[5]
number system, where we have 10 digits
[9]
Zero, one, two, three, four,
five, six, seven, eight, nine.
[13]
Now, we started to see that we can
[14]
have alternate number system.
[16]
We can have a base two number system,
[18]
or it's the binary number system,
[19]
where instead of 10 digits
you only have two digits.
[23]
Each place, instead of being a power
[25]
of ten is going to be a power of two.
[28]
Now you can imagine that
we can keep extending this.
[30]
We can extend to base three,
four, five, six, seven,
[33]
eight, nine, or we could even go above 10.
[37]
What I want to show you
in this video is a fairly,
[43]
heavily used number system
that is larger than,
[46]
or that has more digits than
base 10, and that base is 16.
[51]
Base 16, often called the hexadecimal.
[57]
Hexadecimal number system.
[61]
As you can imagine, instead of only
[64]
having 10 digits, it is going to have 16.
[68]
What are those digits going to be?
[71]
As we'll see, instead of
the place is being powers
[73]
of two or powers of ten,
there will be powers of 16.
[76]
Let's see, we can reuse
the existing 10 digits
[79]
from the decimal number system.
[83]
We can reuse zero, one, two, three,
[87]
four, five, six, seven, eight, nine,
[92]
but then we're going to need
to have six more digits.
[97]
The convention is to use
the first six letters.
[101]
A, B, C, D, E, and F.
[107]
You might say this is crazy.
[108]
These are letters, not numbers,
but remember these are just
[112]
arbitrary squiggles of
ink on a piece of paper.
[115]
These are just arbitrary symbols
[117]
that we're grown to associate with things.
[119]
You're grown to associate
this symbol right over here
[123]
with eight thing, with
the word eight which you
[126]
associate with when you
see that many objects.
[129]
If you're thinking in hexadecimal,
this isn't the letter A
[133]
that makes you want to
say "ah", or the letter B
[135]
that makes you want to say "bababababa".
[137]
This is, literally, this represents
[140]
if you had 10 things laying around.
[143]
You would say, "I have
A things over there."
[145]
If you have 11, you'd say,
"I have B things over there."
[148]
12, C things.
[150]
13, instead of saying,
"I have 13 things there",
[152]
"I have D things there."
[153]
Instead of saying, "I have 14",
[155]
you could say, "I can
have E things there."
[157]
Instead of saying, "I have 15",
[158]
you could say, "I have F things there."
[161]
Now, how does that help?
[163]
Well, let's see if we can represent
[164]
the same number 231, or 231 in decimal.
[168]
If we can represent that
same number in hexadecimal.
[174]
What I'll do is I'll give
you what the number is,
[176]
and then I'll show you how we convert it.
[178]
I'll show you the place value,
[179]
and I'll show you how we convert it.
[181]
231 in hexadecimal.
[184]
231 in hexadecimal is the number E seven.
[192]
E seven.
[193]
Once again, you're
like, "This looks crazy.
[195]
"This is like I'm playing
like battleship or something."
[197]
What's E seven?
[199]
This is a number and I would say yes.
[201]
This is a number.
[202]
Now remember, base 16.
[204]
What are these place values represent?
[206]
This first place represents
16 to the zero power
[210]
or still represents the ones place.
[213]
This is the ones place.
[214]
This is seven ones.
[216]
Now, what is this place here represents?
[219]
Well, in base 10, that
was 10 to the first power.
[222]
In base two, that was
two to the first power.
[224]
On base 16, this is going to be,
[227]
I'll leave those there,
[227]
in base 16, this is going
to be 16 to the first power.
[232]
This is literally, well let me write out
[235]
the word, this is literally sixteens.
[238]
This is E sixteens plus seven ones.
[244]
Let me write that down.
[245]
This is E sixteens plus seven ones.
[255]
That's what this number represents.
[258]
Now, if we want to start rewriting this
[260]
or re-conceptualizing it in our decimal
[263]
number system, what is E sixteens?
[264]
Well, the E if we think
in decimal, E is 14.
[269]
E is 14.
[273]
This is really, we can
really think of this
[276]
if you want to think them decimals.
[277]
This is 14 sixteens.
[280]
It's 14 sixteens.
[282]
Well, that's just the
same thing as 14 times 16.
[285]
14 times 16 is equal to 224.
[289]
Maybe I should do that in same color.
[291]
This thing right over
here is going to be 224.
[297]
14 sixteens, 14 times 16
is 224 plus seven ones.
[305]
Well, 224 plus 7 is
going to be give you 231.
[310]
Hopefully, you can appreciate it.
[311]
You can represent the same quantity
[313]
in any of these different number systems.
[317]
In any number that you
can represent in decimal,
[320]
you can also represent
that number in binary,
[324]
or in hexadecimal, or in
base three, or in base 60,
[329]
or in base 31, whatever you want to do.
[333]
You might have noticed the pattern.
[335]
The more symbols that we have,
[338]
so in base 16, you have 16 symbols,
[341]
the less place values we need
[343]
to represent the same quantity.
[344]
One way to think about it is each
[346]
of the places are
containing more information.
[349]
This is one of 16 characters.
[351]
While this over here is
only one of two characters.
[353]
This is one of ten characters.
[355]
The more symbols that
you have, the more digits
[358]
that you could put in each
place, the less places
[361]
that you need to represent
a given quantity.
[366]
Another way to think about it
is when you have a high base,
[368]
like base 16, as you take
powers of 16, the next
[373]
place right over here would be 16 squared,
[378]
which, of course, is two
hundred and, wait a minute, 256.
[383]
You're clearly going to be able
to represent bigger numbers
[387]
faster, I guess you could
say, or with less digits.
[389]
It's just an interesting thing to observe.
[392]
But hopefully, you're
going to kick out of,
[394]
as much of a kick out of base 16
[396]
as I do, and it's actually useful.
[398]
This actually is used if
you look at most web pages.
[402]
If you look at the actual code for there,
[404]
or I guess you could say the
formatting line, the HTML
[407]
for the webpage, when they specify colors,
[410]
they tend to specify in hexadecimal.
[412]
That's because they're specifying
the colors, the intensity
[415]
of the red, the green, or the
blue, between zero and 255.
[420]
Two digits of hexadecimal
are perfect for that,
[424]
because if you think
about it, what is F F?
[431]
What would this be if you
rewrite it in the decimal number
[434]
system, and I encourage you
after this video is done,
[437]
I encourage you to do that to
figure that out on your own.
[441]
If you really want to do something fun,
[442]
let me give you another one.
[443]
Try to figure out what A F three is.
[448]
Again, this isn't very specialized.
[450]
I just wanted to give you another
[451]
interesting thing to work on.
Most Recent Videos:
You can go back to the homepage right here: Homepage





