Steganography Example - Practice
Wolfram|Alpha: Computational Knowledge Engine
Weeks 1-2: Reading Homework NOT REQUIRED
Chapter 1: 1.1 - 1.4
Final answer: 205 is decimal equivalent of binary number 1100 1101
Final answer: Decimal number 38 in binary is 0010 0110
Method 2 using Integer Division and Remainder:
38 / 2 = 19 remainder 0 b0 = 0
19 / 2 = 9 remainder 1 b1 = 1
9 / 2 = 4 remainder 1 b2 = 1
4 / 2 = 2 remainder 0 b3 = 0
2 / 2 = 1 remainder 0 b4 = 0
1 / 2 = 0 remainder 1 b5 = 1
As soon as we got 0 the process is stopped and the rest of the bits are 0: b6 = 0, b7 =0
Final Answer: Decimal number 38 in binary system is: 0010 0110
Final answer: 68 is decimal equivalent of binary number 0100 0100
Final answer: Decimal number 121 in binary is 0111 1001
Method 2 using Integer Division and Remainder:
121 / 2 = 60 remainder 1 b0 = 1
60 / 2 = 30 remainder 0 b1 = 0
30 / 2 = 15 remainder 0 b2 = 0
15 / 2 = 7 remainder 1 b3 = 1
7 / 2 = 3 remainder 1 b4 = 1
3 / 2 = 1 remainder 1 b5 = 1
1 / 2 = 0 remainder 1 b6 = 1
As soon as we got 0 the process is stopped and the rest of the bits are 0:b7 =0
Final Answer: Decimal number 121 in binary system is: 0111 1001
Week 3:
Mini Quiz 2 Friday Sept 12 Structure and Material:
Example 1: Convert Go! to binary
Solution: Go! in ASCII is: 71 111 33
71 to binary:
71/2 = 35 b0 = 1
35/2 = 17 b1 = 1
17/2 = 8 b2 = 1
8/2 = 4 b3 = 0
4/2 = 2 b4 = 0
2/2 = 1 b5 = 0
1/2 = 0 b6 = 1
71 in binary: 0100 0111
111 in binary: 0110 1111
33 in binary: 0010 0001
Final answer: Go! in binary: 01000111 01101111 00100001
Final answer: decoded word: mE2
Week 4:
Write a function CtoF that converts Celsius temperature to the correspondent Fahrenheit temperature. The equation for converting a Celsius temperature to Fahrenheit is
Homework 2: Due Day Friday Oct 24
Write a function aveDigits that finds and RETURNS an average of the digits of the 4-digit positive integer (function parameter). Write a function average that finds and RETURNS an average of three integer numbers (function parameters). Write a function aveLast that finds and RETURNS an average of the last digits of three integer numbers (function parameters). Write a program that first reads 1 integer, if the integer is positive and even, the program reads 3 integers and finds their average. If the number is positive and odd, the program reads 3 integers and finds the average of their last digits, otherwise, the program asks user to enter one 4-digit integer number and finds the average of the digits of the input number.