Search code examples
binarymultiplicationbit

Binary Multiplication: how many bits is a product


If you are multiplying two binary numbers, one with n number of bits and one with m number of bits, how many bits is the product? For ex., if I multiply a binary number of 6 bits and a binary number of 8 bits, how many bits will the product be?


Solution

  • When you multiply two numbers, the number of bits in the product cannot be less than max(m,n) and cannot be more than (m+n). (Unless one of the two numbers is a 0).

    In your example, with m = 6 and n = 8.

    The minimum number of bits in the product will be 8 and the maximum will be 14.