Use the QTSPIM or MARS simulator for the MIPS microprocessor architecture.
Assume only integer operations in this project (i.e., no operations of the floating-point type).
GIVEN an array of ten 64-bit numbers in memory starting at a known location (say SOURCE), apply RUN-LENGTH ENCODING to its binary contents to achieve lossless data compression. Store the result (i.e., the counts of alternating sequences of “0”s and “1”s) in the memory starting at a known location (say DEST). Assume that each count is stored in a byte (i.e., the count fits in 8 bits) and another output (say SIZE) contains the total number of 8-bit counts.
Assume the big endian representation for stored numbers.
Assume the 32-bit input at SOURCE:
Step 1: Identify contiguous sequences of “0”s and “1”s in this 32-bit input
Step 2: Count the “0”s and “1”s in these sequences and store the counts sequentially in the array DEST assuming that the first count is for “0”s (the most significant bits in the 32-bit sequence).
ð The result in DEST for our input is “912884” (with SIZE=6) since the binary input contains 9 “0”s which are followed by 1 “1”, which is followed by 2 “0”s, which are followed by 8 “1”s, etc.
NOTE: Short MIPS tutorials can be found at many sites, such as:
Run your code for the following hexadecimal input:
The lowest address (SOURCE) stores the most significant byte of the first 64-bit number.
4444440000000000 (first 64-bit number) FFFFFFFFFFFF0000 0000000000055555 00000000000FFFFF FFFFFFFF00000000 000000FFFFFFFFFF 0000000000000000 FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFA AAAAAAAAA0000000
Binary representation of this input:
Lowest address (SOURCE)
0100010001000100010001000000000000000000000000000000000000000000 1111111111111111111111111111111111111111111111110000000000000000 0000000000000000000000000000000000000000000001010101010101010101 0000000000000000000000000000000000000000000011111111111111111111 1111111111111111111111111111111100000000000000000000000000000000 0000000000000000000000001111111111111111111111111111111111111111 0000000000000000000000000000000000000000000000000000000000000000 1111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111010 1010101010101010101010101010101010100000000000000000000000000000
Assignment Writing Help
Engineering Assignment Services
Do My Assignment Help
Write My Essay Services