Reply To: hex to binary

Home Forums General Using Ctrlr hex to binary Reply To: hex to binary

  • Topics: 45
  • Replies: 550
  • Total: 595
  • ★★★

Hi, do you really need the specific binary display with 0 and 1?
Normally, getting the actual value (in whatever base) would be good enough
So supposing you can just give that value, it is enough to just use

tonumber(string.sub(your_data_string, start_pos, start_pos+1),16)
-- tonumber("0A",16) gives 10