Programming Concepts Tutorial

Learn the fundamental concepts of computer programming

Hexadecimal Numbers

Hexadecimal Numbers

Hexadecimal (Base-16) is a number system used heavily in computing because it provides a human-friendly way to represent binary.

It uses 16 symbols: 0-9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen.

Why use Hex?

One hexadecimal digit can exactly represent 4 binary bits. Therefore, a full 8-bit Byte can be written cleanly as just two hex characters (e.g., FF instead of 11111111).

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics