Brian Dunning's FileMaker Custom Functions

BinBitOperation_cf ( bin1 ; bin2 ; optype ; i ; result )

Applies NOT, OR, AND, XOR operations to two binary numbers

  Average rating: 4.4 (29 votes) Log in to vote

Christopher Gauntt   Christopher Gauntt
Cordega Solutions
http://cordega.com

Share on Facebook Share on Twitter

  Sample input:
BinBitOperation_cf ( "01101001" ; "01100011" ; "OR" ; 1 ; "" )
BinBitOperation_cf ( "01101001" ; "01100011" ; "NOT" ; 1 ; "" )
BinBitOperation_cf ( "01101001" ; "01100011" ; "AND" ; 1 ; "" )
BinBitOperation_cf ( "01101001" ; "01100011" ; "XOR" ; 1 ; "" )
BinBitOperation_cf ( "1101001" ; "01100011" ; "OR" ; 1 ; "" )
BinBitOperation_cf ( "01101001" ; "01100011" ; "R" ; 1 ; "" )
  Sample output:
01101011
10010110
01100001
00001010
error: unequal lengths
error: missing operation type

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

This function allows you to take two binary numbers of equal lengths and apply the bit-wise OR, XOR, or AND functions to them.

You can also apply a NOT function to a single binary. The second binary number (if any) in that case is ignored.

 

Comments

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.