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
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
Social Sciences,
5 months ago
Hindi,
5 months ago
Math,
5 months ago
Computer Science,
9 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago