Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are benefits that hexadecimal provides? And is it really octal is less common than hexadecimal?

share|improve this question
up vote 10 down vote accepted

Well, I mean, the computer itself doesn't store any values in hexadecimal, it stores them as binary. However, we do choose to represent them as hexadecimal digits, for one main reason -- it's the easiest, most concise way to represent bytewise data:

0110 1011 becomes 6B in hex

Octal would require grouping of digits into 3, which would not allow for separation at byte level:

01 101 011 becomes 153 in octal

Note that the most significant digit will never be greater than 3.

share|improve this answer
Thank you very much! – DatVM Jan 3 '12 at 6:49

From wikipedia:

All modern computing platforms, however, use 16-, 32-, or 64-bit words, further divided into eight-bit bytes. On such systems three octal digits per byte would be required, with the most significant octal digit representing two binary digits (plus one bit of the next significant byte, if any). Octal representation of a 16-bit word requires 6 digits, but the most significant octal digit represents (quite inelegantly) only one bit (0 or 1). This representation offers no way to easily read the most significant byte, because it's smeared over four octal digits. Therefore, hexadecimal is more commonly used in programming languages today, since two hexadecimal digits exactly specify one byte.

share|improve this answer

As said before, everything is stored in binary. Think; the IPv4-adress in binary it would be 11000000.10100000.00000000.00000001. Imagine an IPv6-address written in binary. It would be unpractical.

share|improve this answer
As an aside, the dotted-decimal IP address is the unsigned int 3232235521 which how it's actually stored (which translates into the binary you've posted, but without the dots). – Mark Henderson Jan 20 '15 at 4:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .