The Two Zeros Problem in Sign-Magnitude
Early digital systems used sign-magnitude representation for signed integers before the industry standardized on two's complement. An 8-bit sign-magnitude integer reserves the most significant bit (MSB) for the sign, where 0 is positive and 1 is negative. The remaining 7 bits store the magnitude.
A standard hardware comparator checks for equality by performing a bitwise XOR between two numbers and flagging an inequality if the result contains any 1s. Identify the bit patterns for positive and negative zero in this 8-bit system. Determine the output of a bitwise XOR equality check between these two representations and evaluate the hardware implications.
Constraints
- Assume an 8-bit architecture.
- Bit 7 is the sign bit.
- Bits 6 down to 0 represent the magnitude.
- Provide all binary answers as exactly 8 bits without spaces.
Topics
Solve this problem
Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.
This problem is part of Codiode Pro. The statement above is free to read.
The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.