flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
nooob
hello gurus
how to convert a huge negative or positive 128 bit number or above from decimal to hexadecimal using only 486 32 bit instructions set? |
|||
![]() |
|
vid
You need to create your own set of bignum routines, capable to add digit to bit number, and capable to multiply big number by 10.
Then you must convert decimal number to bignumr: set big num X to 0, and go from low (last) to high (first) digit of decimal number. For each digit, multiply x by 10, and then add value of digit to x. When you are done with that, converting binary big number to hex is very easy, just one hex digit per 4 bits of big number. About manipulation with bignums, see this article: http://x86asm.net/articles/working-with-big-numbers-using-x86-instructions/index.html |
|||
![]() |
|
Vasilev Vjacheslav
use miracl and do not reinvent the wheel
|
|||
![]() |
|
bitRAKE
Accumulate digits to a larger (like 10^9) base then merge with BIGINT for speed. Wheels should be reinvented because the roads are changing...
|
|||
![]() |
|
Vasilev Vjacheslav
i suggest to use square wheels if so
![]() |
|||
![]() |
|
bitRAKE
There are roads where square wheels would be optimal!
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.