0% found this document useful (0 votes)
8 views12 pages

Understanding Number Systems: Types & Conversions

The document provides an overview of number systems, including Decimal, Binary, Octal, and Hexadecimal, explaining their bases and digit representations. It details conversion methods between these systems, including examples for clarity. Additionally, it covers arithmetic operations on binary numbers and the concepts of 1's and 2's complements.

Uploaded by

abhaypal9970
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

Understanding Number Systems: Types & Conversions

The document provides an overview of number systems, including Decimal, Binary, Octal, and Hexadecimal, explaining their bases and digit representations. It details conversion methods between these systems, including examples for clarity. Additionally, it covers arithmetic operations on binary numbers and the concepts of 1's and 2's complements.

Uploaded by

abhaypal9970
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Chapter-I Number System

 Number System is a method of representing numbers on the


number line with the help of a set of Symbols and rules.
 These symbols range from 0-9 and are termed as digits.

Types of Number System


Based on the base value and the number of allowed digits, number systems
are of many types.
The four common types of Number System are:
1. Decimal Number System
2. Binary Number System
3. Octal Number System
4. Hexadecimal Number System

 Radix of Number System:


The number of independent digits used in the number system is known as Radix or
Base of the number system.

Decimal: a radix-10 number system and therefore has 10 different digits or symbols.
These are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. All higher numbers after ‘9’ are represented in
terms of these 10 digits only.
Binary: a radix-2 number system (2 different digits are 0 and 1).
Hexadecimal: a radix-16 number system (16 different digits are 0 to 9 and
A,B,C,D,E,F representing 10, 11, 12,13,14,15 respectively).

1
Octal: a radix-8 number system (8 different digits are 0 to 7).

 Decimal Number System


Number system with base value 10 is termed as Decimal number system. It uses 10
digits i.e. 0-9 for the creation of numbers.
Here, each digit in the number is at a specific place with place value a product of
different powers of 10. The place value is termed from right to left as first place value
called units, second to the left as Tens, so on Hundreds, Thousands, etc. Here, units
has the place value as 100, tens has the place value as 101, hundreds as 102,
thousands as 103, and so on.
For example: 10285 has place values as
(1 × 104) + (0 × 103) + (2 × 102) + (8 × 101) + (5 × 100)
1 × 10000 + 0 × 1000 + 2 × 100 + 8 × 10 + 5 × 1
10000 + 0 + 200 + 80 + 5
10285

1. Binary to Decimal Conversion


- A binary number is converted into a decimal number by multiplying
each digit of the binary number by the power of either 1 or 0 to the
corresponding power of 2.
- Let us consider that a binary number has n digits, B = a n-1…a3a2a1a0.
Now, the corresponding decimal number is given as
D = (an-1 × 2n-1) +…+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20)

Let us go through an example to understand the concept better.


Example: Convert (10011) 2 to a decimal number.
Solution:
The given binary number is (10011) 2.

(10011)2 = (1 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20)

= 16 + 0 + 0 + 2 + 1 = (19) 10

Hence, the binary number (10011) 2 is expressed as (19) 10.

2. Decimal to Binary to Conversion:

2
- A decimal number is converted into a binary number by dividing the
given decimal number by 2 continuously until we get the quotient as
1, and we write the numbers from downwards to upwards.

Let us go through an example to understand the concept better.


Example: Convert (28) 10 into a binary number.
Solution:

3. Octal Number System :

- Octal Number System is a number system with base 8 as it uses eight


symbols (or digits) namely 0, 1, 2, 3, 4, 5, 6, and 7.
- For example, 228, 138, 178, etc. are octal numbers.

- This number system is mainly used in computer programming as it is a compact


way of representing binary numbers with each octal number corresponding to
three binary digits.

Binary to Octal Conversion


Different methods for binary to octal conversion are:
 Binary to Decimal then Decimal to Octal
 Direct Method for Binary to Octal Conversion
3
Binary to Decimal Then Decimal to Octal
The steps to convert binary to octal using decimal are listed below.
 First convert binary to its decimal equivalent by multiplying the bits by its
equivalent power of two.
 Then, convert obtained decimal to octal by division by base method.
Example: (1111)2 = (______)8
Solution:
First convert (1111)2 into its decimal = (1111)2 = 23 × 1 + 22 × 1 + 21 × 1 + 20 × 1 =
(15)10
Then, convert (15)10 decimal into octal by division by 8 method.

Decimal number to be converted into Remainde


Octal base octal r
(8)

8 15 7↑

8 1 1↑

8 0 0↑

Write remainders from bottom to top to get octal equivalent.


(15)10 = (17)8
(1111)2 = (17)8

Direct Method for Binary to Octal Conversion

4
Decima Binar Octa
l y l

0 000 0

1 001 1

2 010 2

3 011 3

4 100 4

5 101 5

6 110 6

7 111 7

 Octal to Binary Conversion:

5
To convert a number from octal number system to binary number system take each
octal digit and replace it with its three-digit binary equivalent.
Example: Convert (345)8 to binary.
Solution:
Step 1: Convert Octal to Binary
3 in octal is 011 in binary
4 in octal is 100 in binary
5 in octal is 101 in binary
Combine these binary equivalents: (345)8 = (011100101)2

 Octal to Hexadecimal Conversion


