CSCI-A110 Lab 5
Digital Information

Due date: 2011 Mar 1 at 4:30 p.m.
50-70 points

URL: The latest version of this document can be found online at http://mypage.iu.edu/~gdweber/csci/a110/lab/05.html

This is version 3.3, revised 2011 Feb 16.

Tables for Reference

Some of the exercises require tables for converting between one data representation and another. Here are references to some tables you can use.

Overview

Goals: understand how information is represented, including textual data, numbers, graphics, and sounds.

Parts A and B are required. Parts C and D are extra credit. Extra credit will be earned only if all required parts are completed.

Part A (Required): Data Representation and Storage

  1. Character (Textual) Data

    1. Convert from binary to hexadecimal, using binary-hexadecimal tables:

          1011 0100 1010 1100
      

      (Hint: the correct answer has four hexadecimal symbols.)

    2. Convert from hexadecimal to binary, using the same table:

          078F
      

      (Hint: the correct answer has 16 binary digits, or bits.)

    3. We can convert text data into ASCII binary codes, using ASCII tables, and then convert the binary codes into hexadecimal, using the same table as in parts a and b (or our table may also enable us to convert text data directly to ASCII hexadecimal codes).

      Example. To convert the text "Barn" (four characters):
      (i) From ASCII tables, the binary ASCII codes are B = 0100 0010, a = 0110 0001, r = 0111 0010, and n = 0110 1110.
      (ii) From binary-hexadecimal tables: the corresponding hexadecimal codes are 42 61 72 6E.

      Convert the following text into hexadecimal ASCII codes (either directly, if your table is so helpful, or indirectly through the binary codes).

      Life is sweet!
      

      (Hint: the correct answer has 28 hexadecimal symbols, two for each of the 14 characters.)

    4. Convert the following hexadecimal values to text (either directly, if your table is so helpful, or indirectly through the binary codes), using the same tables:

          46 65 61 74 68 65 72 3F
      

      (Hint: the correct answer has 7 letters and one punctuation mark.)

  2. Information Capacity

    Example. How many messages can be sent with 3 binary switches?
    Answer: 23 = 8.

    Example: If a Zip drive's capacity is 100 MB, how many 25 KB files can be stored on it?

    Answer: 1 MB = 1,000,000 bytes, so 100 MB = 100 x 1,000,000 bytes = 100,000,000 bytes. 1 KB = 1000 bytes, so 25 KB = 25 x 1000 bytes = 25,000 bytes. The number of files that can be stored is 100,000,000 bytes divided by 25,000 bytes = 4,000.

    Questions. You must show your work to receive credit for these problems:

    1. How many different messages can be sent with 12 binary switches?
    2. How many with 20?
    3. How many audio CDs can be stored on a 120 GB hard drive? Each audio CD is 650 MB.
    4. How many Microsoft Word files can be stored on a 256 MB flash drive, if each file is 50 KB?
  3. Number Representation.

    Convert the binary (base 2) numbers below to decimal integers.

    Example. Convert 10011010 from binary to decimal.

    Answer: 10011010 binary = 154 decimal. The table explains why:

    Binary digits 1 0 0 1 1 0 1 0
    Position value (power of two) 27 26 25 24 23 22 21 20
    Position value (decimal) 128 64 32 16 8 4 2 1
    Digit's value 1 × 128 0 × 64 0 × 32 1 × 16 1 × 8 0 × 4 1 × 2 0 × 1
    Add them up: 128 + 0 + 0 + 16 + 8 + 0 + 2 + 0 = 154

    Questions. You must show your work to receive credit for these problems. Filling out a table (such as in the example above) is a good way of showing your work.

    1. 11110000
    2. 01010101

Part B (Required): Graphical Data and XML

Your task will be to use the Inkscape program to make a drawing using Scalable Vector Graphics (SVG). Inkscape is installed in TR 102, but (probably) not in other campus computer labs. Inkscape is free (open source) software; if you want to install it on your home computer, see the Free Software links on the A110 course home page.

Preparation: work through at least the following tutorials in the Inkscape help menu. Read the tutorials actively. You can manipulate the drawings in the examples — you should do so!

  1. Basic Tutorial: learn how to pan, zoom, make shapes, move, scale, rotate, group, ungroup; learn about fill, stroke, gradients, duplicating, and Z-order.
  2. Shapes Tutorial: learn how to work with rectangles, ellipses, stars, polygons, and spirals.

