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.

Under construction. Email me your wish list for improvements.