A hexadecimal number system has a base 16 and it is an
alphanumeric number system consisting of digits from 0 to 9 and
alphabets from A to F. To convert an octal number to a hexadecimal
number: First convert the octal number to the decimal number; Then
convert the obtained decimal number to the hexadecimal number.
Steps to Convert Octal Number to Decimal Number
 Step 1: Write the octal number.
 Step 2: Multiply each digit of the given octal number with an
increasing power of 8 starting from the rightmost digit.
 Step 3: Sum all the products obtained in step 2.
Steps to Convert Decimal Number to Hexadecimal Number
 Step 1: Divide the decimal number by 16.
 Step 2: Write down the quotient and remainder obtained.
 Step 3: Divide the quotient obtained by 16.
 Step 4: Repeat step 2 and step 3 until the quotient becomes 0.
 Step 5: Write the obtained remainder in reverse order.
 Step 6: Convert each obtained remainder to its corresponding
hexadecimal digit.

4. Hexadecimal Number System:

6
- Hexadecimal Number System is a base-16 number system used
in diverse fields, especially in computing and digital electronics.
- It consists of 16 symbols, including numbers 0 to 9 and letters A to
F, offering a compact way to represent binary-coded values.
- The hexadecimal number system is sometimes also represented as,
‘hex’.

1. Hexadecimal to Decimal Conversion


Converting hexadecimal to decimal follows a similar process as before,
where each digit is multiplied by the respective power of 16.
Hexadeci
mal 0 1 2 3 4 5 6 7 8 9 A B C D E F

1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9
Decimal 0 1 2 3 4 5

Example: Convert (A7B)16 to decimal.

7
⇒ (A7B)16 = 10 × 256 + 7 × 16 + 11 × 1 (convert symbols A and B to their
(A7B)16 = A × 162 + 7 × 161 + B × 160

⇒ (A7B)16 = 2560 + 112+ 11


decimal equivalents; A = 10, B = 11)

⇒ (A7B)16 = 2683
Therefore, the decimal equivalent of (A7B) 16 is (2683)10.

2. Decimal to Hexadecimal Conversion


To convert a decimal number to hexadecimal, we use the base number 16.
The process involves dividing the number by 16 repeatedly until the
quotient becomes zero. The decimal to hexadecimal number system is
shown in the image added below

3. Hexadecimal to Binary Conversion

Converting hexadecimal to binary involves two methods: one with a


conversion table and the other without a conversion table.

Method 1: Convert Hexadecimal to Binary with Conversion Table


To convert a hexadecimal number to binary using a conversion table, we
follow these steps:

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

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
Deci 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
mal 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

8
Example: Convert hexadecimal (4D) 16 to binary.
Solution:
Look up Decimal Equivalent of each digit in the conversion table.
4 in decimal is (4)10, and D in decimal is (13) 10
Convert each decimal number to binary.
(4)10 is (0100)2, and (13)10 is (1101)2
Combine the binary numbers
(4D)16 is (01001101)2

 Arithmetic Operations on Binary Numbers


We can easily perform various operations on Binary Numbers. Various arithmetic
operations on the Binary number include,
 Binary Addition
 Binary Subtraction
 Binary Multiplication
 Binary Division

1. Binary Addition
The result of the addition of two binary numbers is also a binary number. To obtain
the result of the addition of two binary numbers, we have to add the digit of the
binary numbers by digit. The table added below shows the rule of binary addition.

Binary Number Binary Number


(1) (2) Addition Carry

0 0 0 0

9
Binary Number Binary Number
(1) (2) Addition Carry

0 1 1 0

1 0 1 0

1 1 0 1

2. Binary Subtraction
The result of the subtraction of two binary numbers is also a binary number. To obtain
the result of the subtraction of two binary numbers, we have to subtract the digit of
the binary numbers by digit. The table added below shows the rule of binary
subtraction.

Binary Number Binary Number Subtractio Borro


(1) (2) n w

0 0 0 0

0 1 1 1

1 0 1 0

1 1 0 0

3. Binary Multiplication
The multiplication process of binary numbers is similar to the multiplication of decimal
numbers. The rules for multiplying any two binary numbers are given in the table,

10
Binary Number Binary Number Multiplicatio
(1) (2) n

0 0 0

0 1 0

1 0 0

1 1 1

4. Binary Division
The division method for binary numbers is similar to that of the decimal number
division method. Let us go through an example to understand the concept better.
Example: Divide (11011)2 by (11)2
Solution:

 1’s and 2’s Complement of a Binary Number

11
 1’s Complement of a Binary Number is obtained by inverting
the digits of the binary number.
Example: Find the 1’s complement of (10011)2.
Solution:
Given Binary Number is (10011)2
Now, to find its 1’s complement, we have to invert the digits of the given
number.
Thus, 1’s complement of (10011)2 is (01100)2

 2’s Complement of a Binary Number is obtained by inverting


the digits of the binary number and then by adding 1 to the
least significant bit.
Example: Find the 2’s complement of (1011)2.
Solution:
Given Binary Number is (1011)2
To find the 2’s complement, first find its 1’s complement, i.e., (0100) 2
Now, by adding 1 to the least significant bit, we get (0101) 2
Hence, the 2’s complement of (1011)2 is (0101)2

12

You might also like