Question: C-programming Activity 3 demonstrates function and data manipulation applied to binary to decimal conversion. The function takes an input string where the elements are limited

C-programming

Activity 3 demonstrates function and data manipulation applied to binary to decimal conversion. The function takes an input string where the elements are limited only to either character 1 or 0. Note that the position of the character is in reverse order as to the arrays index. This implies that the most significant bit (bit or element with highest weight) is stored in the array with index 0 or stored in the first element of the array.

C-programming Activity 3 demonstrates function and data manipulation applied to binary to

Write a function BIN2DEC (binary to decimal) that accepts an array of characters representing a binary number. The maximum number of elements is 8 and the possible value of the each character is '0 or '1. The function prototype is int BIN2DEC (char *str) if the user inputs 0011101 0011101,-1x24 + 1x23 + 1x 22 +0 x 21 + 1x 20-2910

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!