Binary to Hexadecimal and Hexadecimal to Binary Conversion

 

Binary to Hexadecimal and Hexadecimal to Binary Conversion

1. Binary to Hexadecimal Conversion

The hexadecimal number system (Base-16) uses 16 digits: 0-9 and A-F, where:

  • A = 10B = 11C = 12D = 13E = 14F = 15
  • Each hexadecimal digit corresponds to a group of 4 binary digits (bits) because 24=1624=16.

Steps for Binary to Hexadecimal Conversion

  1. Group the binary digits into quartets (sets of 4 bits) from right to left.
  2. Convert each quartet into its hexadecimal equivalent.
  3. Write the final hexadecimal number.

Example 1: Convert 11010110₂ to Hexadecimal

Step 1: Group into quartets

11010110 → (1101) (0110)

Step 2: Convert each quartet to hexadecimal

  • 1101₂ = D₁₆
  • 0110₂ = 6₁₆

Step 3: Write the hexadecimal number

11010110₂ = D6₁₆

Example 2: Convert 10101111100₂ to Hexadecimal

Step 1: Group into quartets (add leading zeros if needed)

10101111100 → 0001 0101 1111 100

Step 2: Convert each quartet to hexadecimal

  • 0001₂ = 1₁₆
  • 0101₂ = 5₁₆
  • 1111₂ = F₁₆
  • 1100₂ = C₁₆

Step 3: Final hexadecimal number

10101111100₂ = 15FC₁₆

2. Hexadecimal to Binary Conversion

Each hexadecimal digit corresponds to four binary digits.

Steps for Hexadecimal to Binary Conversion

  1. Write each hexadecimal digit as a 4-bit binary equivalent.
  2. Combine the binary groups to form the binary number.

Example 3: Convert 3F₁₆ to Binary

Step 1: Convert each digit to binary

  • 3₁₆ = 0011₂
  • F₁₆ = 1111₂

Step 2: Combine the binary groups

3F₁₆ = 00111111₂

Example 4: Convert A9₁₆ to Binary

Step 1: Convert each digit to binary

  • A₁₆ = 1010₂
  • 9₁₆ = 1001₂

Step 2: Combine the binary groups

A9₁₆ = 10101001₂

MCQs on Binary-Hexadecimal Conversion

1. What is the hexadecimal equivalent of 10111010₂?

a) B8₁₆

b) BA₁₆

c) A9₁₆

d) B5₁₆

✅ Answer: b) BA₁₆

2. Convert 10011110₂ to hexadecimal.

a) 9E₁₆

b) 8F₁₆

c) 7D₁₆

d) 6B₁₆

✅ Answer: a) 9E₁₆

3. Convert hexadecimal 5C₁₆ to binary.

a) 01011100₂

b) 10111110₂

c) 11001100₂

d) 10110010₂

✅ Answer: a) 01011100₂

4. Convert hexadecimal D2₁₆ to binary.

a) 11010010₂

b) 11001101₂

c) 10101010₂

d) 10110100₂

✅ Answer: a) 11010010₂

5. What is the binary equivalent of hexadecimal E?

a) 1010₂

b) 1100₂

c) 1110₂

d) 1001₂

✅ Answer: c) 1110₂

Comments

Popular posts from this blog

Shortcut Tricks for Average

Types of Averages

Problems on Averages