Question:
Why conversion from Hexadecimal to Binary or Octal to Binary is needed now?
?
2014-06-25 23:43:56 UTC
Dear

We know that, Computer recognizes only two states of digital signal i.e. 0 or 1. Now, if we’ve got a Decimal number, for example 4578, we can easily convert by Decimal to Binary conversion method in order to have 0 & 1 combinations.

My question is why Hexadecimal to Binary or Octal to Binary conversion is needed. Would you please so kind to make me understand? Somebody has asked me but unfortunately I couldn’t answer.

Appreciate, if you would get back to me at your best possible time.

Regards,
Pervez
Three answers:
Wren
2014-06-26 00:44:58 UTC
Well, you recognize the use of binary, which is good. The computer just translates the hexadecimal to binary in the end. Since 16 (hexadecimal) is a power of 2, it makes the conversion incredibly simple for a computer. Same for octal.



From Wikipedia: Each hexadecimal digit represents four binary digits (bits). As such, the primary use of hexadecimal notation is a human-friendly representation of binary-coded values in computing and digital electronics.



For example: Consider the following equivalent 3 byte values:

01010111 11010000 01100110

and

57 D0 66



Which would be easier to remember? Which would be easier to debug? Which would be easier to double check? Which would be easier to read in someone else's code?

In all cases, hexadecimal is better ... for the human. For the computer, it's just a representation of 4 binary numbers, so the computer is able to translate it to binary without issue.



Hexadecimal means that a byte can be represented by just two "numbers". It is especially useful when attempting to set particular byte values, whether in an array, or in code, or as RGB values, or other places.



The same arguments can be made for octal numbers. Octal, however, has seen a decline in use as modern computers no longer use 12-bit, 24-bit, or 36-bit words (which translate to octal easily), instead using 16-, 32-, or 64-bit words (which do not).
2014-06-25 23:52:08 UTC
It is easier for humans to read and create hexadecimal numbers. They are also easy to group to handle byte conversions that directly translate to decimal figures. Best example is the use of color codes in web design. It is very simple to use the group of bytes that make up the color content. Setting 3 x 2 byte hexadecimal numbers, one for each of the colors Red, Green, Blue is an easy way to adjust color. It translateseasily from data if dynamic changes are required.
Jason
2014-06-25 23:51:07 UTC
Best to conversersion


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...