Question: This assignment focuses on converting numbers between bases, specifically base - 2 ( binary ) , base - 1 0 ( decimal ) , and
This assignment focuses on converting numbers between bases, specifically basebinary basedecimal and baseHexadecimal For the purposes of this assignment, binary and hexadecimal numbers will be represented by a string type, and decimal will be represented by an integer type. The objective of this assignment is to design functions that will perform a number conversion from a source number system to a target number system. All of the input processing has been done for you. Assume that in testing, all of the inputs are received in the correct type. Assume that all possible input numbers are nonnegative. You MAY NOT use any external functions to perform the conversions; you must do the conversions mechanically ie algorithmically, "the long way". You MAY NOT use any other libraries besides the ones I have provided to you. Any circumvention of these guidelines will result in deductions from your score.
The functions are as follows:
int binarydecimalstring bitstring:
Convert a binary bitstring to a decimal integer.
string decimalbinaryint n:
Convert a decimal integer to a binary bitstring.
int hexadecimaldecimalstring hexstring:
Convert a hexadecimal hexstring to a decimal integer.
string decimalhexadecimalint n:
Convert a decimal integer to a hexadecimal hextring.
string hexadecimalbinarystring hexstring:
Convert a hexadecimal hexstring to a binary bitstring.
string binaryhexadecimalstring bitstring:
Convert a binary bitstring to a hexadecimal hexstring.
To test a function, you must first input an input in the menu for the function you would like to test, and then provide the input to the selected function.
Please write a program in C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
