How do I calculate the correction value for a 6-bit number in binary addition?

  • Thread starter Avichal
  • Start date
  • Tags
    Addition
In summary, when counting in binary, the maximum number of digits you can use before a carry is 9. To carry over from one digit to the next, you add 6 to the number.
  • #1
Avichal
295
0
In BCD addition when the number exceed 9 we add 6 as the correction value. Although I tried all the cases and saw tthat 6 was indeed the asnwer, how do I prove that? Suppose that instead of BCD I had a 6-bit number, what would be the correction value for that coding?
 
Engineering news on Phys.org
  • #2
Avichal said:
In BCD addition when the number exceed 9 we add 6 as the correction value. Although I tried all the cases and saw tthat 6 was indeed the asnwer, how do I prove that? Suppose that instead of BCD I had a 6-bit number, what would be the correction value for that coding?

http://en.wikipedia.org/wiki/Binary-coded_decimal

When you get to 0x09, what is the binary representation of it? And to get to 0x10, what do you have to add to 0x09?
 
  • #3
What is x in 0x09. Anyways for 9 representation is 1001 and for 10 its 1010 in binary.
In BCD representation for 9 is the same but for 10 its 0001 0000 instead of 1010.
We need to add 6 for that - I get that but how to prove it?
 
  • #4
Avichal said:
What is x in 0x09. Anyways for 9 representation is 1001 and for 10 its 1010 in binary.
In BCD representation for 9 is the same but for 10 its 0001 0000 instead of 1010.
We need to add 6 for that - I get that but how to prove it?

Standard notation. 0x = hex, 0b = binary...
 
  • #5
The max amount of digits that a decimal increments before a carry is 9. The four bits used in the BCD nibble allows the max value of 16 to be counted. Therefore to properly carry from one nibble to the next 6 is added to any value above 9 to implement a carry to the next nibble. As for the the six bit number I would assume it would be the difference between the max size of the amount of bits you are using and 9.
((2^n)-1)-9= the amount needed to carry into the next group of bits
where n is the number of bits used.
 

FAQ: How do I calculate the correction value for a 6-bit number in binary addition?

Why do we add 6 in BCD addition?

In BCD addition, we add 6 because it is the binary equivalent of the decimal number 2. This is because in BCD (Binary-coded decimal) representation, each decimal digit is represented by a 4-bit binary code. And the binary code for the decimal number 2 is 0110. Therefore, we add 6 to ensure that the carryover from each digit does not exceed 9 (the highest decimal number that can be represented by a 4-bit binary code).

Can't we just add 2 instead of 6 in BCD addition?

No, adding 2 instead of 6 in BCD addition would result in incorrect calculations. This is because the binary code for the decimal number 2 (0010) does not match with the binary equivalent of the decimal number 2 in BCD representation (0110). Therefore, adding 2 would not prevent the carryover from exceeding 9, and the resulting sum would be incorrect.

Is adding 6 a universal rule in BCD addition?

No, adding 6 is not a universal rule in BCD addition. It is specific to BCD representation, where each decimal digit is represented by a 4-bit binary code. In other forms of binary addition, such as pure binary or 2's complement, there is no need to add 6 as the carryover is determined by the highest binary number that can be represented by the number of bits being used.

Is there a reason why we add 6 and not another number in BCD addition?

Yes, there is a reason why we add 6 and not another number in BCD addition. As mentioned earlier, the binary code for the decimal number 2 (0110) is the only one that matches with its BCD representation. Other decimal numbers have different binary codes, which would result in incorrect calculations if used as the carryover number in BCD addition.

What happens if we add a number other than 6 in BCD addition?

If we add a number other than 6 in BCD addition, the resulting sum would be incorrect. This is because the carryover number is crucial in BCD addition to ensure that the carryover from each digit does not exceed 9. Using any other number would not guarantee this, and the final result would be inaccurate.

Similar threads

Replies
12
Views
11K
Replies
1
Views
873
Replies
13
Views
2K
Replies
17
Views
5K
Replies
24
Views
1K
Replies
8
Views
2K
Back
Top