Computer Science, asked by edricelvis, 5 months ago

An algorithm to calculate remainder of a division quotient..Pls Urgent

Answers

Answered by kokane73
0

Answer:

As a spare-time project, I'm trying to implement some cryptographic algorithms using free-standing C - that is, the variant of C without standard library functions (standard library types and constants are still available), and without optional features such as VLA (variable-length array).

One of the things I've done is implement a few functions for big integers (size > 128 bits). However, the function for integer division in this setting requires keeping track of remainder in its current form, and since I'm using free-standing environment, the caller has to supply space for it.

Is it possible to implement division algorithm for calculating quotient without relying on keeping track of remainder, and possibly using bitslicing technique? It's acceptable to use call recursion to keep variables on the stack.

We'll assume the type for big integer is bigint_t:

Similar questions