Multiple choice technology programming languages

How many Bytes does a PIC 9(7) COMP-3 occupy?

  1. 7

  2. 6

  3. 5

  4. 4

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

COMP-3 (packed decimal) uses half a byte per digit plus one nibble for the sign. For 7 digits: 6 digits use 3 bytes, the 7th digit shares a byte with the sign nibble, totaling 4 bytes. The formula is: bytes = (digits / 2) + 1, rounded up.