StreakPeaked· Practice

ExamsGATETechnical

The number of bytes required to represent the decimal number 1856357 in packed BCD (Binary Coded Decimal) form is

  1. 3
  2. 4
  3. 5
  4. 7

Correct answer: 4

Solution

In packed BCD each byte holds two decimal digits (4 bits each). The number 1856357 has 7 digits, so it needs ceil(7/2) = 4 bytes. The stored answer 5 is wrong; the correct answer is 4.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →