C++ conversion from Decimal to Binary and Binary to Decimal. Please help...thank
ID: 3562883 • Letter: C
Question
C++ conversion from Decimal to Binary and Binary to Decimal. Please help...thank you!!
Create a program which can maintain binary numbers, (being able to add and subtract them), as well as being able to convert them from binary to decimal, and decimal to binary. You'll need to make your own custom class to do this, as your code needs to be able to handle any kind of input. My suggestion is that your binary class use 'char' for each of the binary digits. To keep the assignment from getting too complicated, you'll never need more than SIX binary digits. so consider that the upper limit of how many char variables you'll need in each binary class. Your code will need to perform the following feats: Convert 34 to Binary Convert 22 to Binary Convert 1001 to Decimal Convert 111011 to Decimal Add 11 and 1110 in Binary, Return the Answer in Binary Add 1010 and 111 in Binary, then Convert the Answer to Decimal A general reminder, double-check your code's output to make it's correctly converting. And although many compilers offer built-in Binary-to-Decimal/Decimal-to-Binary converters. PLEASE DO NOT USE THESE BUILT IN CONVERTERS, as I will intentionally remove points for doing so.