[This page is auto-generated; please prefer to read the article’s PDF Form.]
This article is a continuation of the earlier one titled Implementing Basic Arithmetic for Large Integers: Introduction [1], which introduced how arbitrarily large integers along with basic arithmetic operations can be implemented via a program. It discussed the bigint structure for such large integers, the operations of addition, subtraction and printing, and also included the source code of all common internal methods.
Now we look into the multiplication operation, and discuss two algorithms for the same: Schoolbook Multiplication and Karatsuba Multiplication. We will be frequently using the concepts and definitions from [1]. As done earlier, the two operands of arithmetic operations will generally be denoted by a = (ana−1ana−2…a1a0) and b = (bnb−1bnb−2…b1b0), in base B numeral system.
[Next]
Copyright © 2021 Nitin Verma. All rights reserved.