Binary, Decimal, Octal and Hexadecimal Basics
Binary, Decimal, Octal and Hexadecimal Basics. Foundational Computer Awareness explanations, examples and explained practice questions for banking and recruitment exam preparation.
By Akhilesh Saini
What you will learn
- Why numbering systems use a base (or radix).
- Which digits belong to binary, octal, decimal and hexadecimal.
- What place value means in positional notation.
- Why computers use binary while people often read decimal or hexadecimal.
Why this topic matters
Exam questions may ask which number contains an invalid digit, identify the base of a numeral, or ask how many bits correspond to one hexadecimal digit. These facts become easy when you understand what symbols a numbering system allows.
A number's meaning depends on its base
Most everyday prices and quantities use the decimal system, whose base is 10. Decimal has ten distinct digit symbols, 0 through 9. A computer, however, commonly represents its internal information using two distinguishable states represented by the digits 0 and 1—the binary system.
In a positional system, each position represents a power of the base. Thus, 314 in decimal means three hundreds, one ten and four ones:
314₁₀ = 3 × 10² + 1 × 10¹ + 4 × 10⁰.
The rightmost place has weight base⁰ = 1. Each step to the left multiplies the weight by the base. A numeral is not just a string of symbols; its base determines its numeric value.
| Number system | Base | Valid digit symbols | Simple illustration |
|---|---|---|---|
| Binary | 2 | 0, 1 | 1011₂ |
| Octal | 8 | 0 to 7 | 17₈ |
| Decimal | 10 | 0 to 9 | 15₁₀ |
| Hexadecimal | 16 | 0–9, A–F | F₁₆ |
The subscript indicates the base; it is not part of the represented number's digits. You may also see programming-oriented notations such as 0b1011 (binary) and 0xF (hexadecimal), but notation rules differ across languages.

Binary: base 2
Binary uses two digits. Every position to the left is worth twice the position to its right:
| Position from right | 4th | 3rd | 2nd | 1st |
|---|---|---|---|---|
| Place value | 8 | 4 | 2 | 1 |
Binary digits in 1011₂ | 1 | 0 | 1 | 1 |
So 1011₂ = 8 + 0 + 2 + 1 = 11₁₀. Each individual binary digit is a bit. In the usual computing sense, eight bits make one byte (see CA-02-07). A bit is a unit of information, not a literal physical switch by definition; hardware uses physical states to represent it.
Concept to understand: Binary is useful in digital systems because engineering two distinguishable states can be comparatively robust. That does not mean every part of a computer contains only two kinds of electrical voltage or that real hardware is free of analogue effects.
Octal: base 8
Octal allows digits 0 to 7. After 7₈, the next numeral is 10₈, meaning eight in decimal, not ten in decimal. A numeral such as 18₈ is invalid, because octal has no digit 8.
Octal is historically useful as a shorthand for binary. One octal digit corresponds to three binary bits, because 2³ = 8. More about grouping appears in CA-04-02.
Hexadecimal: base 16
Hexadecimal needs sixteen symbols: 0–9, then letters A–F for ten through fifteen.
| Hex symbol | Decimal value | Four-bit binary |
|---|---|---|
A | 10 | 1010 |
B | 11 | 1011 |
C | 12 | 1100 |
D | 13 | 1101 |
E | 14 | 1110 |
F | 15 | 1111 |
Therefore 1A₁₆ = 1 × 16 + 10 = 26₁₀. A single hexadecimal digit corresponds to four binary bits since 2⁴ = 16. Hexadecimal makes long bit patterns easier to read, and is common in contexts such as memory addresses, color codes and technical identifiers. An address written in hexadecimal is still an address: hexadecimal is a notation, not a memory technology.
Four representations, one value
The number 15 can be written as 1111₂, 17₈, 15₁₀ or F₁₆. These numerals look different but represent the same value.
| Value | Binary | Octal | Decimal | Hexadecimal |
|---|---|---|---|---|
| Eleven | 1011₂ | 13₈ | 11₁₀ | B₁₆ |
| Fifteen | 1111₂ | 17₈ | 15₁₀ | F₁₆ |
| Sixteen | 10000₂ | 20₈ | 16₁₀ | 10₁₆ |
Avoid interpreting 10 without the base: 10₂ means two, 10₈ means eight, 10₁₀ means ten and 10₁₆ means sixteen.
Worked examples
Example 1 — Valid binary: Is 1021₂ valid? No. Binary permits only 0 and 1; digit 2 is invalid.
Example 2 — Value of 23₈: Compute 2 × 8 + 3 = 19₁₀.
Example 3 — Value of 2F₁₆: 2 × 16 + 15 = 47₁₀.
Example 4 — Representing a bit pattern: The eight-bit pattern 11110000 can be split 1111 0000 and written as F0₁₆. Grouping is a shorthand; it does not change the represented bits.
Important terms
| Term | Simple meaning |
|---|---|
| Radix/base | Number of permitted distinct digit symbols in a positional system |
| Digit | One symbol in a numeral |
| Place value | Weight associated with a digit's position |
| Bit | One binary digit, 0 or 1 |
| Byte | Eight bits in standard modern computing terminology |
| Hexadecimal | Base-16 notation with symbols 0–9, A–F |
| Most significant digit | Leftmost digit with the highest place value in an ordinary numeral |
| Least significant digit | Rightmost digit with weight base⁰ |
Common confusions and exam traps
- Base versus number of digits: Binary has two available symbols, but a binary numeral may have any number of positions.
10is not always ten: Its value changes with the base.Ain hexadecimal is not the letter A as ordinary text: It is the digit for decimal ten in that numeral.- Octal versus decimal: A valid decimal numeral may be invalid in octal (
89). - Hexadecimal versus binary storage: A hex numeral is a more compact way to write a value; it is not a new underlying physical state.
Objective-exam facts to remember
| Asked fact | Answer |
|---|---|
| Binary base | 2 |
| Octal base | 8 |
| Decimal base | 10 |
| Hexadecimal base | 16 |
| Largest octal digit | 7 |
| Largest single hexadecimal digit | F (decimal 15) |
| Bits represented by one octal digit | 3 |
| Bits represented by one hexadecimal digit | 4 |
Quick revision
- A number's base determines its legal digits and positional weights.
- Binary uses
0,1; octal uses0–7; hexadecimal uses0–9,A–F. 1111₂ = 17₈ = 15₁₀ = F₁₆.- A hexadecimal digit groups four bits; an octal digit groups three.
- Do not compare visually identical numerals without checking the base.
Practice questions — CA-04-01
1. What is the base (radix) of the binary number system?
A. 2
B. 8
C. 10
D. 16
2. Which of the following is not a valid octal numeral?
A. 17₈
B. 70₈
C. 28₈
D. 106₈
3. In hexadecimal notation, the digit B means which decimal value?
A. 10
B. 11
C. 12
D. 16
4. How many binary bits are represented by one hexadecimal digit?
A. 2
B. 3
C. 4
D. 8
5. What does 10₂ represent in decimal?
A. 1
B. 2
C. 8
D. 10
6. Which set contains only valid binary digit symbols?
A. 0, 1, 2
B. 0, 1
C. 0–7
D. 0–9
7. What is the largest single digit of the hexadecimal system?
A. 9
B. D
C. E
D. F
8. In a positional number system, the rightmost whole-number digit has which place value?
A. Base²
B. Base¹
C. Base⁰
D. Always ten
9. How many bits correspond to one octal digit?
A. 2
B. 3
C. 4
D. 8
10. Which numeral equals decimal fifteen?
A. 1111₂
B. 1111₈
C. 1111₁₆
D. 1000₂
11. What is the decimal value of 1A₁₆?
A. 16
B. 20
C. 26
D. 110
12. What is the main reason hexadecimal is used to display many low-level bit patterns?
A. It creates extra storage space
B. It gives a compact, readable representation of bits
C. It eliminates binary hardware
D. It encrypts the information
Answers and explanations — CA-04-01
| Q | Correct answer | Why it is correct |
|---|---|---|
| 1 | A. 2 | Binary has two digit symbols: 0 and 1. |
| 2 | C. 28₈ | 8 is not permitted in base eight; the other options use only 0–7. |
| 3 | B. 11 | Hex digits A–F represent decimal 10–15 respectively. |
| 4 | C. 4 | Sixteen alternatives can be encoded with four bits: 2⁴ = 16. |
| 5 | B. 2 | 10₂ = 1×2 + 0; its value is not decimal ten. |
| 6 | B. 0, 1 | Only these two symbols occur as digits in binary notation. |
| 7 | D. F | F is the highest single hex digit, valued at 15 in decimal. |
| 8 | C. Base⁰ | The units position always has weight one (base⁰). |
| 9 | B. 3 | 2³ = 8; three bits cover all eight octal digit values. |
| 10 | A. 1111₂ | Binary 1111 is 8+4+2+1=15; other options represent different values. |
| 11 | C. 26 | The place values are 1×16 + 10 = 26. |
| 12 | B. Compact, readable representation | One hex digit replaces four written binary digits without changing the underlying value. |