binarynumbershexnumber-systems

File reading in hexa editor


I am a bit curious about the file system and how a file is written in a disk. I have written 23 in a file.

enter image description here

While opening this file in hex editor, I found this like below

enter image description here

Why the hex editor is showing the file this way? I am curious to know.


Solution

  • Got the answer. In the hex editor, it shows the ASCII Hex value for the character.

    What happens while writing a text file, corresponding ASCII value is written in binary.

    Here, in my text editor, the value is 23.

    ASCII Decimal value of 2 is 50, ASCII hexaDecimal value is 32 and ASCII Binary is 110010

    ASCII Decimal value of 3 is 51, ASCII hexaDecimal value is 33 and ASCII Binary is 110011

    In the file, the binary value is written. But, As I open the file with a hex editor, it is showing the hex ASCII value of the corresponding character.