CSCI-A110 Lab 5
Digital Information
Due date: 2011 Mar 1 at 4:30 p.m.
50-70 points
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.
Some of the exercises require tables for converting between one data representation and another. Here are references to some tables you can use.
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.
Character (Textual) Data
Convert from binary to hexadecimal, using binary-hexadecimal tables:
1011 0100 1010 1100
(Hint: the correct answer has four hexadecimal symbols.)
Convert from hexadecimal to binary, using the same table:
078F
(Hint: the correct answer has 16 binary digits, or bits.)
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.)
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.)
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:
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.
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!
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:
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.
How long will it take to download a 10 MB file at 800,000 bits (not bytes) per second? You must show your work.
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.
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.
| Item | Points | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Required: Data representation problems. (10 problems, 2 points each. Show work except for table lookups.) | 20 | ||||||||
Required: SVG graphics file.
|
30 | ||||||||
| TOTAL | 50 | ||||||||
| Extra credit: File download time. (Show work.) | 2 | ||||||||
Extra credit: Sound editing.
|
18 | ||||||||
| EXTRA CREDIT | 20 | ||||||||
| TOTAL + EXTRA CREDIT | 70 |