cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-14302%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3Ehow%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14302%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3EHello%2C%20Gurus%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20have%20a%20very%20simple%20question%20on%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column(named%20Flags)%20to%20numbers.%20My%20column%20values%20will%20be%20like%20%220x1BA1%22.%20I%20would%20like%20to%20extract%20the%20bits%208%20and%209%20values%20and%20convert%20them%20to%20a%20value%20of%203%20into%20my%20new%20column.%20Since%20I%20don't%20know%20the%20binary%20operation%20in%20jmp%2C%20I%20tried%20to%20extract%20B%20into%2011%20first%20by%20doing%20the%20following%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EChar%20To%20Hex(Munger(%3AFlags%2C%204%2C%201)).%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIt%20gives%20me%20a%20character%20column%20of%2042.%20I%20tried%20to%20put%20a%20%22integer%22%20in%20to%20the%20formula%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EChar%20To%20Hex((Munger(%3AFlags%2C%204%2C%201))%2C%20%22integer%22)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBut%20it%20wouldn't%20recognize%20it.%20I'm%20using%20jmp11.2.1.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAfter%20extracting%20B%2C%20I'll%20use%20module(module(value%2C8)%2C4)%20to%20get%20the%20lower%202%20bits.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIf%20there's%20an%20easy%20way%20to%20extract%20binary%20bits%2C%20that%20will%20be%20even%20better.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EJane%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14308%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14308%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThank%20you%2C%20MS.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20tried%20the%20concat%20%220%22%20and%20it%20works.%3C%2FP%3E%3CP%3EJane%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14307%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14307%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%2C%20Craig%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you.%20The%20magic%20%220%22%20in%20front%20of%20%22B%22%20is%20the%20key.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EJane%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14306%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14306%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAs%20Craige%20pointed%20out%20(thanks%2C%20I%20was%20not%20aware)%2C%20JMP%2011%20requires%20an%20even%20number%20of%20hex%20characters.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ETry%20this%20formula%20for%20single%20character%20substrings%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHex%20To%20Number%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23942193%3B%22%3E%220%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%7C%7C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3ESubstr%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E(%3C%2FSTRONG%3EFlags%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E4%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E1%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E))%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14305%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14305%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHello%2C%20MS%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20have%20trouble%20with%20these%20%22Hex%20to%20..%22%20command.%20They%20don't%20work%20on%20my%20case.%20Here's%20the%20screen%20copy.%20I%20don't%20know%20what%20could%20be%20wrong.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EJane%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20805px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%229804_substr.jpg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F2176i5AB04C5960637D1C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%229804_substr.jpg%22%20alt%3D%229804_substr.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14304%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14304%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3Ebefore%20JMP%2012%20you'll%20need%20an%20even%20number%20of%20hex%20characters%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHex%20To%20Number(%20%220B%22%20)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E11%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-14303%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20how%20to%20extract%20certain%20bits%20from%20a%20string%20hex%20column%20to%20number%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-14303%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThere%20is%20a%20function%20Hex%20to%20Number()%20that%20converts%20hexadecimal%20numbers%20(as%20strings)%20to%20decimal%20numbers.%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%20color%3A%20%23942193%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Ehex%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%220x1BA1%22%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%20color%3A%20%23008f00%3B%22%3E%2F%2F%20Hex%20to%20decimal%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%20color%3A%20%23032ce4%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Evalue%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3EHex%20To%20Number%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3C%2FSPAN%3ESubstr%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E(%3C%2FSTRONG%3Ehex%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E4%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E1%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E))%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EShow%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Evalue%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%20color%3A%20%23008f00%3B%22%3E%2F%2F%20decimal%20to%20binary%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3Ebin%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23942193%3B%22%3E%22%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EWhile%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Evalue%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bin%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EChar%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EModulo%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3ENum%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Evalue%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E2%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3E))%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%7C%7C%3C%2FSPAN%3E%20bin%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20value%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EFloor%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Evalue%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2F%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E2%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EShow%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Ebin%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%20color%3A%20%23008f00%3B%22%3E%2F%2F%20Reverse%20last%20step%20for%20confirmation%20(or%20just%20for%20fun)%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3Evalue2%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3ESum%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E2%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%5E%3C%2FSPAN%3E%20%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3ELoc%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EReverse%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EWords%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Ebin%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23942193%3B%22%3E%22%22%3C%2FSPAN%3E%3CSTRONG%3E))%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23942193%3B%22%3E%221%22%3C%2FSPAN%3E%3CSTRONG%3E)%3C%2FSTRONG%3E%20%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E-%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%3CSTRONG%3E1%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3E))%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22font-family%3A%20Courier%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3EShow%3C%2FSPAN%3E%3CSTRONG%3E(%3C%2FSTRONG%3Evalue2%3CSTRONG%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

how to extract certain bits from a string hex column to number ?

Hello, Gurus,

I have a very simple question on how to extract certain bits from a string hex column(named Flags) to numbers. My column values will be like "0x1BA1". I would like to extract the bits 8 and 9 values and convert them to a value of 3 into my new column. Since I don't know the binary operation in jmp, I tried to extract B into 11 first by doing the following

Char To Hex(Munger(:Flags, 4, 1)).

It gives me a character column of 42. I tried to put a "integer" in to the formula

Char To Hex((Munger(:Flags, 4, 1)), "integer")

But it wouldn't recognize it. I'm using jmp11.2.1.

After extracting B, I'll use module(module(value,8),4) to get the lower 2 bits.

If there's an easy way to extract binary bits, that will be even better.

Thank you,

Jane

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: how to extract certain bits from a string hex column to number ?

As Craige pointed out (thanks, I was not aware), JMP 11 requires an even number of hex characters.

Try this formula for single character substrings:

Hex To Number("0" || Substr(Flags, 4, 1));

View solution in original post

6 REPLIES 6
ms
Super User (Alumni) ms
Super User (Alumni)

Re: how to extract certain bits from a string hex column to number ?

There is a function Hex to Number() that converts hexadecimal numbers (as strings) to decimal numbers.

Example:

hex = "0x1BA1";

// Hex to decimal

value = Hex To Number(Substr(hex, 4, 1));

Show(value);

// decimal to binary

bin = "";

While(value,

    bin = Char(Modulo(Num(value), 2)) || bin;

    value = Floor(value / 2);

);

Show(bin);

// Reverse last step for confirmation (or just for fun)

value2 = Sum(2 ^ (Loc(Reverse(Words(bin, "")), "1") - 1));

Show(value2);

Craige_Hales
Super User

Re: how to extract certain bits from a string hex column to number ?

before JMP 12 you'll need an even number of hex characters:

Hex To Number( "0B" )

11

Craige

Re: how to extract certain bits from a string hex column to number ?

Hi, Craig,

Thank you. The magic "0" in front of "B" is the key.

Jane

Re: how to extract certain bits from a string hex column to number ?

Hello, MS,

I have trouble with these "Hex to .." command. They don't work on my case. Here's the screen copy. I don't know what could be wrong.

Thank you,

Jane

9804_substr.jpg

ms
Super User (Alumni) ms
Super User (Alumni)

Re: how to extract certain bits from a string hex column to number ?

As Craige pointed out (thanks, I was not aware), JMP 11 requires an even number of hex characters.

Try this formula for single character substrings:

Hex To Number("0" || Substr(Flags, 4, 1));

Re: how to extract certain bits from a string hex column to number ?

Thank you, MS.

I tried the concat "0" and it works.

Jane

Recommended Articles