Hexadecimal encoding (hex encoder)

Hexadecimal notation is used as a human-friendly representation of binary values in computer programming and digital electronics. Encoder takes the string or any byte value and converts it to its hexadecimal representation. Given a sequence of bytes it will output each byte as hexadecimal number. In case of strings, its ASCII (or UTF8) byte values will be used as the base for encoding. You have an option of choosing the separator:

  • none []
  • space []
  • colon [:]
  • escape [\x]
  • prefix [0x]

Sample:

webacus
----- = -----
77:65:62:61:63:75:73

The 16 symbols that the hexadecimal system uses are: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E and F. So instead of a decimal symbol of 10, hexadecimal uses an A, and so on and so forth until we get to the decimal of 15 which is notated as F. Similar to the decimal system, after the base of 16 symbols has been used, the appropriate extra digit is added and the order of numbers starts over. In other words, after F, we begin with 10, and so on.[1]

Hexadecimal encoding is used by programmers to improve readability of bytes, which are used to communicate to computers. There are a number of benefits for using hexadecimal encoding, including the higher information density available, as hexadecimal encoding effectively reduces 8 digits of binary code to 2 hexadecimal digits. With this effect, 2 hexadecimal digits expresses any number from 0 to 255, the same scope of numbers as binary's 8 digits.[1]

Sources:
[1] string-functions.com/string-hex.aspx


Choose from 107 ops
Latest ops 0
Favorite ops 0
Calculations
0