1) Write a program which converts a decimal integer (0-255) into its binary equivalent.
For example, if you input 129, the output should be: 10000001. If you input 0, the output should be 00000000. If you input 255, the output should be 11111111.
Use the "divide by 2 and collect the remainders" method. It is demonstrated here:
http://courses.cs.vt.edu/~csonline/NumberSystems/Lessons/DecimalToBinaryConversion/index.html
Since we don't have the advantage of knowing about loops yet, your code will essentially be written 8 times in a row - once for each bit.
2) Continue your program from above. It will take the 8 variables representing the 8 bits of your binary number, and convert them backwards into a single base 10 number. Hopefully, this will be the same as your input.