Binary_Numbers_1
May 05, 2026 15:19
· 11:59
· English
· Whisper Turbo
· 2 speakers
This transcript expires in 22 dagar.
Uppgradering til permanent lagring →
Showing only
0:01
S…
Speaker 1 (Binary_Numbers_1)
So in this video, we'll learn the fundamentals of binary numbers. Binary numbers means there are numbers written in base 2. Normally, we think of numbers as written in base 10 often. And so we'll talk about the basics of binary numbers and how it works in base 2. But basically, it's exactly the same thing as base 10 numbers, except we're going to use a base of 2 instead.
0:26
S…
Speaker 1 (Binary_Numbers_1)
So you'll see a lot of analogies. So an important part of this is to learn how to convert numbers from one base to another. So we'll convert numbers from base 10 to base 2 and back. These basic principles, by the way, can be used to go between any two bases, but the bases we'll be most interested in are.
0:45
S…
Speaker 1 (Binary_Numbers_1)
base 10, because humans use them most readily, and base 2, because computers are usually built to use base 2. So for us in this course, they'll be the most important ones, but they're just one of many choices for bases. So the reverse conversion is also important. So we're going to go to base 10 to base 2, and then we'll talk about how to get from base 2, which the computer works with, back to base 10 for human consumption of the output.
1:12
S…
Speaker 1 (Binary_Numbers_1)
It is possible that real numbers may have a finite or an infinite representation in the various bases, and we'll learn a little bit about how to handle these non-terminating representations, although part two of this video will have a little bit more information about that.
1:30
S…
Speaker 1 (Binary_Numbers_1)
All right, so here's a typical binary number. So it's written in this form. The only two numbers in base two are zero and one. So whereas normally we think of numbers as being given the ones position, the tens, the hundreds, the thousands, and the tenths and the hundredths on the other side of the decimal point, in base two, this is the ones, the twos, the fours, the eights, the sixteens, the 32, keep on going. And this is going to be the one-halves and the one-quarter slots.
1:59
S…
Speaker 1 (Binary_Numbers_1)
All right, so when you see a number written out like this, it means that this is the 2 to the 0, 2 to the 1, 2 to the 2, 2 to the 3 position. So there's a 1 and a 2 to 3 position. There's a 1 and a 2 to the 2 position. There's a 0 and a 2 to the 1 position. And there's a 1 and a 2 to the 0 position. And then 0 and 1 in the fractional positions here. So when you add these all up, there's an 8, there's a 4, there's a 1. And then over here, there's a 0 and a 1 quarter.
2:27
S…
Speaker 1 (Binary_Numbers_1)
So altogether, adding that all up, 13 for an integer part, 1 quarter for a fractional part. And what we've just done is converted a base 2 number to base 10. We started with a number like this, and we found the base 10 equivalent. This is just how you write the number 13 and 1 fourth. To go in reverse is a little more work. So if you have a base 10 number, you want to convert to base 2.
2:50
S…
Speaker 1 (Binary_Numbers_1)
Well, the first thing to know is we're always going to do the integer part and the fractional part separately. So we're going to take, if we had, for example, 13 and a quarter, we would start with the 13 separately, convert it to base 2. And then we would take the 1 fourth and convert that to base 2. So we'll always do it in two parts, integer part and fractional part. So here's what you do with the integer part. We're going to convert 13 in base 10 to a base 2 number. And what we do is divide by 2.
3:18
S…
Speaker 1 (Binary_Numbers_1)
successively. So we divide 2 into 13. It goes in 6 times with a remainder. It doesn't go in evenly. It goes in, right, 2 goes into 13 6 times. That's 12 with a remainder of 1. Then we do the same thing to the number we have here, 6. Okay, so 2 goes into 6 3 times. This time, no remainder. It goes in evenly. 2 goes into 3 1 time with a remainder of 1. And 2 goes into 1 no times with a remainder of 1.
3:46
S…
Speaker 1 (Binary_Numbers_1)
Now we're down to zero here. So we're done with this calculation. And now we just have to read off the answer. We always work away from the decimal point is a good way to think of it. So imagine there's a decimal point up here. We take the remainders and that gives you the number where we're working away from the decimal point. So because this is an integer, the numbers occur in the left of the decimal point. So it's going to be 1, 1, 0, 1 point in that order. 1, 1, 0, 1 decimal point.
4:16
S…
Speaker 1 (Binary_Numbers_1)
Right? So 13 in base 10 is equal to 1, 1, 0, 1 in base 2. So we've converted the integer. And we can always check our answer by doing what we just did in the last slide. You know, there's a 1 here for the 2 to the third, a 1 for the 2 to the second, 0, and a 1. Add them all up, and you get 13.
4:35
S…
Speaker 1 (Binary_Numbers_1)
Check. Okay, for the fraction part, so we take the one quarter, and now we multiply by two. So the integer part, you divide by two successively. Fractional part, you multiply by two successively. So you multiply the one quarter times two. Two times a quarter is one half with no integer part. So now we separate into fraction and integer parts, and we're going to grab the integer parts. Here we go.
5:00
S…
Speaker 1 (Binary_Numbers_1)
the remainders. Here we're going to grab the integer parts for our binary number.
5:04
S…
Speaker 1 (Binary_Numbers_1)
Okay, so we get a zero here. We keep on going. 1 half times 2. So this 1 half over here is the next number we multiply by 2. You get half times 2 is 1. And now we convert the 1 into the fractional part of the integer part. And so it's all integer part. This time it's 1. And now why are we done? Well, if we keep on going here, we're going to multiply 2 times 0 gets 0. 2 times 0 gets 0. So from then on, it's all zeros. So in other words,
5:33
S…
Speaker 1 (Binary_Numbers_1)
And again, we're always working away from the decimal point. But now it has the opposite meaning, because we're working to the right, because this is a fractional part. We're on the right side of the decimal place, decimal point. So it's 0, 1, followed by all zeros. Because we're going to now multiply by 0 a million times. But of course, we don't put the trailing zeros on just as in base 10. We leave off the trailing zeros. But formally speaking, there's a bunch of zeros that go out to infinity after this one.
6:03
S…
Speaker 1 (Binary_Numbers_1)
Okay, but usually we just leave it like that, as we do with a decimal number. All right, so checking our answer, yes, it's zero times a half plus one times a quarter, that's a quarter, and then we put everything together. So 13 and a quarter base 10 is 1101.01, which is where we started on the last slide, if you go back and check.
6:23
S…
Speaker 1 (Binary_Numbers_1)
So some fractions correspond to non-terminating representations, non-terminating representations in binary and decimal. That means infinite representations. And you already know that because one-third, right, is equal to 0.3333 infinitely. That's exactly one-third if you go out infinitely far with the threes. So that happens in base 10, and it also occurs in base 2.
6:48
S…
Speaker 1 (Binary_Numbers_1)
So how does one third look in base two? Let's see the infinite repeating number that we get in base two. Well, how do we convert a fraction to binary? Sorry. So we're converting the one third to binary now. So one third time we multiply by two, right? So that's what we did in the last slide, right? We multiplied by two. So we do the same thing here.
7:15
S…
Speaker 1 (Binary_Numbers_1)
So 1 third times 2 is 2 thirds, and we want to break that into the fraction part plus the integer part. So it's all fraction now. This number is less than 1, so 2 thirds and no integer part. Now we take the 2 thirds and multiply by 2. 2 thirds times 2 is 4 thirds. Now there's a fraction part and an integer part, so we can take the integer part out. Now we're at 1 third, and we want to do the same thing again.
7:40
S…
Speaker 1 (Binary_Numbers_1)
1 third times 2 is 2 thirds. That's 2 thirds plus no integer part. And you might notice right now that we've done this before. We got 2 thirds plus 0 before. We got 2 thirds plus 0 again. And what's going to happen if we do the next step? We're going to multiply 2 thirds times 2. Well, we already did that, and we saw the result. So we know what's going to happen next, the same thing that happened before. And now the same thing is going to happen that happened here. So we're doing an infinite repeating.
8:10
S…
Speaker 2 (Binary_Numbers_1)
a sequence here of zero ones, right? So we did a zero one.
8:14
S…
Speaker 1 (Binary_Numbers_1)
then we're going to get a 0, 1 that look exactly the same as this 0, 1. So in fact, as long as you repeat one line here, 1 third plus 1 got repeated. In fact, 2 thirds plus 0 repeated, you know that you're already starting a repetition because every line only depends on the line above it. So once you've repeated a line, in fact, right here at line 3, we've repeated line 1. So we know it's going to just repeat what we've already seen indefinitely, which is 0, 1, 0, 1.
8:44
S…
Speaker 1 (Binary_Numbers_1)
0, 1, 0, 1, infinitely. We usually denote that as a 0, 1 with an overbar, meaning that those numbers are going to repeat infinitely. So you can either say dot, dot, dot, or you can say 0, 1. This is a little more clear about exactly what repeats. The 0 and 1 together repeat infinitely. This one is not so clear about that, but this one is clear. So 1 third in base 10 is equal to 0.01 repeated in base 2.
9:12
S…
Speaker 1 (Binary_Numbers_1)
Let's do another example. So how about 0.4? What does it look like? Well, again, to convert to binary, we multiply by 2 because it's a fraction. So we always do the integer part and the fraction part separately. This is all fraction, no integer part. So we multiply by 2. So 0.4 times 2 is 0.8. That's 0.8 plus 0.
9:33
S…
Speaker 1 (Binary_Numbers_1)
0 integer part. We take the 0.8 and do the same thing. 0.8 times 2 is 1.6. Break it into fraction plus integer. Take the fractional part, 0.6, and put it over here. Times 2 is 1.2. 0.2 plus 1. Take the 0.2, put it over here. Times 2 is 0.4 plus 0. Have we repeated yet? No, we have not. There's no repetition yet. They're all different. Now we take the 0.4 times 2, and now we get 0.8 plus 0.
10:00
S…
Speaker 2 (Binary_Numbers_1)
So that's a repeat. As soon as we see a repeat, we can stop and say, this line is the same as this one. So the one after is going to be the same as this one. And the one after that is going to be the same as this one. So we're going to get 0, 1, 1, 0, working away from the decimal point. And then it's going to start again, 0, 1, 1, 0. And it's going to go forever like that. So here's a few more steps if you want. But all it's going to do is repeat 0, 1, 1, 0, 0, 1, 1, 0 forever.
10:29
S…
Speaker 2 (Binary_Numbers_1)
in base two. And so that's denoted as overbar over 0, 1, 1, 0. So if you want to group them into fours like that, that's what it's going to look like. All right. So that's 0.4 in base two. Looks like that. So how do we check our answer here? And in fact, if we wanted to take this number and convert it back to base 10 to see if we really have 0.4, how would we do that?
10:55
S…
Speaker 1 (Binary_Numbers_1)
OK, well, that's going to be in the next video. So in other words, how do we convert an infinite binary expansion like this back into decimal to check our work here to see if we get 0.4 back in base 10? That's what we'll take up in the next video.
11:09
S…
Speaker 1 (Binary_Numbers_1)
All right, but to summarize this one, we've discussed how binary numbers are represented. They can either have a finite or an infinite representation. You now have the skills to convert from base 2 to base 10. That's pretty easy. To convert from base 10 to base 2, well, if we break it up into integer and fractional parts, the integer part we divide by 2, the fractional part we multiply by 2. So go back and look at those examples.
11:36
S…
Speaker 1 (Binary_Numbers_1)
with some exceptions. So as we said, the one thing we don't know how to do now is take a base 2 infinite representation and convert it back to base 10. So we'll discuss this, the non-terminating cases, in the next video. So stay tuned. Thank you for listening to this one.
This transcript was generated by AI (automatic speech recognition). May contain errors — verify against the original audio for critical use. AI policy
Samandráttur
Click Summarize to generate an AI summary of this transcript.
Summating...
Spørg AI um hetta transkriptión
Tað er ein spurningur um, hvussu nógvar ferðir ein kann skriva og lesa.