Assignment for Computer Architecture! this is about hamming codes
write the code IN MIPS ASSEMBLY LANGUAGE
calculating hamming codes;
The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error. Create the code word as follows:
-
Mark all bit positions that are powers of two as parity bits. (positions 1, 2, 4, 8, 16, 32, 64, etc.)
-
All other bit positions are for the data to be encoded. (positions 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, etc.)
-
Each parity bit calculates the parity for some of the bits in the code word. The position of the parity bit determines the sequence of bits that it alternately checks and skips.
Position 1: check 1 bit, skip 1 bit, check 1 bit, skip 1 bit, etc. (1,3,5,7,9,11,13,15,...)
Position 2: check 2 bits, skip 2 bits, check 2 bits, skip 2 bits, etc. (2,3,6,7,10,11,14,15,...)
Position 4: check 4 bits, skip 4 bits, check 4 bits, skip 4 bits, etc. (4,5,6,7,12,13,14,15,20,21,22,23,...)
Position 8: check 8 bits, skip 8 bits, check 8 bits, skip 8 bits, etc. (8-15,24-31,40-47,...)
Position 16: check 16 bits, skip 16 bits, check 16 bits, skip 16 bits, etc. (16-31,48-63,80-95,...)
Position 32: check 32 bits, skip 32 bits, check 32 bits, skip 32 bits, etc. (32-63,96-127,160-191,...)
etc. -
Set a parity bit to 1 if the total number of ones in the positions it checks is odd. Set a parity bit to 0 if the total number of ones in the positions it checks is even.
The assignment is to create a MIPS programs that the determines what the ECC code should be for a given number (an 8-bit byte). ECC Hamming codes are explained on pages 420-424 in your text. The codes you create are to work for 8-bit positive numbers as these are simpler to work with than larger numbers.
The program is to request the user to enter a byte of data (a positive integer in the range of 0 to 255 in decimal) and then create the 12-bit Hamming code as described in your text (see above). The program is to then output this (with an appropriate label) in hex.
Make certain that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up the instruction columns, the register columns, and the comment fields (see page 134 in your text for a nice example).
For this assignment, turn in your code, a screenshot showing a working for a test case
Step by stepSolved in 3 steps
- *All parts please* 2. (50 points) Binary Integer Arithmetic (a) (15 points) Given A = 1111 0011 1100 0011 1100 0000 0000 00002 and assuming A is a single precision IEEE-754 floating point number, what decimal value does A represent? Show A in normalized scientific notation: 1.X ∗ 2^Y. (b) (15 points) Convert 28.410 to IEEE-754 single-precision binary. (c) (20 points) Given X = 0100 0001 0110 1110 0000 0000 0000 00002 and Y = 0100 0001 1011 1100 0000 0000 0000 00002 in single precision IEEE-754 floating point numbers, perform the following operations. Show all your work and express the final answer in single precision IEEE 754-floating point representation. 1. X+Y 2. X*Y Hint: show each value in binary normalized scientific notation prior to performing the arithmetic. This should make following the algorithms easier.arrow_forward1. a) Consider the numbers M = 2081 and N = 2329, both in base 10. Write them in base r, as follows, and perform M - N using the (r - 1)'s complement representation subtraction algorithm for following values of r. Write and encircle the results in the places indicated below: (i) r = 2 M₂: N₂: (M-N) ₂: (ii) r = 16 M16: N16: (M-N) 16:arrow_forwardQ3 aciqarrow_forward
- 1) Find the equivalent decimal value of the following floating-point representation using IEEE 754 standard single-precision (32-bit floating-point number with bias = 127) 1 0111 1111 1110 0000 0000 0000 0000 000 (The quiz is expecting a decimal numeric entry. It will automatically suppress leading and trailing zeros. It will display your answer with commas every third digit.) 2) Find an IEEE 754 floating-point representation of -74.2 decimal number. Enter 32 bits without a space. (The quiz is expecting a fill in the blank text string in the entry box and grades on an exact match with the expected result. The answer should be formatted as a 32-bit IEEE 745 binary number representation)arrow_forwardThis is COmputer Architecture! this is about hamming code PLEASE WRITE THE CODE IN MIPS ASSEMBLY LANGUAGE! Assignment for Computer Architecture The assignment is to create a MIPS programs that the determines what the ECC code should be for a given number (an 8-bit byte). ECC Hamming codes are explained on pages 420-424 in your text. The codes you create are to work for 8-bit positive numbers as these are simpler to work with than larger numbers. The program is to request the user to enter a byte of data (a positive integer in the range of 0 to 255 in decimal) and then create the 12-bit Hamming code as described in your text (see above). The program is to then output this (with an appropriate label) in hex. Requirements: Make certain that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up the instruction columns, the register columns, and the comment fields For this assignment, turn in your code, a screenshot showing a working for a test…arrow_forwardNAND2TETRIS HARDWARE SIMULATOR HiLoMux - This has one 8-bit input bus, in, and one 4-bit output bus, out. Alsopresent is a sel input, which is used to select what appears on out. Ifsel is false, then out should contain the lower 4-bits of in (i.e. in[0],in[1], in[2], in[3]). If sel is true, then out should contain theupper 4-bits of in (i.e. in[4] mapped to out[0], in[5], mapped toout[1], etc.). In other words, the HiLoMux can be used to select anibble from a byte please use the skeleton program below CHIP HiLoMux{ IN in[8], sel; OUT out[4]; PARTS: }arrow_forward
- Assume we are using the simple model for floating-point representation discussed in the class (the representation uses a 14-bit format, 5 bits for the exponent with an Excess-M, a significand of 8 bits, and a single sign bit for the number): Convert 12.345 to the floating-point binary representation. (Remember we learned "implied one" format in the lecture) You need to type in the calculation steps or insert the picture of your handwriting using "insert" menu above.arrow_forward8 In the following code, use the dropdowns select the correct values of the register al at different points during the program. (Note: ignore the extra spaces inside of the brackets, they have to be there for the dropdowns to work correctly) .databyteArray BYTE 1, 2, 3, 4, 5, 6.codemov esi, OFFSET byteArrayadd esi, 3mov al, [esi ] ; al = ????Answer??????sub esi, 2mov al, [esi ] ; al = ???Answer??????? 9arrow_forwardtranslate the following MIPS code to C. Assume that the variables i, j, and k areassigned to the registers $s0, $s1, and $s2, respectively. Assume that the baseaddress of the array A is in registers $s6.Loop: blt $s0, $s1, Exitbge $s1, $s2, Exitaddi $s1, $s1, 5j LoopExit:addi $t0, $zero, 4ble $s0, $t0, Donesll $t1, $s0, 2add $t2, $s6, $t1sw $zero, 0($t2)Done:arrow_forward
- 5. Hamming Codes a) Suppose we want an error correcting code that will allow all single-bit errors to be corrected for memory words of length 15. How many check bits are necessary? b) Suppose we are now working with memory words of length 8. We have already calculated that we need 4 check bits, and the length of all codewords will be 12. We now receive the following code word: 010011011111 Is this a legal codeword, assuming even parity? If not, where is the error?arrow_forward3. A = 100101, B = 010111 are 1's complement numbers. Perform the following operations and indicate whether overflow exists: a) A+B b) A-B c) Repeat (a) and (b) assuming that A and B are 2's complement numbers.arrow_forwardVI. Floating point representation Consider a 12-bit variant of the IEEE floating point format as follows: • Sign bit 5-bit exponent with a bias of 15. • 6-bit significand All of the rules for IEEE 754 Standard apply. Fill in the numeric value represented by the following bit patterns. You must write your number in decimal form (e.g. 0.0146485375, -0.0146485375). Bit Pattern 010011101110 111011101011 100101001111 001010111010 Numerical Valuearrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education