Number Systems & Arithmetic Operations
Expert Answer & Key Takeaways
Comprehensive guide to Binary, Octal, Decimal, Hexadecimal systems, their inter-conversions, and binary arithmetic (Addition, Subtraction, 1's & 2's Complement).
Number Systems & Arithmetic Operations
A Number System is a mathematical technique used to represent and work with numbers. In the context of computer architecture, number systems are fundamental because all digital systems operate entirely on numerical data, specifically binary.
1. Types of Number Systems
The architecture of modern computers primarily relies on four positional number systems:
1.1 Decimal Number System (Base-10)
- Base (Radix): 10
- Symbols Used: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- This is the standard number system used by humans in everyday life.
- In a positional decimal number like
456, the value is calculated as:(4 × 10²) + (5 × 10¹) + (6 × 10⁰) = 400 + 50 + 6 = 456.
1.2 Binary Number System (Base-2)
- Base (Radix): 2
- Symbols Used: 0, 1
- The most critical system for computers. Digital circuits represent states as ON (1) or OFF (0).
- A single binary digit is called a Bit. A group of 4 bits is a Nibble, and a group of 8 bits is a Byte.
1.3 Octal Number System (Base-8)
- Base (Radix): 8
- Symbols Used: 0, 1, 2, 3, 4, 5, 6, 7
- Used in computing as a shorthand for binary numbers, as exactly three binary digits map directly to one octal digit (
2³ = 8).
1.4 Hexadecimal Number System (Base-16)
- Base (Radix): 16
- Symbols Used: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15)
- Widely used in memory addressing, IPv6 addresses, and MAC addresses.
- Exactly four binary digits map directly to one hexadecimal digit (
2⁴ = 16).
2. Number System Conversions
2.1 Decimal to Any Base (Division Method)
- To convert a decimal number to base-X, repeatedly divide the number by X and record the remainders.
- Read the remainders from bottom to top (Last remainder is Most Significant Digit, first is Least Significant Digit).
- Example (Decimal 13 to Binary):
- 13 ÷ 2 = 6, Remainder 1
- 6 ÷ 2 = 3, Remainder 0
- 3 ÷ 2 = 1, Remainder 1
- 1 ÷ 2 = 0, Remainder 1
- Result:
1101
2.2 Any Base to Decimal (Multiplication Method)
- Multiply each digit by its base raised to the power of its positional weight (starting from 0 on the right), and sum them up.
- Example (Binary 1101 to Decimal):
(1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰)= 8 + 4 + 0 + 1 = 13
2.3 Binary to Octal / Hexadecimal (Grouping Method)
- To Octal: Group the binary bits into sets of 3, starting from the right. (Pad with leading zeros if necessary). Convert each group to its decimal equivalent.
- Example:
101110->(101) (110)->56in Octal.
- Example:
- To Hexadecimal: Group the binary bits into sets of 4, starting from the right.
- Example:
101110->(0010) (1110)->2Ein Hexadecimal.
- Example:
3. Binary Arithmetic Operations
3.1 Binary Addition
Follows four basic rules:
0 + 0 = 00 + 1 = 11 + 0 = 11 + 1 = 0(with a carry of 1 to the next higher significant bit)1 + 1 + 1 (carry) = 1(with a carry of 1)
3.2 Binary Subtraction
Follows four basic rules:
0 - 0 = 01 - 0 = 11 - 1 = 00 - 1 = 1(with a borrow of 1 from the next higher significant bit. The borrow reduces the next bit by 1).
4. Complements (Representing Negative Numbers)
In digital systems, we cannot use a minus sign (
-). Instead, negative numbers are represented using complements.4.1 1's Complement
- The 1's complement of a binary number is found by simply inverting all the bits (changing 0s to 1s, and 1s to 0s).
- Example: 1's complement of
10110is01001.
4.2 2's Complement
- The most common method used by modern computers to represent signed integers.
- Formula:
2's Complement = 1's Complement + 1 - Advantage: Unlike 1's complement which has two representations for zero (+0 and -0), 2's complement has a single unique representation for zero, simplifying arithmetic logic unit (ALU) design.
- Example: Find 2's complement of
1010- Invert bits (1's complement):
0101 - Add 1:
0101 + 1 = 0110
- Invert bits (1's complement):
4.3 Subtraction using 2's Complement
Computers perform subtraction (
A - B) by adding the 2's complement of B to A (A + 2's complement of B).- Rule 1: If a carry is generated out of the Most Significant Bit (MSB), discard the carry. The result is positive and in its true binary form.
- Rule 2: If NO carry is generated, the result is negative and is currently in its 2's complement form. To find the actual magnitude, take the 2's complement of the result again.
Course4All Editorial Board
Verified ExpertSubject Matter Experts
Comprising experienced educators and curriculum specialists dedicated to providing accurate, exam-aligned preparation material.
Pattern: 2026 Ready
Updated: Weekly
Found an issue or have a suggestion?
Help us improve! Report bugs or suggest new features on our Telegram group.