CSE 2312 - Assignments - Assignment 4

The assignment will be graded out of 100 points. Submit a ZIPPED file (no other formats will be accepted) called assignment4.zip, containing the following three documents:

Submit your assignment4.zip file to Blackboard before the deadline. You will be able to revise your answers until the deadline with no penalty.

IMPORTANT: By submitting your answers, you are certifying that you have followed the UTA standards of academic integrity, and that these answers have been exclusively your own work. All students enrolled in this course are expected to adhere to the UT Arlington Honor Code:

I pledge, on my honor, to uphold UT Arlington's tradition of academic integrity, a tradition that values hard work and honest effort in the pursuit of academic excellence. I promise that I will submit only work that I personally create or contribute to group collaborations, and I will appropriately reference any work from other sources. I will follow the highest standards of integrity and uphold the spirit of the Honor Code.


Task 1 - Programming (60 pts.)

Write a program (in C, C++, Java, or Python) that can do Hamming encoding and decoding of 7-bit words. We will interpret each 7-bit original word as an ASCII code, that represents a single character.

To make it easy to read and modify input and output files using a text editor, our input and output will be TEXT files, not binary files. As an example, consider 7-bit word 1010100.

If you are using C, C++, or Java, your program should take three command line arguments: number, input_file, output_file. Similarly, if you are using Python, your function should take in three arguments: number, input_file, output_file. Your program should behave as follows:

You should assume that the input file ONLY contains only characters '0' and '1', nothing else (no spaces, new lines, etc.). You should enforce that your output file follows the same convention, and also contains ONLY characters '0' and '1'.

To help you get started, we provide the following resources:

While we have provided these test files, we will test your solutions with different test files, so your solution should be able to handle any file following the format we have specified (containing only '0' and '1' characters).

Submit your solution to this task as a file called (depending on the programming language you use) task1.c, task1.cpp, task1.java, or task1.py. Your solution needs to run on omega.uta.edu, otherwise you will receive at most half credit.


Task 2 (5 pts.)

(This is Problem 8 from Chapter 2 of the textbook).

Compute the data rate of the human eye using the following information. The visual field consists of about 106 elements (pixels). Each pixel can be reduced to a superposition of the three primary colors, each of which has 64 intensities. The time resolution is 100 msec.


Task 3 (5 pts.)

(This is Problem 9 from Chapter 2 of the textbook).

Compute the data rate of the human ear from the following information. People canhear frequencies up to 22 kHz. To capture all the information in a sound signal at 22kHz, it is necessary to sample the sound at twice that frequency, that is, at 44 kHz. A 16-bit sample is probably enough to capture most of the auditory information (i.e., the ear cannot distinguish more than 65,535 intensity levels).


Task 4 (10 pts.)

(This is Problem 17 from Chapter 2 of the textbook).

The disk illustrated in Fig. 2-19 has 1024 sectors/track and a rotation rate of 7200RPM. What is the sustained transfer rate of the disk over one track?


Task 5 (20 pts.)

A company has 1000 RAID-5 arrays. Each array has 10 disks. On average, a disk fails every 20,000 hours. When a disk fails in a RAID-5 array, it takes one hour to fix the array. Fixing the array involves taking out the broken disk, putting in a new disk, and storing the right data on the new disk. If, during that hour, another disk fails on the array that is getting fixed, the data on the array is lost.

Under these assumptions:


Back to the list of assignments.