Homework 5 | CS 4, Summer 2007 | Due: August 10



Directions: Submit hardcopies (paper copies) of your solution to the written questions (W). For the HTML questions (H), submit a hardcopy of your HTML code. Update your cs4/index.html to point to each HTML/Javascript solution. Make sure to place your name on the first page of your fully stapled homework. The point values for each question are as specified.
  1. (H: 60) Write a web page that allows users to convert an 8-bit unsigned binary number to decimal. Your web page should look something like:
       binary:  [        ]     
    
           [CONVERT]     
     
       decimal: [        ]
       
    When the CONVERT button is clicked, your JavaScript function should be called. This function should have the following features:

    The following written problems are from "An Invitation to Computer Science":
  2. (W: 8) Chapter 4, Exercise 3
  3. (W: 6) Chapter 4, Exercise 4
  4. (W: 8) Chapter 4, Exercise 5
  5. (W: 4) Chapter 4, Exercise 6
  6. (W: 6) Chapter 4, Exercise 8
  7. (W: 8) Chapter 4, Exercise 15