Silent Matt » How BigIntegers Work, part 2: Multiplication
In the last post, I gave an overview of how BigIntegers are stored and how addition and subtraction work. Now it’s time to move up the hyperoperation sequence and and discuss multiplication.
Simple Multiplication
Probably the simplest way to think about multiplication is repeated addition. In other words, 4*5 = 5+5+5+5
. Using that definition, it would be trivial to write a multiplication function in terms of addition:
Read full article from Silent Matt » How BigIntegers Work, part 2: Multiplication
No comments:
Post a Comment