The problem that I'm having trouble in understanding is how the addition of two decimal numbers such as 17 + 4 can be represented using the weighted BCD CODE, [7 4 -2 -1] and binary addition techniques.
From what I have understood when doing BCD Addition using the [8 4 2 1] coding is that when the sum of a 4-bit result is <9 then the result is valid. When there is a carry from a sum into the next group of bits then we need to add 6 to the code in order to put it into 8421 code since BCD does not allow codes 10-15. The other case is when the 4-bit result is >9 then we will also add 6 to the bit to return it to the [8 4 2 1] format.
When trying this same logic on the sum of 17 + 4 = 21 I was not able to obtain the representation of 21 using the given coding. The answer should be:
0110 0111 = 21
My logic used for the question was the following:
I have read some further material related to the addition of BCD codes but closest I found was an example using Aiken-Code,  coding.