cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
txnelson
Super User

Need to read the binary's from a numeric JMP variable

I have a need to read the imbedded binary values in a numeric field.  I developed the following script that appears to work, but it is not as nice as I hoped it could be.

x = 19;

thehex = Hex( x );

binary = Associative Array(

      {{"0", "0000"}, {"1", "0001"}, {"2", "0010"}, {"3", "0011"}, {"4", "0100"},

      {"5", "0101"}, {"6", "0110"}, {"7", "0111"}, {"8", "1000"}, {"9", "1001"},

      {"A", "1010"}, {"B", "1011"}, {"C", "1100"}, {"D", "1101"}, {"E", "1110"},

      {"F", "1111"}}

);

TheBinary = "";

For( i = 1, i <= 4, i++,

      thebinary = thebinary || binary[Uppercase( Substr( thehex, i, 1 ) )]

);

Is there an easier way?

Jim
3 REPLIES 3
pmroz
Super User

Re: Need to read the binary's from a numeric JMP variable

There's a nice base converter here:

txnelson
Super User

Re: Need to read the binary's from a numeric JMP variable

Thanks for the pointer, but it does not give me what I need.  What I am looking for is code that will return the 0/1 string representative of an integer value in JMP. 

Jim
pmroz
Super User

Re: Need to read the binary's from a numeric JMP variable

By 0/1 string I assume you mean base 2 conversion?  That function does it.  for example here's 19 converted to base 2:

print(base(19, 2))

In the log window:

"10011"

Recommended Articles