1.4.1 What is a Number System?
A number system is a method of representing numbers using a specific set of symbols and rules.
We use different number systems in mathematics and computing.
Common Number Systems
There are four important number systems in computer science:
- Decimal Number System
- Binary Number System
- Octal Number System
- Hexadecimal Number System
1.4.2 Base or Radix
The base (or radix) of a number system tells us how many different digits/symbols are used in that system.
| Number System | Base | Digits Used |
|---|---|---|
| Decimal | 10 | 0–9 |
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Hexadecimal | 16 | 0–9, A–F |
Easy Trick
Decimal = 10
Binary = 2
Octal = 8
Hexadecimal = 16
1.4.3 Decimal Number System
The decimal number system has a base of 10.
It uses ten digits:
0 1 2 3 4 5 6 7 8 9
It is the number system we commonly use in everyday life.
Example
583
The value of each digit depends on its position.
5 × 10² + 8 × 10¹ + 3 × 10⁰
= 5 × 100 + 8 × 10 + 3 × 1 = 500 + 80 + 3 = 583
1.4.4 Positional Number System
Most number systems used in computing are positional number systems.
This means that the value of a digit depends on:
- The digit itself
- Its position
- The base of the number system
General Form
For a number:
dₙ dₙ₋₁ ... d₂ d₁ d₀
Its value is:
dₙ × baseⁿ + ... + d₂ × base² + d₁ × base¹ + d₀ × base⁰
1.4.5 Binary Number System
The binary number system has a base of 2.
It uses only two digits:
0 and 1
Computers use binary because digital electronic circuits can conveniently represent two states, such as:
0 → OFF / LOW 1 → ON / HIGH
Example
101101₂
The subscript ₂ tells us that the number is binary.
1.4.6 Bit and Byte
Bit
Bit = Binary Digit
A bit can have only two values:
0 or 1
It is the smallest basic unit of digital information.
Byte
A byte consists of:
1 Byte = 8 bits
Example
10101100
This contains 8 bits = 1 byte.
1.4.7 Binary Place Values
Binary uses powers of 2.
From right to left:
2⁰ 2¹ 2² 2³ 2⁴ 2⁵ 2⁶ 2⁷ 1 2 4 8 16 32 64 128
Example
Consider:
101101₂
Write the place values:
1 0 1 1 0 1 ↓ ↓ ↓ ↓ ↓ ↓ 32 16 8 4 2 1
Now multiply:
1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1 = 32 + 0 + 8 + 4 + 0 + 1 = 45
Therefore:
101101₂ = 45₁₀
1.4.8 Octal Number System
The octal number system has a base of 8.
It uses:
0 1 2 3 4 5 6 7
Digits 8 and 9 are not used in octal.
Example
725₈
Its decimal value is:
7×8² + 2×8¹ + 5×8⁰ = 7×64 + 2×8 + 5×1 = 448 + 16 + 5 = 469
Therefore:
725₈ = 469₁₀
1.4.9 Hexadecimal Number System
The hexadecimal number system has a base of 16.
It uses:
0–9 and A–F
Hexadecimal Digits
| Decimal | Hexadecimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
Example
2F₁₆
Convert to decimal:
2×16¹ + F×16⁰ F = 15 = 2×16 + 15×1 = 32 + 15 = 47
Therefore:
2F₁₆ = 47₁₀
1.4.10 Why Does Computer Use Binary?
Computers are electronic digital systems.
Electronic circuits can easily distinguish between two states.
For example:
Low voltage → 0 High voltage → 1
Therefore, binary is convenient for representing:
- Data
- Instructions
- Numbers
- Characters
- Images
- Audio
- Video
Simple Idea
Real World ↓ Computer ↓ Binary ↓ 0 and 1
⭐ 1.4.11 Comparison of Number Systems
| Number System | Base | Digits |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Decimal | 10 | 0–9 |
| Hexadecimal | 16 | 0–9, A–F |
Remember:
B O D H = 2, 8, 10, 16
Binary → Octal → Decimal → Hexadecimal
1.4.12 Base Conversion
Base conversion means changing a number from one number system to another without changing its actual value.
Common conversions include:
- Binary → Decimal
- Decimal → Binary
- Binary → Octal
- Octal → Binary
- Binary → Hexadecimal
- Hexadecimal → Binary
- Decimal → Octal
- Decimal → Hexadecimal
- Octal → Decimal
- Hexadecimal → Decimal
1.4.13 Binary to Decimal Conversion
To convert binary to decimal:
Steps
- Write the binary number.
- Assign powers of 2 from right to left.
- Multiply each binary digit by its place value.
- Add the results.
Example
Convert:
101101₂ → ?₁₀
Step 1: Write place values
1 0 1 1 0 1 ↓ ↓ ↓ ↓ ↓ ↓ 32 16 8 4 2 1
Step 2: Multiply
1×32 = 32 0×16 = 0 1×8 = 8 1×4 = 4 0×2 = 0 1×1 = 1
Step 3: Add
32 + 8 + 4 + 1 = 45
Therefore:
101101₂ = 45₁₀
1.4.14 Decimal to Binary Conversion
The most common method is the repeated division by 2 method.
Example
Convert:
45₁₀ → ?₂
Divide repeatedly by 2:
45 ÷ 2 = 22 remainder 1 22 ÷ 2 = 11 remainder 0 11 ÷ 2 = 5 remainder 1 5 ÷ 2 = 2 remainder 1 2 ÷ 2 = 1 remainder 0 1 ÷ 2 = 0 remainder 1
Now read the remainders from bottom to top:
1 0 1 1 0 1
Therefore:
45₁₀ = 101101₂
Important Rule
Decimal → Binary = Divide by 2 repeatedly and read remainders from bottom to top.
1.4.15 Another Decimal to Binary Example
Convert:
25₁₀ → Binary
25 ÷ 2 = 12 R1 12 ÷ 2 = 6 R0 6 ÷ 2 = 3 R0 3 ÷ 2 = 1 R1 1 ÷ 2 = 0 R1
Read bottom to top:
11001
Therefore:
25₁₀ = 11001₂
1.4.16 Binary to Octal Conversion
The easiest method is to group binary digits into groups of 3, starting from the right.
Example
Convert:
101101₂ → Octal
Group into 3:
101 101
Convert each group:
101 = 5 101 = 5
Therefore:
101101₂ = 55₈
Useful Table
| Binary | Octal |
|---|---|
| 000 | 0 |
| 001 | 1 |
| 010 | 2 |
| 011 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
1.4.17 Octal to Binary Conversion
For octal → binary, convert each octal digit into 3 binary bits.
Example
Convert:
55₈ → Binary
5 = 101 5 = 101
Therefore:
55₈ = 101101₂
Easy Rule
1 Octal digit = 3 Binary bits
1.4.18 Binary to Hexadecimal Conversion
For binary → hexadecimal, group binary digits into groups of 4, starting from the right.
Example
Convert:
101101₂ → Hexadecimal
First add leading zeros if necessary:
0010 1101
Now convert:
0010 = 2 1101 = D
Therefore:
101101₂ = 2D₁₆
1.4.19 Binary to Hexadecimal Table
| Binary | Hex |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0010 | 2 |
| 0011 | 3 |
| 0100 | 4 |
| 0101 | 5 |
| 0110 | 6 |
| 0111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
Easy Rule
1 Hexadecimal digit = 4 Binary bits
1.4.20 Hexadecimal to Binary
Convert each hexadecimal digit into 4 binary bits.
Example
Convert:
2D₁₆ → Binary
2 = 0010 D = 1101
Therefore:
2D₁₆ = 00101101₂
Leading zeros may be omitted when appropriate:
101101₂
1.4.21 Decimal to Octal Conversion
Use repeated division by 8.
Example
Convert:
125₁₀ → Octal
125 ÷ 8 = 15 R5 15 ÷ 8 = 1 R7 1 ÷ 8 = 0 R1
Read remainders from bottom to top:
175
Therefore:
125₁₀ = 175₈
1.4.22 Decimal to Hexadecimal Conversion
Use repeated division by 16.
Example
Convert:
254₁₀ → Hexadecimal
254 ÷ 16 = 15 R14 15 ÷ 16 = 0 R15
Now:
14 = E 15 = F
Read from bottom to top:
FE
Therefore:
254₁₀ = FE₁₆
1.4.23 Octal to Decimal Conversion
Multiply each digit by the corresponding power of 8.
Example
Convert:
175₈ → Decimal
1×8² + 7×8¹ + 5×8⁰ = 1×64 + 7×8 + 5×1 = 64 + 56 + 5 = 125
Therefore:
175₈ = 125₁₀
1.4.24 Hexadecimal to Decimal Conversion
Multiply each digit by the corresponding power of 16.
Example
Convert:
2D₁₆ → Decimal
Remember:
D = 13
Therefore:
2×16¹ + 13×16⁰ = 2×16 + 13×1 = 32 + 13 = 45
Therefore:
2D₁₆ = 45₁₀
⭐ 1.4.25 Base Conversion Shortcut
Remember these two important relationships:
Binary ↔ Octal
3 Binary bits = 1 Octal digit
Binary ↔ Hexadecimal
4 Binary bits = 1 Hexadecimal digit
Therefore:
Binary → Octal Group 3 bits Binary → Hex Group 4 bits
This is much faster than converting through decimal.
1.4.26 Binary Arithmetic
Computers perform arithmetic internally using binary numbers.
The main binary arithmetic operations are:
- Binary Addition
- Binary Subtraction
- Binary Multiplication
- Binary Division
1.4.27 Binary Addition
Binary addition has four basic rules:
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
The most important rule is:
1 + 1 = 10₂
This means:
Sum = 0 Carry = 1
Example: Binary Addition
Add:
1011 + 0110 -------
From right to left:
1 + 0 = 1 1 + 1 = 10 → write 0, carry 1 0 + 1 + 1 = 10 → write 0, carry 1 1 + 0 + 1 = 10 → write 0, carry 1
Final result:
1011 + 0110 ------- 10001
Therefore:
1011₂ + 0110₂ = 10001₂
Check in decimal:
11 + 6 = 17
and:
10001₂ = 17₁₀
Correct.
1.4.28 Binary Subtraction
Basic rules:
| A | B | Difference | Borrow |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
The important case is:
0 - 1
We need to borrow from the next higher bit.
Example
Subtract:
1101 - 0011 -------
Result:
1101 - 0011 ------- 1010
Therefore:
1101₂ − 0011₂ = 1010₂
Check:
13 − 3 = 10
and:
1010₂ = 10₁₀
1.4.29 Binary Multiplication
Binary multiplication is very simple because:
0 × 0 = 0 0 × 1 = 0 1 × 0 = 0 1 × 1 = 1
Example
Multiply:
101 × 11 ------ 101 101 ------ 1111
Therefore:
101₂ × 11₂ = 1111₂
Check:
5 × 3 = 15
and:
1111₂ = 15₁₀
1.4.30 Binary Division
Binary division follows the same basic principle as decimal long division.
Example
1100₂ ÷ 10₂
Since:
12 ÷ 2 = 6
Therefore:
1100₂ ÷ 10₂ = 110₂
1.4.31 Binary Arithmetic Summary
| Operation | Important Rule |
|---|---|
| Addition | 1 + 1 = 10 |
| Subtraction | 0 − 1 requires borrow |
| Multiplication | 1 × 1 = 1 |
| Division | Same basic concept as decimal division |
1.4.32 Complements
Complements are important in computer arithmetic, especially for subtraction and signed number representation.
The two important binary complements are:
- One's Complement
- Two's Complement
1.4.33 One's Complement
To find the one's complement:
Change every 0 to 1 and every 1 to 0.
Example
Original: 10110010 One's Complement: 01001101
Rule
0 → 1 1 → 0
1.4.34 Two's Complement
To find two's complement:
Step 1
Find one's complement.
Step 2
Add 1.
Example
Find two's complement of:
00000101
One's complement:
11111010
Add 1:
11111010 + 1 --------- 11111011
Therefore:
Two's complement = 11111011
Easy Trick
Two's Complement = One's Complement + 1
1.4.35 Binary Subtraction Using Two's Complement
Two's complement can be used to perform subtraction using addition.
Example
Calculate:
7 − 3
Using 4-bit binary:
7 = 0111 3 = 0011
Find two's complement of 3:
0011
One's complement:
1100
Add 1:
1101
Now add:
0111 + 1101 ------ 1 0100
Discard the extra carry:
0100
Therefore:
0100₂ = 4₁₀
So:
7 − 3 = 4
1.4.36 Signed and Unsigned Numbers
Binary numbers can be represented as:
Unsigned
All bits represent the magnitude.
For n bits, unsigned representation can represent:
0 to 2ⁿ − 1
Example
For 4 bits:
0 to 15
Signed
Signed representation allows both positive and negative numbers.
A common method is two's complement.
For an n-bit two's complement representation, the range is:
−2ⁿ⁻¹ to 2ⁿ⁻¹ − 1
Example: 8-bit
−128 to +127
1.4.37 Overflow
Overflow occurs when the result of an arithmetic operation is too large to be represented using the available number of bits.
Example
Using 4-bit unsigned numbers:
1111₂ = 15
If we add:
0001₂ = 1
Then:
1111 +0001 ----- 10000
But 4 bits cannot represent 10000.
Therefore, overflow occurs.
1.4.38 Binary Fraction
Binary numbers can also have fractional parts.
Binary fractions use negative powers of 2.
2⁻¹ = 1/2 2⁻² = 1/4 2⁻³ = 1/8 2⁻⁴ = 1/16
Example
Convert:
0.101₂ → Decimal
1×2⁻¹ + 0×2⁻² + 1×2⁻³ = 1/2 + 0 + 1/8 = 0.5 + 0.125 = 0.625
Therefore:
0.101₂ = 0.625₁₀
1.4.39 Decimal Fraction to Binary
For a decimal fraction, repeatedly multiply the fractional part by 2 and record the integer part.
Example
Convert:
0.625₁₀ → Binary
0.625 × 2 = 1.25 → 1 0.25 × 2 = 0.50 → 0 0.50 × 2 = 1.00 → 1
Read the integer parts from top to bottom:
101
Therefore:
0.625₁₀ = 0.101₂
1.4.40 Binary Coded Decimal — BCD
BCD = Binary Coded Decimal
In BCD, each decimal digit is represented separately using 4 bits.
Example
Decimal:
59
Convert each digit separately:
5 = 0101 9 = 1001
Therefore:
59₁₀ = 0101 1001 (BCD)
Important
BCD is not the same as converting the entire decimal number directly into binary.
For example:
59 decimal in normal binary = 111011
But:
59 in BCD = 0101 1001
1.4.41 Binary vs BCD
| Binary | BCD |
|---|---|
| Represents the whole number in base 2 | Represents each decimal digit separately |
| 59 → 111011 | 59 → 0101 1001 |
| More compact | Uses more bits for many numbers |
| Used internally for general binary computation | Useful where decimal digit representation is important |
1.4.42 Why Octal and Hexadecimal Are Used
Long binary numbers are difficult for humans to read.
For example:
111111101010110100101101
This is difficult to remember.
Hexadecimal makes it shorter:
FEAD2D
Because:
1 hexadecimal digit represents 4 binary bits.
Similarly:
1 octal digit represents 3 binary bits.
Uses of Hexadecimal
- Memory addresses
- Machine-level programming
- Debugging
- Color codes
- Networking
- Digital electronics
⭐ 1.4.43 Important Conversion Table
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
⭐ 1.4.44 Conversion Methods — Quick Chart
BASE CONVERSION │ ┌──────────────┼──────────────┐ ↓ ↓ ↓ Binary Decimal Hexadecimal │ │ │ ↓ ↓ ↓ Octal Repeated 4-bit groups 3-bit groups division
Remember:
Binary → Decimal
Multiply by powers of 2 and add.
Decimal → Binary
Divide repeatedly by 2.
Binary → Octal
Group 3 bits.
Octal → Binary
Convert each digit to 3 bits.
Binary → Hex
Group 4 bits.
Hex → Binary
Convert each digit to 4 bits.
Decimal → Octal
Divide repeatedly by 8.
Decimal → Hex
Divide repeatedly by 16.
⭐ 1.4.45 Common Mistakes Students Make
Mistake 1: Reading remainders in the wrong direction
For:
Decimal → Binary/Octal/Hexadecimal
Read remainders:
Bottom → Top
Mistake 2: Using 8 or 9 in octal
Incorrect:
128₈
Because octal only uses:
0–7
Mistake 3: Forgetting hexadecimal values
Remember:
A = 10 B = 11 C = 12 D = 13 E = 14 F = 15
Mistake 4: Wrong grouping
For:
Binary → Octal
Group:
3 bits
For:
Binary → Hexadecimal
Group:
4 bits
Mistake 5: Confusing BCD with Binary
For example:
25 in Binary = 11001
But:
25 in BCD = 0010 0101
They are different representations.
⭐ 1.4.46 Important Exam Questions
Very Important Long Questions
- What is a number system? Explain different types of number systems.
- Explain decimal, binary, octal and hexadecimal number systems.
- What is radix/base? Explain with examples.
- Why does a computer use the binary number system?
- Explain positional number systems.
- Explain binary number system with suitable examples.
- What is base conversion? Explain different methods of base conversion.
- Convert binary numbers into decimal numbers with proper steps.
- Convert decimal numbers into binary numbers using repeated division.
- Explain binary-to-octal and octal-to-binary conversion.
- Explain binary-to-hexadecimal and hexadecimal-to-binary conversion.
- Explain decimal-to-octal and octal-to-decimal conversion.
- Explain decimal-to-hexadecimal and hexadecimal-to-decimal conversion.
- What is binary arithmetic? Explain binary addition, subtraction, multiplication and division.
- Explain one's complement and two's complement.
- Explain subtraction using two's complement.
- What is overflow in binary arithmetic?
- Explain signed and unsigned binary numbers.
- What is BCD? Explain with an example.
- Differentiate between binary and BCD representation.
📝 1.4.47 Practice Questions
Try solving these yourself.
A. Binary → Decimal
-
1010₂ -
11001₂ -
101101₂ -
1110011₂ -
10011010₂
B. Decimal → Binary
-
15₁₀ -
25₁₀ -
45₁₀ -
64₁₀ -
100₁₀
C. Binary → Octal
-
101101₂ -
111001₂ -
1101011₂
D. Binary → Hexadecimal
-
101101₂ -
11110000₂ -
10101111₂
E. Binary Arithmetic
-
1010 + 1101 -
1111 + 0001 -
1101 − 0011 -
101 × 11 -
1100 ÷ 10
🧠 1.4.48 Quick Revision — One Page
Number System
A method of representing numbers using a set of symbols and rules.
Base/ Radix
Number of symbols used in a number system.
Decimal
Base 10 → 0–9
Binary
Base 2 → 0, 1
Octal
Base 8 → 0–7
Hexadecimal
Base 16 → 0–9, A–F
Binary
1 bit = 0 or 1
1 byte = 8 bits
Binary → Decimal
Multiply by powers of 2 and add.
Decimal → Binary
Repeated division by 2; read remainders bottom to top.
Binary → Octal
Group 3 bits.
Octal → Binary
1 octal digit = 3 bits.
Binary → Hexadecimal
Group 4 bits.
Hexadecimal → Binary
1 hexadecimal digit = 4 bits.
Binary Addition
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10
Binary Multiplication
0 × 0 = 0 0 × 1 = 0 1 × 0 = 0 1 × 1 = 1
One's Complement
Change 0 → 1 and 1 → 0
Two's Complement
One's Complement + 1
Overflow
Result cannot be represented with the available number of bits.
BCD
Each decimal digit is represented separately using 4 bits.
🎯 1.4.49 Exam Shortcut
If you get a numerical question on number-system conversion, first identify the direction:
Decimal → Other ↓ Repeated Division Other → Decimal ↓ Place Values + Multiplication Binary → Octal ↓ Group 3 bits Octal → Binary ↓ 3 bits per digit Binary → Hex ↓ Group 4 bits Hex → Binary ↓ 4 bits per digit

0 Comments