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

## Метаданные

- **Канал:** Corey Schafer
- **YouTube:** https://www.youtube.com/watch?v=ZL-LhaaMTTE
- **Дата:** 15.12.2014
- **Длительность:** 10:43
- **Просмотры:** 202,617
- **Источник:** https://ekstraktznaniy.ru/video/12798

## Описание

An introduction to binary and hexadecimal numbers. In this video, we will learn how to better understand binary and hexadecimal numbers. First, we will go over the base-10 system that we use on a daily basis. Once we grasp how a base-10 system is calculated, it will be much easier for us to understand how binary, hexadecimal, base-8, or any other base-n number is calculated.


✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Secon

## Транскрипт

### <Untitled Chapter 1> []

hey guys how's it going in this video we're going to be taking a look at how to understand binary and heximal numbers I think the best way to understand how binary and heximal uh numbers work is to First understand how our base 10 system works that we use on a daily basis and whenever I say base 10 I mean that if I was to write out 1 2 3 4 then you can look at that number and you know that it's 1,234 um but let's look at why that is and how we get that number um so if we look at this we know that the four is in the ones place there's a three in the T place two in the hundreds and a one in the thousands so if I write this out to where you can see that the four is in the ones place three in the 10 two in the 100 one in the Thousand so to get our result down here of 1,234 what's really happening is we are taking the value that's in the thousand's position here and we're multiplying it by a th so let me erase that so we have 1 * a th000 which is a th000 and then we're adding that to the next position which is the hundred's position and the value in that position is 2 so 2 * 100 is 200 and then we move on to the next position 10 3 * 10 is 30 and then down to the ones position 4 * 1 is 4 and when we add all those up we get 1,234 now this might seem self-explanatory to you guys because the base 10 system is what we use on a daily basis uh but let me show you how it relates to understanding binary and heximal um so our positions here the thousands position the hundreds position the 10 and the one they can actually be Rewritten um to make these shorter because if we were to you know expand this out to the millions position then that'd be a lot of zeros to write in there um so we can actually rewrite that using exponents and let me copy this and paste this up here okay so now these are the exact same values but using exponents instead so 10 to the zeroth power is 1 10 to the 1 power is 10 to the second power which is 10 2ar or 10 * 10 is 100 and 10 the 3 power 10 * 10 is 1,000 and so now we could calculate this just the same way that we did before this would be 1 * 10 3r + 2 * 10 2 + 3 * 10 1st + 4 * 10 the 0o um so the reason that this is called base 10 is because if you look um at the base of the exponents uh there's a 10 here so um that's how it relates to Binary and hex aimal is uh whenever we do binary we just switch out this base 10 for a base two um so let me go down here and grab these so you can understand this a little bit better here let me paste these in okay and then two to the zeroth power is still one two to the first power is two to the second power is 2 * 2 which is four 2 to the 3 power 2 * 2 is 8 okay and so let's go ahead and look at a binary number here let's do 10 and then let me fill in these spots here 1 0 and now we just calculate this the exact same way that we calculated uh our uh base 10 number we do one * 10 3 which is equal to 8 so we have 8 plus and now this is a zero here so no matter what we multiply this with it's going to be zero so 8 + 0 plus 1 time 2 to the 1st which is 2 so 8 + 2 which is 10 and then 10 + 0 um is zero so this 10 in decimal or base 10 is equal to 10 okay and let's do one more quick example here uh this time let's do 1 one one and let me fill these in okay so now when we calculate this out it is 1 * 2 3r which is 8 + 1 * 2 which is 4 1 uh the 1st which is 2 + 1 * 2 to the zeroth power which is 1 so we have 8 + 4 + 2 + 1 so 1 1 in decimal see that' be 12 14 15 now once you understand how to do

### 1111 = 15 [5:33]

these calculations then you can plug in any number here for your base so for example heximal is base 16 um what's confusing about heximal and what trips people up whenever they're looking at it for the first time is that uh base 16 uh how do you represent 16 numbers using only a single digit um because we only have 0 through 9 and what they do is they carry over into the alphabet so for example here if I had eight 9 and then instead of starting back at zero uh in heximal it carries over to a which is 10 B 11 C 12 D 13 e 14 f is 15 and then it carries back over to zero because it's base 16 so then it goes to zero um so let's take a look at this how we would calculate um a heximal value so let me copy this so now we're using base 16 instead and now these values here I already got them copied out here okay so 16 to the zeroth power is 1 16 to the 1 power is 16 squar is 256 and 16 * 16 is 4096 and let's go ahead and work through an example so we can see what this is like so say we had a heximal value that was B

### BA55 [7:12]

a55 so let's go ahead and write this out up here b a 55 okay so now to start off we have B which if you remember a was 10 B is 11 so B which is 11 * 16 3r which is 4096 so 11 * 496 plus a which is 10 * 16 sared which is 256 so 10 * 256 plus 5 * 16 to the 1st which is 16 so 5 * 16 and then plus 5 * 16 to the zeroth power which is 1 so 5 * 1 which is 5 so + 5 = 47701 so just to make sure that we got that right let's go to our programming calculator and let's go to base 16 here we'll type in ba a55 and then we will switch back over to our decimal and it gives us 47701 so uh so that was right so by now you should be able to convert pretty much any number from B from binary or hexad decimal over into uh base 10 um one that uh one example that you might see a lot is whenever you see uh RGB color values online um so say for example here um if you have the color white that is FF FF and this is

### FF-FF-FF [9:10]

calculated these first two values here are the red value uh the second green value and the last two values are the blue value um so if you were to convert these over into uh base 10 then it would just look like this here so we have F which is 15 so 15 * 16 to the 1 power which is 16 so 15 * 16 equal 240 and then F which is 15 * 1 which is 15 so 240 + 15 = 255 so a white RGB color value is actually 255 255 um so hopefully this tutorial was useful for you guys uh hopefully you're now able to convert values from uh binary or hex decimal or base eight uh whatever Base number it is hopefully now you feel comfortable um converting that number into base 10 and you understand how all these uh calculations work but if you guys do have any questions you know feel free to ask in the comments uh be sure to subscribe for uh future videos and thanks for watching
