- Related Questions & Answers
- Arithmetic Number in C++
- Describe about systems of accounting.
- Multiprocessor Systems
- Distributed Systems
- Clustered Systems
- Missing Number In Arithmetic Progression using C++
- Single Processor Systems
- Program to find number of arithmetic subsequences from a list of numbers in Python?
- Program to find number of arithmetic sequences from a list of numbers in Python?
- Find the missing number in Arithmetic Progression in C++
- Real-Time Embedded Systems
- Open Source Operating Systems
- Binary Number System - Overflow in Arithmetic Addition in C/C++?
- Java arithmetic operators
- Perl Arithmetic Operators

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

A **number system **is a set of symbols used to represent values derived from a common base or radix. In a number, the value of each digit can be determined using digit, position of the digit in the number, and the base of the number system. The base is defined as the total number of digits are available in the number system. This is known as positional number system.

Number System | Base | Digit Used |

Binary | 2 | 0, 1 |

Octal | 8 | 0, 1, 2, 3, 4, 5, 6, 7 |

Decimal | 10 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |

Hexadecimal | 16 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F |

Arithmetic operations like addition, subtraction, multiplication and division are performed in various radix bases. These arithmetic operations may also use r’s complement and (r-1)’s complement representation.

These representation techniques hold basic laws for various arithmetic operations:

**(i) Unique Existence Law**: The sum and product of any two numbers exist uniquely. Where 0 is the identity element for additions and 1 is the identity element for multiplication.

**(ii) Associative Law:**Addition and multiplication of binary numbers are associative.

**(iii) Commutative Law:**Addition and multiplication of binary numbers are commutative.

**(iv) Distributive Law:**Multiplication of binary numbers is distributive over two or more terms in addition.

Now, arithmetic operations for various number systems are explained as following below.

**Arithmetic Operations of Binary Numbers:**

In the Binary System, there are only two symbols or possible digit values, i.e., 0 and 1. Represented by any device that only 2 operating states or possible conditions. Generally, it is expressed by subscript 2 or binary (B).

Binary arithmetic is essential part of various digital systems. You can add, subtract, multiply, and divide binary numbers using various methods. These operations are much easier than decimal number arithmetic operations because binary system has only two digits: 0 and 1.

Binary additions and subtractions are performed as same in decimal additions and subtractions. When we perform binary additions, there will have two outputs: Sum (S) and Carry (C) . There are four rules for binary addition. These are given as following below,

Input A | Input B | Sum (S) A+B | Carry (C) |

0 | 0 | 0 | 0 |

0 | 1 | 1 | 0 |

1 | 0 | 1 | 0 |

1 | 1 | 0 | 1 |

There are four rules for binary subtraction. These are given as following below,

Input A | Input B | Subtract (S) A-B | Borrow (B) |

0 | 0 | 0 | 0 |

0 | 1 | 0 | 1 |

1 | 0 | 1 | 0 |

1 | 1 | 0 | 0 |

Borrow 1 is required from next higher order bit to subtract 1 from 0. So, result became 0.

There are four rules for binary multiplication. These are given as following below,

Input A | Input B | Multiply (M) AxB |

0 | 0 | 0 |

0 | 1 | 0 |

1 | 0 | 0 |

1 | 1 | 1 |

Whenever at least one input is 0, then multiplication is always 0.

There are four part in any division: Dividend, Divisor, quotient, and remainder. These are given as following rules for binary division,

Input A | Input B | Divide (D) A/B |

0 | 0 | Not defined |

0 | 1 | 0 |

1 | 0 | Not defined |

1 | 1 | 1 |

Whenever divisor is 0, then result is always not defined.

**Arithmetic Operations of Octal Numbers:**

It has base of 8 digits ranging from 0 to 7 (i.e., 0, 1, 2, 3, 4, 5, 6, 7). Generally, it is expressed by subscript 8 or octal (o).

Arithmetic operations of octal numbers are also performed same as decimal arithmetic operations. The addition table for octal numbers is given as below:

+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |

1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 |

2 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 |

3 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 |

4 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 |

5 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 |

6 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 |

7 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

With the help of above table, we can perform additions of octal numbers.

Similarly, we can perform subtraction of octal numbers same as decimal number sutractions. But you can only take borrow of a number 7, which is maximum digit allowed in octal number systems.

In the multiplication of octal numbers, if the product is less than radix of octal (i.e, 8), then we take it as the result, else divide it by radix of octal (i.e., 8) and take the remainder as the LSB (least significant bit). The quotient is taken as carry in the next significant digit.

Similarly, division of octal numbers can be performed by following the rules of division of decimal numbers but maximum allowed digit will be 7.

**Arithmetic Operations of Hexadecimal Numbers:**

It has base of 16 digits ranging from 0 to F (i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and A, B, C, D, E, F). A, B, C, D, E, F are equivalent single digits of 10, 11, 12, 13, 14, 15 respectively. Generally, it is expressed by subscript 16 or Hexa (H) or (h).

Arithmetic operations of hexadecimal numbers can be performed using addition table for hexadecimal numbers which is given as below:

+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |

0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |

1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 |

2 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 |

3 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 |

4 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 |

5 | 5 | 7 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 |

6 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 |

7 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

8 | 8 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

9 | 9 | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |

A | A | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

B | B | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A |

C | C | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B |

D | D | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C |

E | E | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D |

F | F | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E |

With the help of above table, we can perform additions of hexadecimal numbers.

Subtraction of hexadecimal numbers can be performed by using complement methods or simple as decimal sutractions. The rule of simple hexadecimal subtraction is the digit borrowed from the immediate higher place is counted as 16.

In the multiplication of hexadecimal numbers, if the product is less than radix of hexadecimal (i.e, 16), then we take it as the result, else divide it by radix of hexadecimal (i.e., 16) and take the remainder as the LSB (least significant bit). The quotient is taken as carry in the next significant digit. Using these rules, you can make a table for hexadecimal multiplications.

Similarly, division of hexadecimal numbers can be performed by following the rules of division of decimal numbers but maximum allowed digit will be F(=15 in decimal).

**Arithmetic Operations of Decimal Numbers:**

Arithmetic operations of decimal numbers are very popular and much easier. These operations are also performed as same in other number systems.

Advertisements