-1

I'll preface by saying I am not a computer specialist. My question is posted as a point of curiosity.

Scouring the web for answers, I have seen posted that hexadecimal could be used to store numerical information on hard drives. I have even asked on this site and received very well written and logical answers. But there are many sites where there are those that allege that hexadecimal can be used to store numerical information on a hard drive. Note: store, not display.

The prevailing logic in these cases is since hex digits are half bytes, or nibbles, they only occupy have the size of regular numerical value from a character set.

For every 100 bytes used to represent a number a 100 digits long, built from a character set, only 42 bytes may be used to store the same number sequence as hex digits. The equation: [100 log 10/log 16] is utilized to support this notion.

Yet, others have alleged that the actual storage of information in hexadecimal on a hard drive is not that efficient because the hex digits (A-F) would be stored as full characters requiring 8-bits, or 1 byte. For example, to store 1A34B7 would actually require at least two hex digits to represented with full bytes on the hard drive instead of half bytes for the numerical portions. It can display the value in half-bytes, but once storage comes into play, the character hex digits must use full bytes.

What is the reality of this scenario?

Thank you.

J. J.
  • 39
  • 1
  • 3
  • I think you are missign one key point. There are no stored numbers (base 10 or base 16). There is only stored information and the way you interpret them. – Hennes Feb 12 '17 at 21:42
  • And the interpretation asked is how would hexadecimal store on a hard disk and how would it interpret that information in the scenario posted above? Thank you. – J. J. Feb 12 '17 at 21:57
  • Please provide links to these sites that you cite. – sawdust Feb 13 '17 at 01:33

1 Answers1

0

I think your confusing a few topics.

If you had to store the number 100 on a computer, it would be stored in binary, hex 0x64, which would occupy a single byte. There are some caveats to that of course. Like it is perfectly fine to store the number 100 on a disk as a three byte value, but that would typically only happen when a computer is treating some stream of text as text.

In terms of the actual storage medium, In many cases, if the medium allows more than one bit of data to be stored, the manufacturer will attempt to to utilize that. For instance improving storage through shingled storage (for disks), or TLC (for SSD). Whatever the underlying method is however, the end result is that the manufacturer will provide a storage number in bytes.

Clarus
  • 763
  • 1
  • 6
  • 14
  • Thank you, Claris. I would think it safe to assume then that hex digits such as FF would also store as one full byte then, correct? – J. J. Feb 12 '17 at 22:02
  • 1
    *"If you had to store the number 100 on a computer, it would be stored in binary, hex 0x64"* -- Not entirely correct. You're only mention just one numeric format, a single byte integer. There are also multi-bye integer, fixed point, floating point, BCD, ASCII, and any other possible code (e.g. Grey code). The application program (not the *"manufacturer"*) can store the data in whatever format it chooses. – sawdust Feb 13 '17 at 01:43
  • 3
    Binary is usually thought of as the native representation of data in most processors. But this usually isn't very convenient for the developer or other purposes. Hexadecimal, decimal, or octal are usually more convenient. But these are usually just different ways of representing the same thing and have little meaning for internal storage. Internal storage will be whatever is considered most efficient. Whether that will be efficiency of storage, efficiency of access, or some compromise, is a decision the developer must make. – LMiller7 Feb 13 '17 at 02:15