Arbitrary Length Math with a 56F8013

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Arbitrary Length Math with a 56F8013

跳至解决方案
2,707 次查看
jag
Contributor IV
Hi,
for a program I'm doing I need to do some math with very large numbers.
Very large numbers means 64 bits (signed) variables.
Just to be clear: it is not my decision to use 64 bit variables.
The problem is, as I think you have understood, that the 56800/E can NOT use 64 bit variables, but "only" 32 bits.
So I need to split the 64 bit variable in 2 chucks of 32 bit each, and do the math (only + and - luckily) with these 32 bits chucks.
Now I'm wondering if exist some algorithm already implemented for the 56800/E that do this kind of math.
Or else I'll write it, but I've no uidea how to manage the overflow (and underflow) of the low chuck.

Thanks Bye Jack
标记 (1)
0 项奖励
回复
1 解答
1,550 次查看
jag
Contributor IV
I reply to myself :smileytongue:.

The 56800/E core can do 64 bit addition and subtraction (cfr. pag. 5-29 of DSP 56800E Reference Manual).

So problem solved. Or at least I don't have to implement the algorithm myself.
Now I just have to search for the C function (or write the assembler routine in my C code).

Bye Jack

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,551 次查看
jag
Contributor IV
I reply to myself :smileytongue:.

The 56800/E core can do 64 bit addition and subtraction (cfr. pag. 5-29 of DSP 56800E Reference Manual).

So problem solved. Or at least I don't have to implement the algorithm myself.
Now I just have to search for the C function (or write the assembler routine in my C code).

Bye Jack
0 项奖励
回复