## Hexadecimal

This article explains the hexadecimal number system and elaborates on methods to convert between hex and decimal, as well as hex and binary, with examples.

Hexadecimal Number System: The hexadecimal number system uses 16 digits, unlike the decimal system which uses 10 digits. In hexadecimal, the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F represent numbers. The letters A, B, C, D, E, and F are used to represent values 10, 11, 12, 13, 14, and 15, respectively.

Each significant position in the hexadecimal system has a positional weight. The rightmost position (least significant) has a weight of 16^0, which is 1. The weights of higher significant positions increase in ascending powers of sixteen: 16^1, 16^2, 16^3, and so on.

## Decimal to Hex Conversion

To convert a decimal number into hexadecimal, we divide the decimal number by 16 progressively until the quotient becomes zero. The equivalent hexadecimal value is obtained by reading the remainder in reverse order.

## Hexadecimal Number System Table

Below is the table of hexadecimal number systems with equivalent values of the binary and decimal number systems.

Decimal Numbers |
4-bit Binary Number |
Hexadecimal Number |

0 | 0000 | 0 |

1 | 0001 | 1 |

2 | 0010 | 2 |

3 | 0011 | 3 |

4 | 0100 | 4 |

5 | 0101 | 5 |

6 | 0110 | 6 |

7 | 0111 | 7 |

8 | 1000 | 8 |

9 | 1001 | 9 |

10 | 1010 | A |

11 | 1011 | B |

12 | 1100 | C |

13 | 1101 | D |

14 | 1110 | E |

15 | 1111 | F |

**Example 1: What is 5C6 in Hexadecimal?**

Solution: Step 1: The “5” is in the “16 x 16” position, so it represents 5 x 16 x 16.

Step 2: The ‘C’ (which represents 12 in decimal) is in the “16” position, so it represents 12 x 16.

Step 3: The “6” is in the “1” position, so it represents 6.

To calculate the value of 5C6 in hexadecimal, add the values from Step 1, Step 2, and Step 3: 5 x 16 x 16 + 12 x 16 + 6.

### Facts of Hexadecimal Number System

Facts about Hexadecimal Number System:

- Base 16: The Hexadecimal number system is a type of number representation technique with a base value of 16.
- 16 Symbols: Hexadecimal numbers use 16 symbols or digital values, which are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.
- Single Bit Representations: The symbols A, B, C, D, E, and F represent the values 10, 11, 12, 13, 14, and 15, respectively, in a single bit.
- Prefixes: Hexadecimal numbers can be indicated by adding either an “o” prefix or an “h” prefix.
- Positional Weight: Each digit in a hexadecimal number has a positional weight, where the weight of each position is a power of 16.

Related Posts

Analog and Memory Layout Design Forum |

Physical Layout Design Forum |

RTL & Verilog Design Forum |

Semiconductor Forum |

Analog Layout Design Interview Questions |
Memory Design Interview Questions |

Physical Design Interview Questions |
Verilog Interview Questions |

Digital Design Interview Questions |
STA Interview Questions |