 So I got this interview question a few weeks ago asking me why integer underscore max is 2,147,483,647 and I'm not gonna say the name of this company because sure as hell I had no idea how to do this question and I had no clue why this was the case But they legit told me Afterwards that we can't hire you because you don't know why this is the case of integer integer underscore max is 2,147,483,647 So you know what I'm gonna do in order to show my revenge I'm going to explain to you guys why this is a case and Then you guys could like destroy in their next interview When people ask you this question because this is like a really stupid question to ask during an interview So let's actually explain why Okay, so first of all if you were gonna go on Google and you type in How many bites in a bit? How many yeah, how many bits in a bite how many bits in a bite? One bite is eight bits, right? So if you were to go to your notepad or whatever your thing is and you write one bite Is gonna equal To eight bits Okay, one bite is equally gonna equal to eight bits Okay, you guys understand so then what are you gonna do? Okay? And then if you go on a Google and you type in how many bites in a integer You realize that in Windows 64 applications an integer has four bites So if you write this down one inch is equal to four bites So one integer is four bites. So if you use some math, right? Do some basic multiplication one integer is gonna equal to 32 bits Right One integer is 32 bits Based on four bytes because one four bytes four bytes times eight bits is gonna equal to 32 bits So if you go on Google now and you type in what is a bit? A bit is just a one and zero. Okay. It's a one and zero binary bit So now you're gonna wonder, okay, there's 32 bits. What am I gonna do? Simple you write. Let's just write down all the bits of 32 bits. So let's say one two Three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty and one twenty two Twenty three twenty four twenty five twenty six twenty seven twenty eight twenty nine Thirty thirty one thirty two Okay, there's 32 bits All right, now if you go to my video on how to convert binary to integer right how to convert binary to integer What you would realize is you have to add powers of two so before we add powers of two though in integers and computers the most significant bit this this one right here as We actually ignore this because this is just a sign. So this is the sign, right? It tells you if it's positive or negative So we're gonna actually ignore this. So now let's just write all the powers of two and just Just I'll just show you guys what I mean. So you have two to zero to the one To the two and so on and so forth until we get to the last one So let's assume we're gonna count this one. So if you were to count starting from zero It'll be zero one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen ninety Twenty one twenty two twenty three twenty four twenty five twenty six twenty seven twenty eight twenty nine thirty thirty one Okay It would be summation of zero to thirty one, okay, but we're ignoring this last one So we're actually gonna go up to two to the thirtieth Okay, we're gonna go up to two to the thirtieth this last one We're not gonna count because it just shows a sign in Computers so we don't actually care about this Go up to two to thirtieth So if you were to write a mathematical equation Assuming that you have a lot of good mathematics skills, which I don't know why this has to do with coding at all But let's say we have write a mathematical equation summation It will be two to the I Right because we're summing powers of two every time and we're gonna start from zero and then our last value is going to be 30 see it's 30 Okay, so now if you were to go on Google or unless you're just somehow a math genius or something You realize that the summation of k to the zero to the n of two to the k is equal to two to the n plus one minus one So if you were to plug in this equation, this will actually equal to let's actually move this to the side Let's move this over here, okay, I'll move it over here, okay Maybe over here over here over here. Okay, so this is going to equal to two to the n plus one so our n is going to be 30 so 30 plus one is 31 and Then minus one okay, right because from the summation two to the k of k equals zero to n It's going to be equal to two to the n plus one minus one. So in our equation. It'll be two to 31 minus one Now if you were to type on Google, what's two to 31 minus one? You get the number of two billion What is this two? two billion one hundred forty seven thousand four hundred eighty three and two billion one hundred forty seven million four hundred eighty three thousand six hundred forty seven So yeah, that's basically the gist on why this is the case so if an interviewer were to just ask you this question for some reason in Order to showcase their superiority over you and want to hire you based on how Arbitrary you know your powers of two and go ahead you will ace your next interview But until then you'll probably be screwed like me and the rest of the other people who don't know why this is the case But now you know So yeah, hope you guys enjoy this video ray come subscribe. I'll check you guys later. Peace