Jump to content

Converting a number to a binary code


Recommended Posts

  • Administrators

Recently an interesting question came up about converting a number to binary within Seeq. The goal was to convert an integer (0-255) to an 8-bit binary number.  This can be done by dividing the integer by 2, 8 times and keeping track of the remainders.  More information about binary numbers can be found here. https://en.wikipedia.org/wiki/Binary_number


Note: For this conversion to work the input signal needs to be an integer between 0 and 255, also it cannot have units.

Below is the formula syntax that will do the conversion.









Below is a screenshot of the syntax in the formula tool.




  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...