def test_pos_number(self): self.assertEqual( RegisterSegment.to_twos_comp_int([0, 0, 1, 1, 0, 0, 0, 0]), 12)
def test_neg_number(self): self.assertEqual( RegisterSegment.to_twos_comp_int([0, 1, 0, 1, 1, 1, 1, 1]), -6)
def test_pos_number(self): self.assertEqual( RegisterSegment.to_twos_comp_int([0, 0, 1, 1, 0, 0, 0, 0]), 12)
def test_neg_number(self): self.assertEqual( RegisterSegment.to_twos_comp_int([0, 1, 0, 1, 1, 1, 1, 1]), -6)