Respuesta :
Answer:
1. 2437 base 10 = 0000100110000101 base 2
2. 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1
Explanation:
1. To convert a number from decimal to binary you successively divide the number by two, if the remainder (modulo) of the operation is 0 the binary number in that position is 0 otherwise the binary number is 1. You continue dividing the whole number by two, until the whole number equal to zero. The final binary number is going to be all the remainders, from bottom to top or from right to left.
2437/2 = 1218 with remainder of 1
1218/2 = 609 with remainder of 0
609/2 = 304 with remainder of 1
304/2 = 152 with remainder of 0
152/2 = 76 with remainder of 0
76/2 = 38 with remainder of 0
38/2 = 19 with remainder of 0
19/2 = 9 with remainder of 1
9/2 = 4 with remainder of 1
4/2 = 2 with remainder of 0
2/2 = 1 with remainder of 0
1/2 = 0 with remainder of 1
Therefore the number is (from bottom to top): 0000100110000101, the four zeros at the beginning are to make the number a binary of 16-bits, remember than leading zeros have no value.
2. First select all the positions in the binary number that are power of two and mark them as parity bits (1, 2, 4, 8, 16, 32 ...), all other position (3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15 ...) are for the data to be encode, each parity bit compute the parity of some of the bits in the codeword as follow:
Position 1: check 1, skip 1, check 1, skip 1 ...
Position 2: check 2, skip 2, check 2, skip 2 ...
Position 4: check 4, skip 4, check 4, skip 4 ...
Position 8: check 8, skip 8, check 8, skip 8 ...
Position 16: check 16, skip 16, check 16, skip 16 ...
...
Finally, set a parity bit to 1 if the total number of 1 in the positions it checks is odd, set it to zero otherwise.
let's start:
- 0000100110000101 -> _ _ 0 _ 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1 (positions _ are parity bits)
- Start in 1, check 1, skip 1: x _ 0 _ 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1 -> because the number of ones is even, there are 4 ones, the first number is a zero; the new bit string is -> 0 _ 0 _ 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1
- Start in 2, check 2, skip 2: 0 x 0 _ 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1 -> because the number of ones is odd, there are 3 ones -> 0 1 0 _ 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1
- Start in 4, check 4, skip 4: 0 1 0 x 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1 -> because the number of ones is odd -> 0 1 0 1 0 0 0 _ 1 0 0 1 1 0 0 _ 0 0 1 0 1
- Start in 8, check 8, skip 8: 0 1 0 1 0 0 0 x 1 0 0 1 1 0 0 _ 0 0 1 0 1 -> because the number of ones is odd -> 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 _ 0 0 1 0 1
- Start in 16, check 16, skip 16: 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 x 0 0 1 0 1 -> because the number of ones is even -> 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1
Therefore, our result is: 0 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 1