Machine-translated by Google. Questions are authored in English.
Top

Discussion

In BCD, the decimal number 25 is represented as

  • A.0010 0101
  • B.0001 1001
  • C.0011 0101
  • D.0010 1001

Answer: A

Correct answer: 0010 0101

In binary coded decimal each decimal digit is encoded separately in four bits. So 25 becomes 2 and 5 encoded individually: 2 is 0010 and 5 is 0101, giving 0010 0101. This is not the same as the pure binary value of 25, which is 11001 - the second option, and the usual trap. BCD deliberately sacrifices compactness for ease of conversion. Because only ten of the sixteen four-bit patterns are used, the six combinations from 1010 to 1111 are invalid in BCD, and arithmetic must correct for them: when a BCD addition produces a result above 9 or generates a carry, 6 is added to bring it back into range. The code is used wherever numbers are displayed or entered digit by digit - calculators, digital clocks, instrument panels - because converting each digit to a seven-segment display needs no division. The waste is about 20 per cent of the available codes.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.