Two values are stored in BCD format. They need to be added together. (a) Complete the BCD addition of 45 + 27 by filling in the table. Tens digit Units digi...

Assessment: Computer Science 0478 | Paper 1 Mock 01 | Computer Systems Subject: Computer Science - 0478

Question 1 Report

Two values are stored in BCD format. They need to be added together.

(a) Complete the BCD addition of 45 + 27 by filling in the table.

Tens digitUnits digit
First number (45)01000101
Second number (27)00100111
Binary sum  
Adjustment needed?  
Final BCD result  

[4]

(b) Explain why an adjustment of adding 0110 (6) is sometimes needed when performing BCD addition.

[2]

Answer Details

(a) BCD addition of 45 + 27:

Tens digitUnits digit
First number (45)01000101
Second number (27)00100111
Binary sum01101100
Adjustment needed?No (0110 <= 1001)Yes (1100 > 1001)
Final BCD result01110010

Units: 0101 + 0111 = 1100. Since 1100 (12) exceeds 1001 (9), add the correction 0110: 1100 + 0110 = 10010. Write 0010 (2) and carry 1 to tens. [1]

Tens: 0100 + 0010 + 0001 (carry) = 0111 (7). Since 0111 does not exceed 1001, no adjustment is needed. [1]

Final BCD: 0111 0010 = 72 in denary. Check: 45 + 27 = 72. Correct. [1]

(b) The correction of adding 0110 (6) is needed because BCD only uses the 4-bit codes 0000 to 1001 (representing 0 to 9). [1] When a binary addition of two BCD digits produces a result from 1010 to 1111 (10 to 15), these are invalid in BCD. Adding 6 skips over these six unused bit patterns and generates the correct carry into the next BCD digit, keeping the result as valid BCD. [1]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning