Multiple choice technology mainframe

Where will be the sign stored in COMP field?

  1. How can u store a sign in COMP?huh!

  2. You can store sign only in COMP-3

  3. Most significant bit

  4. Most significant byte

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

In COMP (binary computational) format, the sign is stored in the most significant bit (MSB) of the binary representation. A value of 0 in the MSB indicates a positive number, while 1 indicates negative. This differs from COMP-3 (packed decimal) where the sign uses a separate nibble in the last byte.

AI explanation

In a COBOL COMP (binary) field, the sign of the value is stored in the most significant bit of the binary representation (0 for positive, 1 for negative) — this is standard two's-complement-style binary signed representation used by mainframe COMP fields. This differs from COMP-3 (packed decimal), where the sign is instead stored as a half-byte (nibble) in the rightmost position of the field. 'Most significant byte' is imprecise/wrong since it's specifically the sign bit, not a whole byte, that carries the sign in COMP.