 A few days ago, I was asked by a college student about big numbs. I didn't really understand big numbs, had a project that he was working on with them. And it was a good point. I haven't actually done a presentation on big numbs yet. Now, for reference, anything you want me to cover just suggest that I have a list that I keep. If it's on there already, I'll bump it up in priority. If it's not, I'll add it. So big numbs. What is a big num? And unfortunately, we actually have to cover something first. And that's precision, because big numbs are a way of dealing with sort of the precision problem, I guess you could call it. Because computers have finite stuff they work with, you can't have unlimited precision. Not really. It's not like math in the most traditional sense where you can just write out ridiculously huge numbers on a piece of paper. A huge pain to do, but really there's nothing stopping you from just adding more and more numbers. Computers have finite space though. And so we have fixed precision, which is the classic integer or the modular unsigned integers, stuff like that. If it goes beyond what the maximum is, it either wraps around, like in the case of a modular, or overflows, like in the case of an integer. And then we have arbitrary precision. There's numerous different representations for this, but the most common that people know is the floating point. It's arbitrary because it shifts around, that's the exponent part of it, but it is still otherwise fixed, basically. You lose out anything beyond the size still. Now we have expanded. This sometimes gets called unlimited, and a lot of the time gets called unlimited, but it is not. Like I said, computers have a finite amount they can actually represent, and eventually you're going to fill up the computer memory and not be able to do more. So it is, I and some others refer to it as expanded, but if you hear unlimited in the context of computers, it's really just referring to this. It's not actually unlimited. And this is what big nums are, basically. It is a way of taking the fixed size and then just expanding it to considerably greater levels. So that you can do things like represent the scale of a floating point, but not actually lose out on some of that information. Has other uses, of course. There's a basics we need to cover just so I can explain exactly how these work. It's a type of positional numeric, and this sounds weird, like what is this referring to, but it's actually what we use normally. The Arabic numeral system is a positional numeral system. So we have one's place, ten's place, hundred's place, and so on. You know, if you have a one in the million's place, you know the number is at least one million, and then it's all the other positions. It's not like Roman numerals, which are not positional, where it's the summation of different groups of values. Roman numerals are weird, but Roman numerals are not positional. That's the point. The numeral system that pretty much the whole world uses at this point is positional. Big nums are, at least in my opinion, best thought of as a special type of positional numeral. But then we also have binary, which works the same way. You have one's place, two's place, four's place, and so on. And, as I said, big nums are basically just this with a very large radix. That's the base. So how these actually work. Let's say that we're working with a big num of base 60, and you'll see why in a moment this will wind up looking very similar to something that you already know how to do, and that's the point. You do sort of actually work with big nums in real life. So base 60, 50 plus 50 will overflow, and so you have 40 if it wraps around. Now, in normal arithmetic, you have something say like 8 plus 8. It overflows. You wind up with a 6, but you carry. Same thing. You carry a 1 over. So you have 50 plus 50 equals 1 and then 40. We're representing this in decimal because we don't want to create a whole new number system just to represent this. You maybe recognize that notation. It maybe start to click why I said we're going to do this example in base 60. That's because this is essentially time. We don't represent time using a positional numeral. Well, we sort of do, but we don't represent it using our decimal positional system. Time, with the exception of hours, is entirely sexogysmal or base 60. We separate out the digits with a colon and each time one part of it fills up, we move it to the next part. Just like when a classic digit fills up, we carry it over. So in the case of the 1, we'll say like 1 minute 40 seconds because that's basically what this is, you have a separatable 1 minute and 40 seconds. Those two added the same thing as the 50 seconds plus 50 seconds, but breaking it apart this way sort of shows the representation that big nubs take in the abstract sense a bit better. And as for how they're actually implemented, there's numerous different ways, but I think you probably pieced together that basically it's just chaining together integers where it's like we have an array, which is one of the simplest big num implementations, although it's a little bit less than ideal. Each element in the array is essentially one digit, where the base of the big num is the maximum representable by the integer on the processor that you're working with. Each time the very last element fills up, you carry into the next to the last, or you can do it the exact opposite order, but conventionally it's done with the same order that we do numbers already. List a bit more flexible, but you also have the tree, which is often implemented specifically as a heap, although not always, so that you have the flexibility of a list while also being able to access each digit a little bit more efficiently. But there are also other implementations. So hopefully this helps explain what a big num is a bit better. It's basically just a really large integer. That's it. Just a way of constructing a really, really, really large integer. Have a good one.