Your task: make a vector graphics drawing, using Inkscape or a similar SVG editor. SVG is an XML application. Your subject (what you draw) can be almost anything, either an abstract design or a realistic picture. However, the drawing must satisfy these requirements:

  1. Use at least two different kinds of shapes (e.g., rectangle and star).
  2. Use at least two different colors.
  3. Use at least one gradient. (What's a gradient? Find the answer in the Inkscape Basic Tutorial.)
  4. Alter the properties of at least one shape (for example, the number of points on a star).

Save your drawing as an SVG file and use Firefox to upload it (see Caution) into Oncourse Resources for this class, in the "Lab5" directory. After uploading, make sure that when you click on the link to your uploaded files opens up as an image.

Caution: Uploading the file with Microsoft Internet Explorer, at least through version 7, will probably result in the file's being stored with the wrong MIME type and therefore it will display as XML code rather than as an image. If this happens, delete the resource, and upload it again with the Mozilla Firefox browser.

Find the URL of your drawing and write it on the Grading Sheet below. You may also wish to write on the grading sheet a description of how you made the drawing. This can help to show that you satisfied the four numbered requirements above.

Part C (Extra Credit): File Download Time

How long will it take to download a 10 MB file at 800,000 bits (not bytes) per second? You must show your work.

Part D (Extra Credit) Sound Editing

You will need to use a computer with a sound card, speakers, and Audacity or another sound editor. Audacity is installed in TR 102. Computers in some labs have only internal speakers, and you may have to unmute the speakers to use them. Audacity is (probably) not installed in other campus computing labs. Audacity is free (open source) software; if you want to install it on your home computer, see the Free Software links on the A110 course home page.

  1. Find a sound file which you are allowed to copy and distribute (for example, a public domain file), or record your own. This must be a raw sound file, such as a WAV or AIFF file, not one with sophisticated compression like MP3 or Ogg Vorbis.
  2. Using a sound editor such as Audacity, edit the sound file and save a a clip (segment) which is 15 seconds or less. We will call this the "sound clip file original."
  3. Make a copy of the sound clip file original. We will call the copy the "sound clip file copy."
  4. Edit the sound clip file copy. Apply at least two effects, such as fade-in and fade-out, echoes, or filters. There are lots of effects to choose from! Save the sound file. We will call this the "sound clip file with effects."
  5. Upload both the sound clip file original and the sound clip file with effects into Oncourse Resources in the Lab5 directory. Find the URLs of the two files, and write them on the Grading Sheet below. Also write a description of the sound clip file original (what is it a recording of?) and tell what effects you applied to it.

What to Turn in

  1. (Required) Cover sheet, with URL(s) of your uploaded file(s). One URL for your SVG file is required. The others are optional, for the extra credit sound clip files.
  2. (Required) Answers to Data Representation and Storage Questions (10 problems: 1a–d, 2a–d, and 3a–b), on paper.
  3. (Required) SVG graphic file, uploaded to Oncourse Resources Lab5.
  4. (Recommended) Description of techniques used in the graphic file, on paper.
  5. (Extra credit) Answer to the File Download Time problem, on paper.
  6. (Extra credit) Sound Editing.
    1. Two sound files, not more than 15 seconds each, original and with effects, uploaded to Oncourse Resources Lab5.
    2. Descriptions of the original file and the effects applied, on the grading sheet or on another sheet of paper.

Grading Criteria

Student's name: _______________________________________________

URL(s) of student's work:

https://oncourse.iu.edu/access/content/group/SP11-EA-CSCI-A110-1042/Lab5/ _______________________

https://oncourse.iu.edu/access/content/group/SP11-EA-CSCI-A110-1042/Lab5/ _______________________

https://oncourse.iu.edu/access/content/group/SP11-EA-CSCI-A110-1042/Lab5/ _______________________

No credit will be given for the graphics and sound editing parts, unless the work is publicly accessible at the URLs shown above.

No extra credit will be given unless the required parts are completed.

ItemPoints
Required: Data representation problems. (10 problems, 2 points each. Show work except for table lookups.) 20
Required: SVG graphics file.
At least two shapes10
At least two colors10
At least one gradient5
Altered properties of at least one shape 5
30
TOTAL50
Extra credit: File download time. (Show work.) 2
Extra credit: Sound editing.
15 seconds or less3
Applied two effects (5 points each) 10
Described the original sound and the effects. 5
18
EXTRA CREDIT 20
TOTAL + EXTRA CREDIT 70