1
00:00:05,700 --> 00:00:09,100
Hey everybody was going on this is Caleb with slopestyle.

2
00:00:09,260 --> 00:00:13,580
And in this video we're going to work on understanding hexadecimal.

3
00:00:13,730 --> 00:00:18,740
Hexadecimal is a number system that is used in the computer world and it's really important to know

4
00:00:18,740 --> 00:00:19,090
about.

5
00:00:19,100 --> 00:00:20,700
So we're going to learn how it works.

6
00:00:20,750 --> 00:00:24,430
We're going to compare it to things like binary and our decimal number system.

7
00:00:24,710 --> 00:00:25,360
And let's do it.

8
00:00:25,460 --> 00:00:26,800
Let's dive right in.

9
00:00:26,840 --> 00:00:31,760
So we're going to begin by looking at the two number systems that we're familiar with at this point.

10
00:00:31,850 --> 00:00:34,940
The decimal number system and the binary number system.

11
00:00:34,970 --> 00:00:37,730
Now of course the decimal number system is base 10.

12
00:00:37,730 --> 00:00:43,780
We use this every day 0 through 9 10 values k we use this for pretty much everything.

13
00:00:43,820 --> 00:00:48,010
Then there's the binary number system which is a base 2 system.

14
00:00:48,200 --> 00:00:52,640
This means there are only two values 0 and 1 on or off.

15
00:00:52,640 --> 00:00:59,570
And we've already talked about this but there's another number system called base 16 and that is where

16
00:00:59,570 --> 00:01:01,800
hexadecimal comes into play.

17
00:01:01,820 --> 00:01:08,480
It uses the same numbers from the from the decimal number system 0 through 9 but from 9 we're going

18
00:01:08,480 --> 00:01:11,720
to go up a b c d e f.

19
00:01:11,810 --> 00:01:18,200
And the interesting thing is the value for ABC D E and F are the same as if we were continuing on in

20
00:01:18,200 --> 00:01:28,480
the decimal system so is equal to 10 B 11 C 12 13 14 15 16 values hexadecimal.

21
00:01:28,490 --> 00:01:32,540
So let's take a look at how the base 10 number system works.

22
00:01:32,540 --> 00:01:38,480
We obviously know this we learned this in like elementary school but if we were going to represent the

23
00:01:38,480 --> 00:01:45,800
number 231 in the base 10 system we would put a 2 in the hundreds place or three in the tens place and

24
00:01:45,800 --> 00:01:47,530
a 1 in the ones place.

25
00:01:47,600 --> 00:01:51,950
Now that that represents two hundreds three tens and one one.

26
00:01:52,100 --> 00:01:55,810
But what if we wanted to represent the same number in binary.

27
00:01:55,840 --> 00:01:57,340
OK we know how to do this.

28
00:01:57,350 --> 00:02:03,050
We have 8 channels K ranging from 1 all the way up to 128.

29
00:02:03,350 --> 00:02:12,650
And if we were to put in the value 1 1 1 0 0 1 1 1 that would mean to add 128 plus 64 plus 32 plus four

30
00:02:12,650 --> 00:02:14,170
plus two plus one.

31
00:02:14,360 --> 00:02:20,810
And that gets us a grand total of two hundred thirty one k that's the same representation with a very

32
00:02:20,810 --> 00:02:22,790
different number system.

33
00:02:22,790 --> 00:02:24,040
Now let's move on.

34
00:02:24,050 --> 00:02:26,950
Texas decimal this is really really important stuff.

35
00:02:26,960 --> 00:02:32,870
So like I showed you before hexadecimal has six values above nine.

36
00:02:32,930 --> 00:02:35,300
ABC D E and F.

37
00:02:35,360 --> 00:02:48,680
And like I said A is equal to 10 B 11 12 13 14 and F 15 K and this gets us 16 places K in our base 16

38
00:02:48,680 --> 00:02:49,440
system.

39
00:02:49,850 --> 00:02:54,740
And the way the numbers are going to work are obviously different and you'll see why this is kind of

40
00:02:54,740 --> 00:03:00,110
actually a cool number system and you'll probably also understand why it's not used to write code just

41
00:03:00,110 --> 00:03:04,020
like binary is not directly used to write code anymore.

42
00:03:04,220 --> 00:03:05,570
But take a look.

