Week 3:

Upcoming deadlines

  • Assignment 2 is due by the end of the day (by 11:59PM) Monday.
    Submit your completed document to elearn.
  • Sunday 11:59PM - Quiz 1. See below.
  • Next week - Assignment #3

Quiz #1

  • Covers all readings/activities from Weeks #1 & #2. Make sure to review computer related fields, computer history, binary numbers, and the first 3 chapters of Nine Algorithms That Changed the Future.
  • I recommend waiting for feedback on assignment 2 before you take it (hopefully available by Thursday night - Friday night at the latest).
  • The exam is open book (notes, assignments, web), but TIME LIMITED (60 minutes - timer can not be paused). It is NOT COLLABORATIVE; meaning do the exam by yourself!
    See the discussion board for more details on what to expect.

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.
  • Read function API documentation and make use of function libraries
  • Write flexible functions using parameters

Suggested Pacing

  • Monday: Start the programming.
  • Tuesday: Do Binary Math and Other Data.
  • Wednesday: Finish the programming.
  • Thursday: Algorithm of the Week.
  • Friday: Take quiz.

Reading/Tutorials:

Programming

I highly recommend that online students start the programming early in the week. You can work on it in parallel with the other material, but saving it for the last minute is a recipe for trouble.

Binary Math

  • Read CS160 Reader sections 4.4 and 4.5. (Note that 4.6-4.8 are optional extras.)

Other Types of Data

  • Read about ASCII representation of text and about how images can be represented: CS160 Reader - Data Representation from 4.9 to 4.10
  • Read about Hexadecimal and hex color codes: CS160 Reader - Data Representation from 4.11 to 4.12
  • Download the ASCIIHex worksheet and give it a try. Check your work against the key.
  • Hex editor activity (part of this week's assignment): Download the Hex editor pack. It has hex editor, image file and instructions for how to edit a binary file. (Mac users can google for HexFiend and use that program with the image file from the hex editor pack.) This video demonstrates how to use the program:

Algorithm of the Week: Private Key Cryptography

  • Read Ch 4 of Nine Algorithms the Changed the Future
  • Read CS160 Reader - Diffie Hellman supplement. It has tips on how to doing clock arithmetic.
  • Optional: These videos cover some of the same ground as the reading:
    Diffie Hellman 1
    Discrete Logarithms
    Diffie Hellman 2

Assignment

Questions - these are the questions, do not submit this document.
Answer Document template - you should use this to write up your answers to the questions. This is what you submit.

Optional Extras:

  • The Introduction to Cryptography on Kahn Academy is great if you want to learn more about cryptography and the related math.
  • If you are interested in how negative numbers and decimals are represented using bits in the CS160 Reader Ch4.6 & 4.7. You can also try these videos for extra insight:
    Floating Point
    Two's Complement

    Starts at ~10:00. Before that are two other ways we could represent negatives.