S
Skybuck Flying
- Jan 1, 1970
- 0
Hello,
type
Tbig = array of byte;
vAddTable : array[0..255,0..255] of array[0..1] of byte;
// [0] = value
// [1] = transport/carry
vMulTable : array[0..255,0..255] of array[0..1] of byte;
// [0] = value
// [1] = value
procedure BigMul( const A : Tbig; const B : Tbig; var C : Tbig );
The mission is to:
1. Multiply A and B and store result in C.
2. Use lookup tables only.
3. Use bytes and words only. (8 bit and 16 bit)
4. No native/cpu arithmetic is allowed.
Can you implement it ?
Code can be in Delphi/Pascal or C/C++ with slightly modified prototypes,
example:
void BigMul( char A[], int LengthA, char B[], int LengthB );
Bye,
Skybuck.
type
Tbig = array of byte;
vAddTable : array[0..255,0..255] of array[0..1] of byte;
// [0] = value
// [1] = transport/carry
vMulTable : array[0..255,0..255] of array[0..1] of byte;
// [0] = value
// [1] = value
procedure BigMul( const A : Tbig; const B : Tbig; var C : Tbig );
The mission is to:
1. Multiply A and B and store result in C.
2. Use lookup tables only.
3. Use bytes and words only. (8 bit and 16 bit)
4. No native/cpu arithmetic is allowed.
Can you implement it ?
Code can be in Delphi/Pascal or C/C++ with slightly modified prototypes,
example:
void BigMul( char A[], int LengthA, char B[], int LengthB );
Bye,
Skybuck.