Conversion Method:
- Identify the Magnitude (the positive equivalent) : Determine the magnitude of the negative denary number.
- Find the Binary Representation of the Magnitude: Convert the magnitude of the denary number to binary.(practice that here)
- Pad the Binary Representation: If necessary, pad the leftmost bits with zeros until the total length is 8 bits.
- Invert Bits: Invert all bits of the binary representation i.e. where it is a 0, change to a 1 and where it is a 1 change to a 0
- Add One: Add 1 to the inverted binary representation using binary addition.
Example:
Convert the negative denary number -37 to its 2's complement negative 8-bit binary representation.
- Magnitude: The magnitude of -37 is 37.
- Binary Representation of the Magnitude: Converting 37 to binary, we get: 00100101.
- Pad the Binary Representation: The binary representation already uses all 8 bits, so no padding is necessary.
- Invert Bits: Inverting all bits, we get: 11011010.
- Add One: Adding 1 to the inverted binary representation, we get: 11011010 + 1 = 11011011.
So, the 2's complement negative 8-bit binary representation of the negative denary number -37 is 11011011.