Hints for doing assignment #1.
1. getBin() is similar to Prog1,done on Sep 22. You can perform the required
operation by considering the digits going from right to left, as the program
does or going from left to right. If you choose the former, divide by 2
instead of 10 If you choose the latter, instead of moding by 10, divide by 128.
Thus each time you divide by one less power of 2. Each digit you obtain must be
concatenated with a string.
2. checkBin() is similar to Prog6, done on Sep 15. But now instead of
multiplying by 10, multiply by 2. When you add the character you get from the
string to the sum, you must convert the char to an int. Now, since you are
going from char to a wider type int, you do not cast. You must however convert
the char value (which is the ascii code) to 0 or 1.