Week 3
Learning objectives
Upon finishing this learning module, you should be able to:
- Perform simple math on unsigned binary numbers.
- Describe how binary values can be used to represent non-numeric data like text (ASCII) and images
- Perform conversion from hexadecimal (base 16) to and from binary.
- Calculate values using modulo (or clock) arithmetic
- Describe how two people can use the Diffie–Hellman algorithm to generate a shared secret without exchanging secret messages.
- Write simple Turtle programs in Python
- Use procedures to reuse Python code and form abstractions
Class Schedule
First Class Meeting
- Binary Math
- Data Representation
- Work on programming
Independent:
- Binary and Data Representation readings
- ASCIIHex Worksheet
- Programming - Complete Ch 16
- Programming - Ch 17 Reading
Second Class Meeting
- Algorithm of the Week Activity
- Work on programming
Independent:
- Algorithm of the Week reading
- Programming - Complete Ch 17
- Programming - Ch 18 Reading
Programming
Do the following assignments based on Programming chapters from Welcome To CS. Completion assignments are graded for accuracy. Reading assignments are graded for attempting all of the interactive elements on the assigned pages.
- Ch 16 - Completion
- Ch 17 - Reading & Completion
- Ch 18 - Reading - Stop when you hit the Chapter Summary
Binary Math
Read sections 4.4 and 4.5 in Welcome To CS.
Representing Other Data
Read about ASCII representation of text and about how images can be represented in sections 4.9 to 4.10 of Welcome To CS.
Read about Hexadecimal and hex color codes: sections 4.11 to 4.12 of Welcome To CS.
Do the ASCIIHex worksheet. (Class Files link in elearn)
Algorithm of the Week: Private Key Cryptography
Read Ch 4 of Nine Algorithms the Changed the Future
Check out the Diffie–Hellman supplement. It has tips on how to doing clock arithmetic and a cool interactive version of the algorithm that can help you understand who knows what information as the computations are performed.
Optional Extras
The Introduction to Cryptography on Khan Academy is great if you want to learn more about cryptography and the related math.
Do you want to see the bits from a real image? Or any other file on your hard drive? Programs called Hex Editors allow you to see the raw information in a file and modify it. You can google "hex editor windows" or "hex editor mac" if you want to try one out.
If you are interested in how negative numbers and decimals are represented using bits, read Welcome to CS 4.6-4.8. You can also try these videos for extra insight: