Brian Dunning's FileMaker Custom Functions

Bin2Dec ( bin ; dmy )

Converts binary number to decimal number

  Average rating: 4.1 (40 votes) Log in to vote

F. Osman Cabi   F. Osman Cabi
Cabitas
http://www.cabitas.com

Share on Facebook Share on Twitter

  Sample input:
Bin2Dec ( 1100101010110001 ; 0 )
  Sample output:
51889

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

This function converts binary number to decimal number by the help of recursive function feature of FileMaker Pro. The parameter dmy must be blank or zero for initial condition.

Syntax:Bin2Dec ( binaryNumField ; "" ) or
Syntax:Bin2Dec ( 1010111 ; 0 )

 

Comments

ashan   ashan, sri lanka
Apr 26, 2015
123
 
John   John
May 9, 2019
Thanks a lot for your function because I am terrible at recursions. I want to use this functions to check a puzzle for errors. My Question is...
 
John   John
May 9, 2019
Thanks a lot for your function because I am terrible at recursions. I want to use this functions to check a puzzle for errors. My Question is... Is it true that you only get the same decimal output if the binairy input is the same? I think it is because the only way to get 5 is if you write 101 but is that also true for larger numbers?
 
John   John
May 9, 2019
Oh and I don't understand what dmy means so what is its function?
 

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.