Question: int bintodec(string); // converts a binary number (represented as a STRING) to decimal int hextodec(string); // converts a hexadecimal number (represented as a STRING) to
int bintodec(string); // converts a binary number (represented as a STRING) to decimal int hextodec(string); // converts a hexadecimal number (represented as a STRING) to decimal string dectobin(int); // converts a decimal number to binary (represted as a STRING) string dectohex(int); // converts a decimal number to hexadecimal (represted as a STRING)
//the addbin and addhex functions work on UNsigned numbers
string addbin(string, string); // adds two binary numbers together (represented as STRINGS) string addhex(string, string); // adds two hexadecimal numbers together (represented as STRINGS)
int main() { cout<<"SIGNED binary 10011 = SIGNED decimal "< int bintodec(string bin) { /* ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### */ } int hextodec(string hex) { /* ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### */ } string dectobin (int dec) { /* ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### */ } string dectohex(int dec) { /* ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### */ } string addbin(string bin1, string bin2) { /* ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### */ } string addhex(string hex1, string hex2) { /* ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### ##### IMPLEMENT THIS ##### */ }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
