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 systemBaseValid digit symbolsSimple illustration
Binary20, 11011₂
Octal80 to 717₈
Decimal100 to 915₁₀
Hexadecimal160–9, A–FF₁₆

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, octal, decimal and hexadecimal are different numeral systems; 1111 base 2, 17 base 8, 15 base 10 and F base 16 all mean fifteen.
Four number systems and place-value geometry

Binary: base 2

Binary uses two digits. Every position to the left is worth twice the position to its right:

Position from right4th3rd2nd1st
Place value8421
Binary digits in 1011₂1011

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 symbolDecimal valueFour-bit binary
A101010
B111011
C121100
D131101
E141110
F151111

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.

ValueBinaryOctalDecimalHexadecimal
Eleven1011₂13₈11₁₀B₁₆
Fifteen1111₂17₈15₁₀F₁₆
Sixteen10000₂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

TermSimple meaning
Radix/baseNumber of permitted distinct digit symbols in a positional system
DigitOne symbol in a numeral
Place valueWeight associated with a digit's position
BitOne binary digit, 0 or 1
ByteEight bits in standard modern computing terminology
HexadecimalBase-16 notation with symbols 0–9, A–F
Most significant digitLeftmost digit with the highest place value in an ordinary numeral
Least significant digitRightmost 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.
  • 10 is not always ten: Its value changes with the base.
  • A in 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 factAnswer
Binary base2
Octal base8
Decimal base10
Hexadecimal base16
Largest octal digit7
Largest single hexadecimal digitF (decimal 15)
Bits represented by one octal digit3
Bits represented by one hexadecimal digit4

Quick revision

  1. A number's base determines its legal digits and positional weights.
  2. Binary uses 0, 1; octal uses 0–7; hexadecimal uses 0–9, A–F.
  3. 1111₂ = 17₈ = 15₁₀ = F₁₆.
  4. A hexadecimal digit groups four bits; an octal digit groups three.
  5. 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

QCorrect answerWhy it is correct
1A. 2Binary has two digit symbols: 0 and 1.
2C. 28₈8 is not permitted in base eight; the other options use only 0–7.
3B. 11Hex digits A–F represent decimal 10–15 respectively.
4C. 4Sixteen alternatives can be encoded with four bits: 2⁴ = 16.
5B. 210₂ = 1×2 + 0; its value is not decimal ten.
6B. 0, 1Only these two symbols occur as digits in binary notation.
7D. FF is the highest single hex digit, valued at 15 in decimal.
8C. Base⁰The units position always has weight one (base⁰).
9B. 32³ = 8; three bits cover all eight octal digit values.
10A. 1111₂Binary 1111 is 8+4+2+1=15; other options represent different values.
11C. 26The place values are 1×16 + 10 = 26.
12B. Compact, readable representationOne hex digit replaces four written binary digits without changing the underlying value.