design a new complement-based binary encoding scheme that encodes integers in the range of -68~187 in 8 bits
没理解题目。。为什么会出现这样的范围啊。。
一般来说,8位有符号数是-128~127,这里仅仅为了课程的需要,让你实现一个非标准的编码系统,只是教学的目的。
其实也很简单,你就用标准的值+60就是了。
比如说0原先表示0,现在表示60。FF原先表示-1,现在表示59,80原先表示-128,现在表示-68。