[Solved] CS2400 Homework6- program to correct and decode an even-parity Hamming code into a source word

$25

File Name: CS2400_Homework6-_program_to_correct_and_decode_an_even-parity_Hamming_code_into_a_source_word.zip
File Size: 885.48 KB

SKU: [Solved] CS2400 Homework6- program to correct and decode an even-parity Hamming code into a source word Category: Tag:
5/5 - (1 vote)

Write an ARM program to correct and decode an even-parity Hamming code into a source word

  • in the data area, o define a symbol called MAX_LEN and equivalent it with a number like 100
    • declare and initialize a NULL-terminated string as a Hamming code, label it as HCode, and initialize it using the value of your choice (each byte is the ASCII of a bit in your Hamming code). For example, the string could be 111111000001101, 0x0 for case 1
    • reserve a chunk of zeroed memory with a length of MAX_LEN bytes, label this chunk of memory as

SrcWord, which will be used to store a Null-terminated string representing the corrected source word.

  • Store each one of the above four labels as a word with an address label, e.g., adrHCode DCD HCode for HCode, and EXPORT each address label, e.g., EXPORT adrHCode.
  • in the main program, o go through the Hamming code string via examining EACH bit (data bit and check bit), count the total number of 1s in EACH check bits parity and update the relevant counters for the check-bits.
    • go through the counters to find all the check bits whose parities are NOT even, and add together the sequence numbers of all those check bits whose parities are NOT even.
    • use the above sum of the sequence numbers to find THE INCORRECT bit if ANY in Hamming code , and

invert this bit

  • go through the CORRECTED hamming code to retrieve the source word, and store the source word at SRC_WORD as a NULL-terminated string.

Suggested Test cases for your program:

Case 1: use 111111000001101 as the Hamming code, your program is going to detect that bit #9 in this Hamming code is transmitted wrong, correct it as 1, and extract the source word 11101001101 as a NULL-terminated string at

SRC_WORD

Case 2: use 010011100101 as the Hamming code, your program is going to detect that NO bit in this Hamming code has an even-parity-error, and extract the source word 01110101 as a NULL-terminated string at SRC_WORD

More cases: you may use HW5a posted on blackboard to find more pairs of Hamming code and source word, then

  • use this Hamming code as the No-Even-Parity-Error case like case 2
  • invert ONE bit in this Hamming code and use it as the Even-Parity-Error case like case 1

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS2400 Homework6- program to correct and decode an even-parity Hamming code into a source word
$25