handle negatives correctly by adding sign bit to final result