 An important thing we'll need to be able to do is to raise a number to a very high power very efficiently and very quickly. Fortunately, there's an easy way of doing this, and in fact, this problem may have inspired the very first computer program ever written. And this was produced by an Indian mathematician by the name of Pengala, who lived in the 3rd century BC. Pengala's problem was to find two to power n, and so he described the following procedure. First, start with n. In modern terms, we might say that we initialize with our value of n. If our value is even, then have and record two. Else, if odd, subtract one and record zero. And it's noteworthy that this is the very first time the zero symbol ever appeared, though in Pengala's description, it doesn't mean anything other than an abstract symbol that will record if we have an odd number. This process of either having or subtracting one will modify our working number, and so we're going to repeat this process until we arrive at zero. What we end up with if we do this is we end up with a sequence of twos and zeros. To write the actual program, we're going to reverse that sequence of twos and zeros. And then the interpreter, which in Pengala's time was a human being, would follow these directions as follows. We're going to start with the number one. If we encounter a zero, we're going to double our working number. If, on the other hand, we encounter a two, we're going to square our working number. For example, suppose we want to find two to power ten. So we'll initialize with our starting value of ten. Ten is even, so we're going to have it to five and record two. Five is odd, so we'll subtract one to make four and record zero. Four is even, so we'll have it to two and record two. Two is even, so we'll have it to one and record two. One is odd, so we'll subtract to make zero and record zero. And now we have a sequence of zeros and twos, and we'll record them in reverse order. Zero, two, two, zero, two. And this is our computer program. So we can follow our program. We'll initialize with a value of one. The first instruction is zero, so we'll double to two. The next instruction is a two, which tells us to square our number to four. The next instruction is also a two, so we'll square again to get 16. The next instruction is zero, so we'll double to get 32. And our last instruction is a two, which says we'll square our number to 1024, which is going to be our answer of two to the tenth.