Number Systems and their Conversions - Computer Architecture

 ðŸ“ŒHighlights: 

Hello Friends ! In this post we learn about the most important topic of computer architecture i.e Number system. In Number system we cover following things such as What is Number System?, Type of number system, Conversion from one number system to another.Binary to Decimal conversion,Binary to octal conversion,Binary to hexadecimal conversion, and similarly vice-versa.

Number System: In computer architecture number system play an important role. Whole process in computer is done by the help of different format of  number system.We know computer can understand numbers (Binary number such as 0&1).There are so many this to know about the use of number system in computer.But here we concentrate about what is number system and there type, conversion from one number system to another. 

Know let we understand, What is number system?

A number system is a collection of various symbols such as (0,1,0-9,A-F) etc. On the basis of these symbols things are represented, calculated, stored etc in computer system.


Now we will discuss about type of number system: 

Number System is categorise into following type such as:

1. Binary Number System.

2. Decimal Number System.

3. Octal Number System.

4. Hexadecimal Number System.


Binary Number System:

We know binary means two, here in number system what two means?, how it is applicable in number system?, so two means there are two type of symbols are used i.e (0 & 1) or we can also say that it is a system which has base 2.

All number made by the combination of 0 & 1 are called binary numbers in number system such as 011,1010,1111,01, 011110101.... etc.

We represent / identify any binary number by base 2.

Example: (011)2


Decimal Number System:

In decimal number the range of symbol is increase from 0-9 i.e 10 different symbols. Here base 10 is used to represent / identified decimal numbers.

All numbers made by using 0 to 9 are called decimal numbers.

 Example: (245)10 


Octal Number System:

In octal number system base 8 is used to represent / identify the octal number. Base 8 represent means there are 8 digits i.e 0-7.

Example:  (246)


Hexadecimal Number System:

In hexadecimal number system base 16 is used to represent / identify the hexadecimal number. Base 16 represent means there are 16 digits i.e (0-9 + 6 Alphabets).

Such as: [0-9 , A, B, C, D, E, F]

Here  A means 10, 

        B means 11, 

        C means 12, 

        D means 13, 

        E means 14, 

        F means 15.

Example: (23BFE)16


Above all are the brief introduction of Number System and their type so that we can identify number system.

Now the most important topic is conversion from one number system to another. So let we start !


Conversion of Number Systems:

TYPE-1 : 
Conversion from Binary  to Decimal:

Example: 

    (101101)2


Procedure:




Explanation:


Above show the complete conversion procedure, let we understand in simple words.


In Step-1 we simply index the given binary number and write index from left to right and start from 0, so we get 

Index     Binary

  0            1
  1            0
  2            1    
  3            1    
  4            0
  5            1


In Step-2 we simply multiply binary number to 2 power index such as ( 20212223242)

Now we understand what is story to write about 2 power index, see we are talking about binary number whose base is 2 so we write 2 power index.


In Step-3 we just add all bits, i.e  what we get result in step-2


In Step-4 we simply get final result in decimal with base 10.




TYPE-2 : 

Conversion from Binary  to Octal:

Example: 

    (11011011101)2


Procedure:








Explanation:


Above show the complete procedure of binary to octal conversion. Let we understand.

In Step-1 First we make pair of 3 bits of given binary number form left to right. We get following pairs.

Pair-1 : 101

Pair-2: 011

Pair-3: 011

Pair-4: 11

In Step-2 we simply multiply binary number to 2 power index such as ( 222120 ) for each pair separately and we get following result

Pair-1 : 101 = 5

Pair-2: 011 = 3

Pair-3: 011 = 3

Pair-4: 11   = 3

Now after that we simply write like this (3 3 3 5) with base 8 for Octal so finally we get

(3335)8



TYPE-3 : 

Conversion from Binary  to Hexadecimal:

Example: 

(101101)2


Procedure:






Explanation:

Above show the complete procedure of binary to hexadecimal conversion. Let we understand.

In Step-1 First we make pair of 4 bits of given binary number form left to right. We get following pairs.

Pair-1 : 1101

Pair-2: 10

In Step-2 we simply multiply binary number to 2 power index such as (23222120 ) for each pair separately and we get following result

Pair-1 : 1101 = 13  which is equivalent to (D)

Pair-2: 10 = 2



Now after that we simply write like this (2 D) with base 16 for hexadecimal so finally we get

(2 D)16




TYPE-4 : 

Conversion from Decimal to Binary :

Example: 

(45)10



Explanation:

