Question: 2-2. Given a binary number represented as an array, write a function that takes the array and its size as a parameter, and returns the
2-2. Given a binary number represented as an array, write a function that takes the array and its size as a parameter, and returns the integer value. You may assume that there are at least 1 and no more than 30 numbers in the array and that all the values are either O or 1. The array is ordered with most significant binary digit at the start (index 0) and the least significant digit at the end. signature: int binary-to-number(int binary-digits int number-of-digits)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
