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
AI Thread Summary
In BCD addition, when the sum exceeds 9, a correction value of 6 is added to facilitate proper carrying to the next nibble. This is because the maximum value for a 4-bit BCD is 15, and adding 6 ensures that the next nibble correctly represents the decimal value. For a 6-bit number, the correction value can be calculated as the difference between the maximum representable value (63 for 6 bits) and 9, resulting in a formula of ((2^n)-1)-9. This approach ensures that any value exceeding 9 is properly adjusted for binary addition. Understanding these principles is crucial for accurate binary arithmetic operations.
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.
 
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Thread 'How Does Jaguar's 1980s V12 Dual Coil Ignition System Enhance Spark Strength?'
I have come across a dual coil ignition system as used by Jaguar on their V12 in the 1980's. It uses two ignition coils with their primary windings wired in parallel. The primary coil has its secondary winding wired to the distributor and then to the spark plugs as is standard practice. However, the auxiliary coil has it secondary winding output sealed off. The purpose of the system was to provide a stronger spark to the plugs, always a difficult task with the very short dwell time of a...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top