Numerical Service Extension
Contributed by Lijun
- Add functions for data conversion among binary, hexadecimal and decimal
- Change decimal data type from long to ulong in order to correct errors in
data conversion and bitwise operations
- Rewrite bitwise operations in order to increase performance as well as to
correct errors in data conversion and bitwise operations. As a result, the extended
bitwise operations are 7 times faster than the original pfcs. It is quite efficient
to use this n_cst_numerical for encryption and decryption.
- Add of_hex (as_binary), of_hex (aul_decimal), of_binary (as_hex), and
- For individual bits, use PB script equivalents in place of bitwise
operations as follows:
|a && b
|a || b
|a XOR b
- For binary to decimal conversion, call of_decimal (as_data, 0)
- for binary to hexadecimal conversion, call of_hex (as_binary)
- For hexadecimal to decimal conversion, call of_decimal (as_data, 1)
- For hexadecimal to binary conversion, call of_binary(as_hex)
- For decimal to hexadecimal conversion, call of_hex (aul_decimal)
||Changed the A XOR B bitwise operation from
abs(a-b) to mod(a+b, 2)
||Corrected an error in binary-hexadecimal
Interested in contributing material to this web site? Send an email to email@example.com, but don't forget to check the contribution guidelines first.
For information or suggestions about
this web site please contact firstname.lastname@example.org
sponsored by Dynamic Technology Group.
The information on this site is provided for advice only and not to be considered a
contract or a liability against Dynamic
Last Revised: February 15, 2004 03:58 AM.