Index
 Syllabus
 Announcements
 Schedule
 Assignments
 Exams
 Resources

Assignment 4

Due: Friday, May 14

Part 1: Information Representation

Answer each of the following questions and, in each case, show your work in order to receive full credit.

  1. Convert each of the following binary numbers into decimal (base 10).

    1. 1000000
    2. 1101010
    3. 10111011
    4. 101011001

  2. Give the binary representation for each of the following decimal numbers.

    1. 23
    2. 47
    3. 64
    4. 109

  3. For the each of the following if the number is in binary, give its Hexadecimal representation; and if the number is in Hex, give its representation in binary.

    1. 1011011010101101
    2. 1011110111
    3. D37A
    4. 6BC0E2

  4. GIF images can have up to 256 colors (note that 256 is 28, so 8 bits are required to represent all of the 256 different colors). Each pixel in the image can be any of the available colors. Suppose that we have a GIF image with a size of 320x240 pixels. How many bytes is required to store this image?

Part 2: JavaScript

Modify the Javascript code in the greet1.html example to prompt for and output last name in addition to first name. Each of these strings should be stored in a separate variable. Also format the names in the output so that they are bolded. Name this file greet2.html.

What to Submit

For each of the above exercises, you will need to create a Web page containing your Javascript code (and, of course, your HTML code for the page) similar to the examples discussed in class. You need to upload all of these pages to your Web space on students.depaul.edu. For part 1, you can write your answers either in a Microsoft Word or a text file. Call this file part1.txt (if a text file) or part1.doc (if a Word file). This file and your file for part 2 should be uploaded to the server as discussed below.

Before uploading the files to the server, test your page on your local computer to make sure everything works and looks as intended. On your student Web space (inside the  public_html folder), navigate to the it130 Folder and create a new subfolder called hw4. Using SSH upload the pages you have created and any associated files to this folder on the server, set their permissions for the files and folders, and check them with your browser.  You should create your Web pages using a text editor such as Notepad on your local computer before uploading it. Please do not use a WYSIWYG editor such as FrontPage. The links to submit should look something line the following:

http://students.depaul.edu/~yourlogin/it130/hw4/

Important: set the permission for the folder hw4 so that it is readable by all users (public). This will allow the contents of the folder (your pages for the above exercises) to be listed as links.

Submit this URLvia Course Online (type the URL into the comment box).

Please see the syllabus for the policy on late assignments.


Back to Assignments