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

  • Thread starter Thread starter Avichal
  • Start date Start date
  • Tags Tags
    Addition
Click For Summary

Discussion Overview

The discussion revolves around calculating the correction value for a 6-bit number in binary addition, particularly in relation to Binary-Coded Decimal (BCD) addition where a correction value of 6 is added when the sum exceeds 9. Participants explore how this concept translates to 6-bit binary numbers and seek to establish a method for determining the appropriate correction value.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants note that in BCD addition, a correction value of 6 is added when the sum exceeds 9, and they question how to prove this concept for a 6-bit number.
  • There is a reference to the binary representation of numbers, with one participant stating that 9 is represented as 1001 and 10 as 1010 in binary.
  • Another participant points out that in BCD, 10 is represented as 0001 0000, contrasting with the binary representation.
  • One participant proposes that the correction value for a 6-bit number could be calculated as the difference between the maximum value representable by the bits and 9, suggesting a formula: ((2^n)-1)-9, where n is the number of bits.

Areas of Agreement / Disagreement

Participants express uncertainty about how to prove the correction value for a 6-bit number, and there is no consensus on what that value should be. Multiple competing views on the calculation method are presented.

Contextual Notes

Participants discuss the relationship between BCD and binary representations, but there are unresolved mathematical steps and assumptions regarding the correction value for 6-bit numbers.

Avichal
Messages
294
Reaction score
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
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?
 
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?
 
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...
 
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.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
11K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 17 ·
Replies
17
Views
6K
Replies
2
Views
7K
  • · Replies 24 ·
Replies
24
Views
4K
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 64 ·
3
Replies
64
Views
7K
  • · Replies 13 ·
Replies
13
Views
4K