ISRO | ISRO CS 2013 | Question 11
When two BCD numbers 0x14 and 0x08 are added what is the binary representation of the resultant number?
(A) 0x22
(B) 0x1c
(C) 0x16
(D) results in overflow
Answer: (A)
Explanation: BCD numbers are binary coded decimal numbers in which each digit of a number is separately represented as a 4-bit binary number.
BCD Representation of 0x14 = 0001 0100 BCD Representation of 0x08 = 0000 1000 ------------ Addition = 0001 1100 In BCD addition, if a digit > 9, add 6 to it. so, 0001 1100 +0000 0110 -------------- 0010 0010
So in BCD addition, the resultant number is 22.
Quiz of this Question
Please Login to comment...