Question

In: Computer Science

Why are computer addresses described with hexadecimal notation? Why isn't the binary number system used? What...

Why are computer addresses described with hexadecimal notation? Why isn't the binary number system used? What is BCD?

Solutions

Expert Solution

The main reason why we use hexadecimal numbers is because it provides a more human-friendly representation and is much easier to express binary number representations in hex than it is in any other base number system.

Computers do not actually work in hex.

Lets take an example, using a byte.

1 Byte = 8 bits. It can store the values from 0 to 255 (0000 0000 to 1111 1111 in binary). Each hexadecimal digit represents four binary digits, also called Nibble. (1 Byte = 2 Nibbles)

For example, a single byte can have values ranging from 0000 0000 to 1111 1111 in binary form and can be easily represented as 00 to FF in hexadecimal.

Expressing numbers in binary is not easy for us. You can not tell your friend that my mobile number is 1001 1111 1010 0101. You cannot use these type of numbers daily for 'n' number of contacts. Thus, we need more easy expression.

Since a byte is 8 bits, it makes sense to divide that up into two groups, the top 4 bits and the low 4 bits. Since 4 bits gives you the possible range from 0 – 15, a base 16 system is easier to work with, especially if you are only familiar with alphanumeric characters.

It’s easier to express a binary value to another person as “B” then it is to express it as “1011”. This way I can simple use 2 hex values to represent a byte and have it work cleanly.I only need to memorize the multiplication tables up to 15. So if I have a hex value of EC, I can easily determine that 14 * 12 = 206 in decimal, and can easily write it out in binary as 1100 1110. Trying to convert from binary would require me to know what each place holder represents, and add all the values together (128 + 64 + 8 + 4 + 2 = 206). It’s much easier to work with binary through hex than any other base system.

There are several uses for hexadecimals in computing:

1. HTML / CSS Colour Codes

Hexadecimal numbers are used to represent colours within HTML or CSS.

The 6 digit hex colour code should be considered in three parts.

  • First two digits represents the amount of red in the colour (max FF, or 255)
  • The next two digits represent the amount of green in the colour (max FF, or 255)
  • The final two digits represent the amount of blue in the colour (max FF, or 255)

By changing the intensities of red, green and blue, we can create almost any colour.

E.g. orange can be represented as #FFA500, which is (255 red, 165 green, 0 blue). Visit hexinvaders.com to see this in action.

2. MAC Addresses

A Media Access Control (MAC) address is a number which uniquely identifies a device on the internet. It relates to the network interface card (NIC) inside of the device.

e.g. B4-CD-C7-4A-8B-D2

Expressing MAC addresses in hexadecimal format makes them easier to read and work with.

3.Assembly Code and Memory Dumps

Hexadecimals have advantage over binary due to:

  • They are easier and faster to work with, taking up less screen space
  • Mistakes are less likely and easier to trace/ debug

Finally

  • A big benefit of hexadecimals is that they are easy to convert to binary, if needed.
  • In above examples, all values are still physically stored as binary, so no storage space is saved by using hex.


Related Solutions

Why isn't set-builder notation used for defining functions?
In set-builder notation, we use | to show givens, yet there isn't really a standard symbol to show givens when defining functions. So why don't we just import the symbol from set-builder notation so that it becomes standardised?
What digits are used in binary number system? How much is 305.511 in binary form?
What digits are used in binary number system? How much is 305.511 in binary form?
11.  Convert this hexadecimal notation to binary notation: E4B Answer format: put a space between each four-bit...
11.  Convert this hexadecimal notation to binary notation: E4B Answer format: put a space between each four-bit pattern. (e.g., 1000 0000 0111) 12. Convert this decimal notation to an excess notation system using bit patterns of length three: -1 13. Convert this two's complement notation to its equivalent base ten representation: 10011 Note: Since the tables in the book on page only show 7 through -8 in a pattern of length four,          you will need to create a pattern of length...
What is the 11 bit, binary representation of -108? What is the hexadecimal equivalent of this...
What is the 11 bit, binary representation of -108? What is the hexadecimal equivalent of this number?
6. Assume a computer has a physical memory organized into 64-bit words. Using hexadecimal notation, give...
6. Assume a computer has a physical memory organized into 64-bit words. Using hexadecimal notation, give the word address and offset within the word for each of the following byte addresses. Byte address Word address Offset 0x000b 0x03ff 0x07fc
What is (567.12) octal in binary. What is(5CF.AD) hexadecimal in binary. Please show work so I...
What is (567.12) octal in binary. What is(5CF.AD) hexadecimal in binary. Please show work so I can understand how to solve thanks.
Design a Decoder Circuit that can convert a 4-bit Binary Number to a Hexadecimal Output.
Design a Decoder Circuit that can convert a 4-bit Binary Number to a Hexadecimal Output.
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754...
With a detailed step-by-step process, convert the following decimal number into binary, Hexadecimal and IEEE 754 formats : 72.nn ( where nn is 80)
The standard method of representing negative numbers in the binary system is with 2's complement notation....
The standard method of representing negative numbers in the binary system is with 2's complement notation. What are the advantages and disadvantages of using this method to represent negative numbers?
Any integer can be represented in binary, octal, decimal, and hexadecimal. What are the limits on...
Any integer can be represented in binary, octal, decimal, and hexadecimal. What are the limits on representing integers using unary or only having the 1 digit?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT