Twos complement representation required for 81 Bit Count

Back to General discussions forum

David_Meyer     2026-11-21 06:50:32

Problem #81 Bit Count depends on negative numbers being represented in two's complement format. While that is the format used by most computer systems today, it is not universal. For example, IBM z/OS systems use sign-magnitude representation.

I am not complaining. It added an interesting side-quest to the problem. But it might be worth noting in the problem text.

David_Meyer     2026-11-21 13:29:21

Never mind.

IBM z/OS does use two's complement format for negative numbers. I was misinterpreting the language reference manual and my two's complement side quest was unnecessary.

Please login and solve 5 problems to be able to post at forum