Computer Science, asked by ritaachhetri1740, 11 months ago

Show that just n/2 partial products are required to multiply two n bit numbers. Describe the method using two numbers: a

Answers

Answered by Anonymous
0

Explanation:

void decToBinary(int n)

{

// array to store binary number

int binaryNum[32];

// counter for binary array

int i = 0;

while (n > 0) {

// storing remainder in binary array

binaryNum[i] = n % 2;

n = n / 2;

i++;

}

// printing binary array in reverse order

for (int j = i - 1; j >= 0; j--)

cout << binaryNum[j];

}

Similar questions