Home

[This page is auto-generated; please prefer to read the article’s PDF Form.]



Implementing Basic Arithmetic for Large Integers: Multiplication

Nitin Verma

June 18, 2021

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 = (ana1ana2a1a0) and b = (bnb1bnb2b1b0), in base B numeral system.

[Next]