Welcome back.
This is a quick optional video that, well, with something that you probably won't use, but I want
you to just know that it's out there and that is there's actually an extra data type that I didn't talk
about, and it's called complex.
And as the name suggests, it's pretty complex.
However, a complex number, again, is a number that is a third type instead of int and float.
We also have this type four numbers.
Now, the reason I'm not really teaching complex is that you only use this if you're doing something
really, really complex math.
Most of the time you'll never use it.
I personally have never used it, but it is good to know that it exists.
It's the equivalent to a real number.
And you can read about complex numbers if you want.
But again, that's something that you don't need to worry ninety nine point nine percent of the time.
Another thing I want to talk to you about is this idea that these integers and floats get stored such
as five in memory as binary, that is as binary numbers, ones and zeros.
And there's actually an action or function that we can use in Python called Behn for binary.
And you can see that a bin returns the binary representation of an integer.
So it's going to return whatever the binary version of five is, if I click run here.
Well, I have to print, remember?
So let's print.
And click run.
And I get the binary representation now instead of all zeros and ones, there's also this idea of B
and that is what Python uses underneath the hood to say, hey, when I see this number with zero B.
That's a binary number.
But if I Google binary number five.
I see that the binary number four five is one on one, which, again, that's what we see here.
So that's really cool, really interesting just to know that it exists.
By the way, just for fun, let's say that we want to turn this into a decimal, let's say where the
computer and we just retrieve this binary number.
I can do it and then wrap this.
Like this in single or double quotes?
And then with the end, I can also say, hey, I want this return to a number that is base 10, which
is what us humans use.
So if I actually do print here.
And click, Ron.
Well, actually, we have to do base two here, right, because what we're saying is, hey, this number
is base two and convert it to integer and base to number is, well, zeros and one, it's a binary number.
So if I click on here.
Look at that, I get five.
So in your head, you can think of it this way when we story number like five, an integer like five,
when a computer retrieves that number, let's say we're doing some additions.
Well, it's going to grab this from memory.
It's going to say, well, this is a binary number and I'm going to convert it into integer.
Very, very cool.
Now, the reason I taught this here, you won't see this a lot and beginner courses and especially so
early in the course.
But I think it's an important principle, although you might not get tested on this ever for you to
just understand how things are working underneath the hood, I believe is an important thing for you
to do in order to become a great developer.
So hopefully this doesn't confuse you too much.
I'll see you in the next video.
Bye bye.