UMBC CMSC 313, Computer Organization & Assembly Language, Fall 2003

Project 2: Hamming Distance

Also available in PDF.


Due:

Tue 09/23/03Section 0101 (Chang) & Section 0301 (Macneil)
Wed 09/24/03Section 0201 (Patel & Bourner)


Objective

The objective of this programming project is to practice designing your own loops and branching code in assembly language and to gain greater familiarity with the i386 instructions set.


Assignment

Write an assembly language program that prompts the user for two input strings and computes the Hamming distance between the two strings. The Hamming distance is the number of bit positions where the two strings differ. For example, the ASCII representations of the strings "foo" and "bar" in binary are:
"foo" = 0110 0110 0110 1111 0110 1111
"bar" = 0110 0010 0110 0001 0111 0010
So, the Hamming distance between "foo" and "bar" is 8.

Some details:


Implementation Notes


Turning in your program

Use the UNIX submit command on the GL system to turn in your project. You should submit two files: 1) the modified assembly language program and 2) the typescript file of sample runs of your program. The class name for submit is cs313_0101, cs313_0102 or cs313_0103 for respectively sections 0101 (Chang), 0201 (Patel & Bourner) or 0301 (Macneil). The name of the assignment name is proj2. The UNIX command to do this should look something like:

submit cs313_0101 proj2 hamming.asm typescript


Last Modified: 22 Jul 2024 11:28:41 EDT by Richard Chang
to Fall 2003 CMSC 313 Section Homepage