请问在一个八位或十六位的系统上如何处理大整数运算问题?
例如在一个十六位的系统上,无符整型数最大应该是65535吧,如果要运算大于65535的数据怎么处理这个溢出的问题?在32位系统上好像有一些通用的大整数运算的库,那么在这些字长更小的系统上有没有什么更简单的办法呢?望高人指点!
[解决办法]
typedef struct tagBigInteger{ //defining a structrure to store a big integer.
char* raw_bytes;
int n;
}BigInteger;
BigInteger* bigIntegerParse(char* format,char* data);
//extract an integer from data with specified format.
BigInteger* bigIntegerAdd(BigInteger *data1,BigInteger *data2);
BigInteger* bigIntegerSub(BigInteger *data1,BigInteger *data2);
[解决办法]
从汇编那里继承过来的思想是,采用ASCII方式进行运算