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.
While opening this file in hex editor, I found this like below
Why the hex editor is showing the file this way? I am curious to know.
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 is32
and ASCII Binary is110010
ASCII Decimal value of 3 is
51
, ASCII hexaDecimal value is33
and ASCII Binary is110011
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.