1.Defining sum, bin1, and bin2 as binary numbers as in Problem 57, write the void function void binaryAdd(int sum[], int *cBit, const int bin1[], const int bin2[]) to compute sum as the sum of the two...

1.Defining sum, bin1, and bin2 as binary numbers as in Problem 57, write the void function



void binaryAdd(int sum[], int *cBit,


const int bin1[], const int bin2[])


to compute sum as the sum of the two binary numbers, bin1 and bin2. cBit should be the value of


the carry bit after the addition. Do not output the carry bit or the sum in the function. Test


your void function with interactive input.



2.
Defining a binary number as in Problem 57, write the function


int binToDec (const int bin[])


to convert an eight-bit two’s complement binary number to a signed decimal integer. Do not


output the decimal integer in the function. Test your function with interactive input.







May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here