Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
40 views2 pages

Binary Addition Error Correction

When adding fixed-point decimals like $0.37 and $0.94 using binary addition, the results of adding certain digits like 3 + 9 and 7 + 4 produce numbers that are not single denary digits. This can cause incorrect results. To solve this, computers are programmed to detect these cases and add a "correction value" of 0110 (decimal 6) to produce a correct answer. The document demonstrates adding $0.37 + $0.94 using this binary error correction approach, carrying values between decimal places until reaching the final correct answer of 1.31.

Uploaded by

Riaz Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

Binary Addition Error Correction

When adding fixed-point decimals like $0.37 and $0.94 using binary addition, the results of adding certain digits like 3 + 9 and 7 + 4 produce numbers that are not single denary digits. This can cause incorrect results. To solve this, computers are programmed to detect these cases and add a "correction value" of 0110 (decimal 6) to produce a correct answer. The document demonstrates adding $0.37 + $0.94 using this binary error correction approach, carrying values between decimal places until reaching the final correct answer of 1.31.

Uploaded by

Riaz Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BCD Error Correction

Consider adding $0.37 and $0.94 together using fixed-point decimals.

$0.37 0 0 0 0 0 0 0 0 . 0 0 1 1 0 1 1 1
+ +
$0.94 0 0 0 0 0 0 0 0 . 1 0 0 1 0 1 0 0 Expected result = $1.31

Using binary addition, this sum will produce:


0 0 0 0 0 0 0 0 . 1 1 0 0 1 0 1 1 which produces 1 1 0 0 (denary 12) and 1
0 1 1 (denary 11), which is clearly incorrect. The problem was caused by 3
+ 9 = 12 and 7 + 4 = 11, as neither 12 nor 11 are single denary digits. The
solution to this problem, enabling the computer to store monetary values
accurately, is to add 0 1 1 0 (denary 6) whenever such a problem arises. The
computer can be programmed to recognise this issue and add 0 1 1 0 at each
appropriate point.
If we look at the example again, we can add .07 and .04 (the two digits in the
second decimal place) first.

0 1 1 1
+
0 1 0 0
=
1 0 1 1 This produces 1 0 1 1 which
isn’t a denary digit; this
will flag an error and the
computer needs to add
This now 1 0 1 1 0 1 1 0.
produces a fifth +
bit which is
0 1 1 0
carried to the
next decimal =
digit position. 1 0 0 0 1

457591_01_CI_AS & A_Level_CS_001-026.indd 11 25/04/19 9:11 AM


Now we will add .3 and .9 together (the two digits in the first decimal place)

1
remembering the carry bit from the addition above:

0 0 1 1
+
1 0 0 1
+
1
=
1 1 0 1

This produces 1 1 0 1 which isn’t a denary digit; this will flag an error and the
computer again needs to add 0 1 1 0.

1 1 0 1
This again produces +
a fifth bit which is 0 1 1 0
carried to the next =
decimal digit position. 1 0 0 1 1

Adding 1 to 0 0 0 0 0 0 0 0 produces:
0 0 0 0 0 0 0 1

Final answer:
0 0 0 0 0 0 0 1 . 0 0 1 1 0 0 0 1

which is 1.31 in denary – the correct answer.

457591_01_CI_AS & A_Level_CS_001-026.indd 12 25/04/19 9:11 AM

You might also like