Brian Dunning's FileMaker Custom Functions

ntBitwiseOperation ( ope ; base ; value1 ; value2 )

Fast Bitwise Operation

  Average rating: 4.5 (31 votes) Log in to vote

Norimichi Tachibana   Norimichi Tachibana
none
none

Share on Facebook Share on Twitter

  Sample input:
ntBitwiseOperation("OR" ; 2 ; "10101" ; "111")
ntBitwiseOperation("XOR" ; 8 ; "3721" ; "437")
ntBitwiseOperation("AND" ; 16 ; "EFD8" ; "F0AC7")
ntBitwiseOperation("NOT" ; 16 ; "EFD8" ; "")
ntBitwiseOperation(">>" ; 2 ; "01101110" ; "3")
ntBitwiseOperation("<<" ; 16 ; "F0" ; "2")
  Sample output:
"10111"
"3316"
"00AC3"
"1024"
"00001101"
"C0"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

[Format]
ntBitwiseOperation ( ope ; base ; value1 ; value2 )

[Parameters]
ope: "OR", "NOR", "XOR", "AND", "NAND", "NOT","<<",">>"
base: numeral system base of value1 and value2
"2" binary number "8" octal number "16" hexadecimal number
value1: MAX 800bits (bin 800digits, oct 266digits, hex 200digits)
value2: MAX 800bits (bin 800digits, oct 266digits, hex 200digits)
If ope is "NOT", value2 number is ignored.

[Require Functions]
ntRepeat

 

Comments

Jeremy   Jeremy, USA
Jul 18, 2014
This is a *very* clever technique you've come up with. I'm curious to see what the other methods are that you're comparing to. Have you published a file demonstrating your test results anywhere?
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.