1. rajmak88

    Thread Starter New Member

    Sep 18, 2010
    packed BCD is basically 2 decimal digits binary encoded into one byte
    and in case of unpacked BCD each byte represents just one decimal no....
    so where exactly these packed and unpacked BCD nos. find their application???
    unpacked BCD unnecessarily occupies extra space in memory...is there any kind of an advantage of using unpacked BCD inspite of such wastage of memory space???
  2. bretm


    Feb 6, 2012
    As essential storage, no, but sometimes you have to use one byte per digit, such as when you are converting a number to text. It may also be necessary for interfacing with other software or hardware that used BCD. But those are rare edge cases. Unpacked BCD isn't used very often.
  3. Papabravo


    Feb 24, 2006
    In the broad scheme of things, BCD packed or unpacked can be used for arbitrary precision calculations. Many computers of the "mainframe" era had specific instructions that worked on BCD. The System 360 had this feature. In financial calculations, in particular, converting to binary, doing the calculation, and converting back created certain problems. Even some microprocessors had instructions that facilitated BCD calculations like the DAA (Decimal Adjust Accumulator) and the conditional jump on the Half-Carry bit in the 8080.
  4. atferrari

    AAC Fanatic!

    Jan 6, 2004
    Packed saves space. I use it to cram info in less RAM. To extract each one you need some (even small) software overhead.

    Unpacked, uses the double of RAM. It means faster processing.To use each digit in a certain process you do not need that overhead.

    Wastage in this context is not an absolute term. It all depends what use it is destined for and what overheard it encompasses, as above.

    Yes, I know, you have software (and micros) able to work with packed BCD. If using these check how they implement the carry / borrow between digits inside the byte.