Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

How to do unsigned integer/64 bit ops?

WSinc
New Contributor I
555 Views
When dealing with other platforms where some of the data (telemetry for example) is unsigned integers, is there a way to treat such quantities accordingly in the compiler? I could not find the equivalent of the UNSIGNED key word, like in C++.

Also, how can I do a 32 bit by 32 bit unsigned multiply to get a 64 bit unsigned result? I would eventually like to develop a long number package when I can do operations with very long integers, as for example encryption algorithms.

Example: C=A*B where A and B are 512 bits each, but also to be able to take a MODULO, do long division, etc.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
555 Views
Fortran doesn't have the concept of "unsigned".

There's an existing quadruple-precision arithmetic package, pointed to from our Companion Products page.

The next version, free to 6.5 users, will support INTEGER*8 (and LOGICAL*8). Look for it in August.

Steve
0 Kudos
Reply