43
00:03:05,570 --> 00:03:12,140
If we were to use a chart just like I showed you with the base 10 system we still have one place and

44
00:03:12,380 --> 00:03:19,250
if we want to represent a particular number in that channel then the next channel to the left is the

45
00:03:19,250 --> 00:03:21,110
six teens place.

46
00:03:21,110 --> 00:03:24,210
So we go from ones all the way to six teens.

47
00:03:24,250 --> 00:03:24,870
OK.

48
00:03:24,920 --> 00:03:33,020
And what that's going to mean is that if I put an E in the teens place that means that I have 14 16s.

49
00:03:33,050 --> 00:03:38,190
So 14 times 16 if I put a 6 there it would be 6 16s.

50
00:03:38,480 --> 00:03:42,260
Otherwise we're basically putting the value in that place.

51
00:03:42,290 --> 00:03:44,990
Times 16 K that's very cool.

52
00:03:44,990 --> 00:03:50,750
So in this example we have e 7 14 16s and 7 1.

53
00:03:50,750 --> 00:03:55,200
So if we do 14 times 16 we end up with 224.

54
00:03:55,220 --> 00:03:58,340
Add that to 7 and we get 231.

55
00:03:58,340 --> 00:04:04,570
So e 7 is the same thing as 1 1 1 0 0 1 1 0 1 in binary.

56
00:04:04,580 --> 00:04:10,910
The cool thing about hexadecimal is that you can store much bigger values in much smaller space just

57
00:04:10,910 --> 00:04:13,700
by changing to a base 16 system.

58
00:04:13,700 --> 00:04:20,800
Now if we were to take it a step further on every channel you go to the left we go from 1 to 6 teens

59
00:04:20,840 --> 00:04:26,820
and then we end up with 16 to the second power or 256.

60
00:04:26,960 --> 00:04:30,450
Then it would be 16 to the third power to the fourth power to the fifth power.

61
00:04:30,590 --> 00:04:35,770
And the numbers get exponentially larger for every channel just like in binary.

62
00:04:35,780 --> 00:04:43,280
Now if we were to use this example 8 7 we would take eight and multiply it by 16 to the power of two

63
00:04:43,430 --> 00:04:45,110
or 256.

64
00:04:45,110 --> 00:04:52,980
So eight times 256 gets us 2048 then we would add that to what we already have in E which is 224.

65
00:04:53,030 --> 00:04:57,590
Then add that to 7 for a grand total of two thousand two hundred seventy nine.

66
00:04:57,590 --> 00:05:00,080
With only three characters.

67
00:05:00,080 --> 00:05:00,980
Pretty amazing stuff.

68
00:05:00,980 --> 00:05:04,220
So this is hexadecimal it's not very hard to understand.

69
00:05:04,220 --> 00:05:10,920
It's a very easy number system but you know just like binary it's not really human readable you can't

70
00:05:10,920 --> 00:05:15,740
look at a hexadecimal value and say Ah I know what that does in code and that's why.

71
00:05:15,750 --> 00:05:21,090
Thankfully programming languages were written and compilers were built in order to be the go between

72
00:05:21,090 --> 00:05:21,750
for us.

73
00:05:21,750 --> 00:05:28,950
So to recap hexadecimal is a base 16 number system that has values going from zero all the way up to

74
00:05:28,950 --> 00:05:29,630
9.

75
00:05:29,730 --> 00:05:37,110
Then following that we had a B C D E F and those are worth 10 11 12 13 14 and 15.

76
00:05:37,410 --> 00:05:41,290
And when we begin we basically have 16 to the power of zero.

77
00:05:41,370 --> 00:05:44,210
So anything we put in there is just equal to itself.

78
00:05:44,220 --> 00:05:49,920
We have 16 to the power of one which is the 16 channel and anything beyond that is going to be 16 to

79
00:05:49,920 --> 00:05:56,670
the power of two 16 to the power of three four five six and so on we can get exponentially larger numbers

80
00:05:56,670 --> 00:05:58,150
with much less data.

81
00:05:58,170 --> 00:06:00,360
That's why hexadecimal is so great.

82
00:06:00,360 --> 00:06:04,460
Thanks so much for watching this video and yeah this is Caleb with Debb slopes.

83
00:06:04,510 --> 00:06:04,920
Dot.com.