Decimal to binary conversion is very simple we just apply divide by 2 method and collect remainder in form of 0 & 1.

In Step-1 apply divide by 2 method means simply decimal number is divided by 2 and collect all remainders as show in above. such as

45 / 2  =22 and Remainder =1 

22 / 2  = 11 and Remainder = 0

11 / 2  = 5 and Remainder = 1

5 / 2    = 2 and Remainder = 1

2 / 2    =1 and Remainder = 0

At the end of divide we must include 1 form (2/2=1)

In Step-2 we Just collect the remainders read from down to up ward and write it from right to left such as

(101101)2



TYPE-5 : 

Conversion from Decimal to Octal :

Example: 

(320)10


Explanation:

Decimal to octal conversion is very simple we just apply divide by 8 method and collect remainder.

In Step-1 apply divide by 8 method means simply decimal number is divided by 8 and collect all remainders as show in above. such as

320 / 8  =40 and Remainder =0 

40 / 8  = 5 and Remainder = 0

Now 5 < 8 than Remainder = 5

In Step-2 we Just collect the remainders read from down to up ward and write it from right to left such as

(500)8



TYPE-6 : 

Conversion from Decimal to Hexadecimal:

Example: 

(320)10


Explanation:

Decimal to Hexadecimal conversion is very simple we just apply divide by 16 method and collect remainder.

In Step-1 apply divide by 16 method means simply decimal number is divided by 16 and collect all remainders as show in above. such as

320 / 16  =20 and Remainder =0 

20 / 16  = 5 and Remainder = 4

Now 1 < 16 than Remainder = 1

In Step-2 we Just collect the remainders read from down to up ward and write it from right to left such as

(140)16



TYPE-6 : 

Conversion from Octal to Binary:

Example: 

(234)8


Explanation:

In Octal to Hexadecimal conversion we first convert octal number into 3- bit binary because we know octal contain 3 bits.

In above figure it is clear in Step-1 convert 4,3,2 octal numbers into 3-bit binary number such as,

4 = 100

3 = 011

2 = 101

In Step -2 just collect the binary numbers and write in sequence (234) , (101 011 100)

In Step-3 finally we get binary number  (101011100)2



TYPE-7 : 

Conversion from Octal to Decimal:

Example: 

(345)8



Explanation:

In Octal to Decimal conversion we simply multiply octal numbers with 8. Power show the index such as 0,1,2,...

In step-1 multiply octal number to 8 with power and add all.

In step-2 adding result of multiplication.

In step-3 write result in decimal form such as : (229)10



TYPE-8 : 

Conversion from Octal to Hexadecimal:

Example: 

(345)8


Explanation:

Above figure show  Octal to Hexadecimal conversion in three steps.

In step-1 we simply write octal number into 3-bit binary number such as:

5 - 101

4 - 100

3 - 011

In step-2 write all binary numbers together and make pair of 4-bits and find the values. such as:

0101 - 5

1110 - 14 is equivalent to (E) in hexadecimal number.

In step-3 write result in hexadecimal form such as: (E 5)16



TYPE-9 : 

Conversion from Hexadecimal to Binary.

Example: 

(234)16




Explanation:

Above figure show  Hexadecimal to Binary conversion in two steps.

In step-1 we simply write octal number into 4-bit binary number such as:

4 - 0100

3 - 0011

2 - 0010

In step-2 write all binary numbers together. 

In step-3 write result in binary form such as: (001000110100)2



TYPE-10 : 

Conversion from Hexadecimal to Decimal.

Example: 

(2 3 E)16





Explanation:

In Hexadecimal to Decimal conversion we simply multiply hexadecimal numbers with 16. Power show the index such as 0,1,2,...

In step-1 multiply hexadecimal number to 16 with power and add all.

In step-2 adding result of multiplication

In step-3 write result in decimal form such as : (574)10



TYPE-11 : 

Conversion from Hexadecimal to Octal.

Example: 

(E 5)16



Explanation:

Above figure show  Hexadecimal to Octal conversion in three steps.

In step-1 we simply write hexadecimal number into 4-bit binary number such as:

5 - 101

E (14) - 1110

In step-2 write all binary numbers together and make pair of 3-bits and find the values. such as:

101 - 5

100 - 4 

11  -  3

In step-3 write result in hexadecimal form such as: (345)8

Completion of Number System and Conversion 

Friends I hope you understand what is numeric numbers and their conversions. I am try to explain in a simple way with examples. We will meet in next post till thank !

 

No comments:

Post a Comment