Convert between positive hexadecimal and positive binary

Resources | Subject Notes | Computer Science

Data Representation - Hexadecimal to Binary Conversion

Data Representation: Hexadecimal to Binary Conversion

Objective

To convert between positive hexadecimal and positive binary representations.

Understanding Hexadecimal and Binary

Hexadecimal is a base-16 number system, using the digits 0-9 and A-F to represent values 0-15. Binary is a base-2 number system, using only the digits 0 and 1.

Conversion from Hexadecimal to Binary

Each hexadecimal digit corresponds to exactly four binary digits.

For example:

Hexadecimal 5 is equivalent to binary 0101.

Hexadecimal A is equivalent to binary 1010.

Method:

  1. Identify each hexadecimal digit.
  2. Convert each hexadecimal digit to its 4-bit binary equivalent.
  3. Concatenate the binary equivalents of all hexadecimal digits to form the binary representation.

Example 1

Convert the hexadecimal number 2A to binary.

  1. Hexadecimal 2 is 0010 in binary.
  2. Hexadecimal A is 1010 in binary.
  3. Concatenating these gives 00101010.

Therefore, the hexadecimal number 2A is equal to the binary number 00101010.

Example 2

Convert the hexadecimal number F3 to binary.

  1. Hexadecimal F is 1111 in binary.
  2. Hexadecimal 3 is 0011 in binary.
  3. Concatenating these gives 11110011.

Therefore, the hexadecimal number F3 is equal to the binary number 11110011.

Table Summary

Hexadecimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Practice

Convert the following hexadecimal numbers to binary:

  • 3C
  • FF
  • 1A

Note

Understanding the relationship between hexadecimal and binary is fundamental to data representation in computer science. This conversion is crucial for analyzing and manipulating data at a low level.