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
Science,
5 months ago
Computer Science,
11 months ago
Biology,
11 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago