Princess Bint Abdulrahman University CS 207D- Computer Architecture Faculty of Computer and Information Sciences Second Semester 1434/1435H Department of the Computer Sciences Sheet #5 6 ( Q1:Answer yourself Q2: Suppose an 8-bit data word stored in memory is 11000011. Using the Hamming algorithm, a) Determine what check bits would be stored in memory with the data word. Show how you got your answer. The check bits are in bit numbers 8, 4, 2, and 1. ® ® Check bit c8 = D12 D11® D10 D9 =1®1®0®0=0 Check bit c4= D12® D7® D6® D5 =1®0®0®1=0 ® Check bit c2 =D11® D10® D7® D6 D3 =1®0®0®0®1=0 ® Check bit c1 =D11® D9® D7® D5 D3 =1®0®0®1®1=1 Thus, the check bits are: 0 0 0 1 b) Suppose, for any reason the data bit in position 7 is error read, show how the error detected and corrected? The is detected where the reading data changed to 11001011 instead of 11000011, and the check bits reading 0110 instead of 0001 ® 0110 0001 …….. 0111 position 0111=position 7 has error so it is reading by wrong 1 and corrected to 0 Position 12 11 10 9 8 7 6 5 4 3 2 1 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 Position in binary Data 1 1 0 0 0 0 1 1 Check 0 0 0 1
CS 207D- Computer Architecture Second Semester 1434/1435H Sheet #5 6 Princess Bint Abdulrahman University Faculty of Computer and Information Sciences Department of the Computer Sciences ( Q1:Answer yourself Q2: Suppose an 8-bit data word stored in memory is 11000011. Using the Hamming algorithm, a) Determine what check bits would be stored in memory with the data word. Show how you got your answer. The check bits are in bit numbers 8, 4, 2, and 1. Check bit c8 = D12 ® D11® D10 ® D9 =1®1®0®0=0 Check bit c4= D12® D7® D6® D5 =1®0®0®1=0 Check bit c2 =D11® D10® D7® D6 ® D3 =1®0®0®0®1=0 Check bit c1 =D11® D9® D7® D5 ® D3 =1®0®0®1®1=1 Thus, the check bits are: 0 0 0 1 b) Suppose, for any reason the data bit in position 7 is error read, show how the error detected and corrected? The is detected where the reading data changed to 11001011 instead of 11000011, and the check bits reading 0110 instead of 0001 0110 ® 0001 …….. 0111 position 0111=position 7 has error so it is reading by wrong 1 and corrected to 0 Position 12 11 10 9 8 7 6 5 4 3 2 1 Position in binary 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 Data 1 1 0 0 0 0 1 1 Check 0 0 0 1
sheet%205%206%20Answer.docx