Hexadecimal Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

HEXADECIMAL

The hexadecimal number system is a type of number system that has a base value equal to 16. It is also
sometimes called ‘Hex’. Hexadecimal numbers are represented by 16 symbols. These symbols or values
are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. Each digit represents a value in the decimal number
system. For example; D is equal to 13 while 4 is equal to 4.

Hexadecimal number systems can be converted to other number systems such as Binary (Base-2) and
Decimal (Base-10).

Hexadecimal Number System Conversions

Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Decimal to Hexadecimal Conversions


Example1: Convert 38710 from decimal number format to hexadecimal number format.
STEPS:

To convert 38710 from Decimal to Hexadecimal, follow the steps below:


16 387
1. 2. 16 387
16 24 r3 16 24 r3
16 1 r8 16 1 r8
16 0 r1 16 0 r1

Continuously divide the value to


Record the remainders from the
be converted to hexadecimal’ by
bottom going up.
16, until the quotient becomes 0.

3. 38710 converted to hexadecimal = 18316


Example2: Convert 678310 from decimal number format to hexadecimal number format.

STEPS:

To convert 678310 from Decimal to Hexadecimal, follow the steps below:


16 6783 16 6783
1. 2.
16 16 r 15 - F
423 r 15 423

16 26 r7 16 26 r7
16 1 r 10 16 1 r 10 - A
16 0 r 1 16 0 r1

Continuously divide the value to Record the remainders from the


be converted to hexadecimal’ by bottom going up.
16, until the quotient becomes 0.

3. 678310 converted to hexadecimal = 1A7F16

Hexadecimal to Decimal Conversions


Example1: Convert AE1916 from hexadecimal number format to decimal number format.

STEPS:

To convert AE1916 from Hexadecimal to Decimal, follow the steps below:

3 2 1 0
1. A E 1 9 16 = (160 * 9) + (161 * 1) + (162 * E) + (163 * A)
= (160 * 9) + (161 * 1) + (162 * 14) + (163 * 10)
= 9 + 16 + 3584 + 40960
= 4456910

2. AE1916 converted to decimal = 4456910


Binary to Hexadecimal Conversions
Example1: Convert 0111000101012 from binary number format to hexadecimal number format.
STEPS:

To convert 0111 0001 01012 from Hexadecimal to Decimal, follow the steps below:
1. Every 4bits of a binary 3 2 1 0 3 2 1 0 3 2 1 0
0111 0001 0101
number represent a
hexadecimal number. Divide
01112 = (23*0) + (22*1) + (21*1) + (20*1)
the number into groups of
=7
four and convert each group
00012 = (23*0) + (22*0) + (21*0) + (20*1)
as an individual number, to
=1
decimal number format.
01012 = (23*0) + (22*1) + (21*0) + (20*1)
=5

2. Collect the result as it is in


0111 0001 0101
its order in the Binary
format.
7 1 5

= 71516
Example2: Convert 1101111102 from binary number format to hexadecimal number format.
STEPS:

To convert 1101111102 from Hexadecimal to Decimal, follow the steps below:

1. Divide the number into 3 2 1 0 3 2 1 0 3 2 1 0


0001 1011 1110
groups of four and convert
each group as an individual
00012 = (23*0) + (22*0) + (21*0) + (20*1)
number, to decimal number
=1
format. In the event that the
10112 = (23*1) + (22*0) + (21*1) + (20*1)
number of digits is not a
= 11
multiple of four, add the
11102 = (23*1) + (22*1) + (21*1) + (20*0)
necessary number of zeros
= 14
at the beginning like in the
example.

2. Collect the result as it is in


0001 1011 1110
its order in the Binary
format.
1 10 (B) 14 (E)

= 1BE16
Hexadecimal to Binary Conversions
Example1: Convert DF116 from hexadecimal number format to binary number format.
STEPS:

To convert DF116 from Hexadecimal to Binary, follow the steps below:


2 13 2 15 2 1
1.
2 6 r1 2 7 r1 2 0 r1
2 3 r0 2 3 r1 0
2 1 r1 2 1 r1 0
2 0 r1 2 0 r1 0

Each hexadecimal value is equivalent to 4bits in binary. So let us convert


each single value into 4-bit binary values using continuous division until the
quotient is zero. In the event that the answer does not have 4bits, add
zeros below to make it a 4bit binary digit.

2. D (13) F (15) 1

1101 1111 0001

Therefore, DF116 = 1101111100012


Example1: Convert 12316 from hexadecimal number format to binary number format.
STEPS:

To convert 12316 from Hexadecimal to Binary, follow the steps below:


2 1 2 2 2 3
1.
2 0 r1 2 1 r0 2 1 r1
0 2 r1 2
0 0 r1
0 0 0
0 0 0

Each hexadecimal value is equivalent to 4bits in binary. So let us convert


each single value into 4-bit binary values using continuous division until the
quotient is zero. In the event that the answer does not have 4bits, add
zeros below to make it a 4bit binary digit.

2. 1 2 3

0001 0010 0011

Therefore, 12316 = 0001001000112

You might also like