DS Introduction

Flow Chart

Define Data Structure


DS Data Types

DS Stack

DS Queue

Number System

Sparse Matrix


Application of Stack

DS Linked List

DS Functions

DS Tree

DS Graph


Exercise Searching


Hash Table

DS Questions

Number System Conversion

Number systems are very important because the design and organization of a computer system depends upon the number system. The various numbers systems are:

Decimal Number

It consists of 10 digits 0 to 9. A number written by using these digits is called a decimal number. Since the decimal number system consists of digits, the base of this system is 10.

Binary Number System

In the binary number system, only two digits are used i.e. 0 and 1. Since the binary number system has only two digits, its base is 2.

Octal Number System

In the Octal number system, digits are used 0 to 7. Since the octal number system has 8 digits, its base is 8.

Hexadecimal Number System

In the Hexadecimal number system, digits are used 0 to 15. Since the hexadecimal number system has 16 digits, its base is 16. In hexadecimal number system 10 is represent as A, 11 as B, 12 as C, 13 as D, 14 as E and 15 as F.

Number System Conversion

Binary to Octal
Convert (100 111 101 011 010)2 to its octal equivalent.
(100 111 101 011 010)2 = (47532)8

Octal To Binary
Convert (2456)8 into its binary equivalent.
To solve this we refer the table and make the 3 bit binary equivalents. (2456)8 = (010 100 101 110)2

Exercise Question: Number System

  1. WAP to Convert Decimal Number to Binary and vice-versa
  2. WAP to Convert Binary Number to Decimal and vice-versa
  3. WAP to Convert Octal Number to Decimal and vice-versa
  4. WAP to Convert Binary Number to Octal and vice-versa
Updated: 2-Dec-19