You are on page 1of 10

Assignment

Explain with the help of example how


hexadecimal number system is useful in Error
codes, Memory Dumps, MAC addresses, IP
addresses and HTML color codes.
Uses of Hexadecimal Number system

- Hex codes are used in many areas of computing to simplify binary codes.
- It is important to note that computers do not use hexadecimal - it is used by
humans to shorten binary to a more easily understandable form.
- Hexadecimal is translated into binary for computer use. Some examples of
where hex is used include:

» error codes
» MAC addresses
» IPv6 addresses
» HTML color codes
Error codes:

- Error codes are often shown as


hexadecimal values.
- These numbers refer to the
memory location of the error
and are usually automatically
generated by the computer.
- The programmer needs to
know how to interpret the
hexadecimal error codes.
- Examples of error codes from a
Windows system are shown:
Memory Dumps:
• Another method used to trace errors during program development is to use
memory dumps. A hex number system is often used when new software is
developed to trace errors. The computer memory can solve many problems.
• Memory dump can be represented as the memory content that is the output to
a monitor or a printer.
• The figure shows the memory location on the far-left side and hex codes against
these memory locations.
• Developers can determine errors from these hex codes to find out where in the
memory the fault occurs.
• Tracing errors using hex numbers is
very efficient compared to the binary
numbers.
• A hex number system is a powerful
tool for fault and error tracing, but it
requires computer architect knowledge.
MAC Address:
• A MAC address, or Media Access Control address, is a unique 48-bits hardware number of a
computer, which is embedded into Network Interface Card (NIC) of Wi-Fi, Bluetooth or
wired connection i.e. Ethernet during the time of manufacturing.
• 48 bit long address means there are 281,474,976,710,656 possible MAC addresses in the
world.
• It is made of 48 bits i.e. represented by 6 groups of 12 hex numbers, in the format
NN:NN:NN:DD:DD:DD or NN-NN-NN-DD-DD-DD.
• The first half identifies the manufacturer and the rest identifies the serial number of the
device.
• Colons (:) are sometimes used instead of dashes (-).
• IP addresses are associated with software, MAC addresses are linked to the hardware of
network adapters.
• MAC addresses are a more reliable method of identifying specific devices on a network.
Internet Protocol (IP) Address
• Each device on the internet is given a unique address known as the IP Address.
• A home computer is given an IP address when it connects to the internet. This is assigned by the ISP
and is unique for that particular internet session. The only IP addresses that remain rarely
unchanged are web servers.
• An IP address can be used instead of typing in the full URL.
For example: http://109.108.158.1 (It would take you straight to the device corresponding to this
address).
• An IPv4 address is a 32-bit number written in denary or hexadecimal form: e.g. 109.108.158.1 (or
77.76.9e.01 in hex).
• IPv4 has recently been improved upon by the adoption of IPv6.
• An IPv6 address is a 128-bit number broken down into 16-bit chunks, represented by a hexadecimal
number: e.g. a8fb:7a88:fff0:0fff:3d21:2085:66fb:f0fa
• Note IPv6 uses a colon (:) rather than a decimal point (.) as used in IPv4
HyperText Mark-up Language (HTML) color codes
• HyperText Mark-up Language (HTML) is used when writing and developing web pages.
• HTML isn’t a programming language but is simply a mark-up language.
• A mark-up language is used in the processing, definition and presentation of text (for
example, specifying the color of the text).
• HTML uses <tags> which are used to bracket a piece of text for example <h1> and
</h1>,surround a top-level heading. Whatever is between the two tags has been defined as
heading level 1.
• Here is a short example of HTML code:
• HTML is often used to represent colors of text on the computer screen.
• All colors can be made up of different combinations of the three primary colors (red, green
and blue).
• Hex can be used to represent colors on web pages and image-editing programs using the
format #RRGGBB (RR = reds, GG = greens, BB = blues).
• The different intensity of each color (red, green and blue) is determined by its hexadecimal
value. This means different hexadecimal values represent different colors.
• For example:

• The # symbol indicates that the number has been written in hex format.
• This system uses two hex digits for each color, e.g. #FF6600.

• As one hex digit represents 4 bits, two hex digits together make 8 bits (1 byte). The values
for each color run between 00 and FF.
• In binary, 00 is 0000 0000 and FF is 1111 1111. That provides 256 possible values for each of
the three colors giving a total of 256 × 256 × 256 (i.e. 16 777 216) possible colours.

You might also like