Answer:
eeee3eeeeeeeeeeeeeeeeeeee
Answer:
See Explanation
Explanation:
Given
The attached function
What the recursion does is that; it adds up individual digits from N to 0
Solving (a): Each output when N = 6
For N = 6.
The function returns the following values:
f(6) = 6
Then: 6 + f(5)
Then: 6 + 5 + f(4)
Then: 6 + 5 + 4 + f(3)
Then: 6 + 5 + 4 + 3 + f(2)
Then: 6 + 5 + 4 + 3 + 2 + f(1)
Then: 6 + 5 + 4 + 3 + 2 + 1 + f(0)
Then: 6 + 5 + 4 + 3 + 2 + 1 + 0 = 21
Solving (b): The output when N = 7
Using the same process in (a) above.
The output is 28
Answer:
010100000001101000101
Explanation:
When an error occurs in data bits, the SEC code is used to determine where the error took place. 5 check-bits are needed to generate SEC code for 16-bits data word. The check bits are:
C16=0, C8=0, C4=0,C2=0,C1=1
Therefore the SEC code is 010100000001101000101