Skip to main content

Converting Decimal Number system to Binary, Octal and Hexa Decimal with Examples and Vice Versa


Topics covered with examples: Converting Decimal Number system to Binary, Octal and Hexa Decimal with Examples and Vice Versa



Number Systems in Computer Science and Conversion Method
Conversion of Decimal number system to other  number systems
Conversion of Decimal number system to binary number systems
Conversion of Decimal number system to octal number systems
Conversion of Decimal number system to hexadecimal number systems
Conversion of  non-decimal Number system to Other non-decimal number system

Conversion of other number systems to Decimal number system
Conversion of binary number systems to Decimal number system
Conversion of octal number systems to Decimal number system
Conversion of  hexadecimal number systems to Decimal number system

Q1. What is a Number System? What are different types of number system?

Number system
A number system is a set of digits, symbols and rules to express quantities in counting and calculations. Following are the most commonly used number systems:



Converting Decimal Number system to binary, octal and hex decimal with examples and vice versa
Number-systems-in-computer-science-easy-conversion-methods-with-pictures

Decimal Number System

It is most commonly used number system. It has 10 symbols{0,1,2,3,4,5,6,7,8,9}. It is also called base 10 number system. People normally use decimal number system to represent numbers.


Binary Number System

In binary number system there are only two symbols {0 and 1}. In a computer all data is represented by Binary number system. This is because computer’s electronic switches have only two states on and OFF. When a switch is ON it represents a 1 and when a switch is OFF, it represents a Zero.

Octal Number System

Octal number system consists of 8 digits{0,1,2,3,4,5,6,7}. Its base is 8. It is used as shorthand for long binary numbers. Each octal digit represents 3 binary digits.

Octal
Binary
0
000
1
001
2
010
3
011
4
100
5
101
6
110
7
111


Hexadecimal Number System

Hexadecimal number system is used to represent long binary numbers in an easy and short form. Its base is 16. It has sixteen symbols{0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}. Each hexadecimal digit represents 4 binary digits.
Hexadecimal
Binary
Hexadecimal
Binary
0
0000
8
1000
1
0001
9
1001
2
0010
A
1010
3
0011
B
1011
4
0100
C
1100
5
0101
D
1101
6
0110
E
1110
7
0111
F
1111



Q2. Conversion of Decimal (Integer part) to other systems

                                  
a) 4510 = (?)2   
b) 11910 =(?)8
c) 19010 =(?)16
2
45
2
22-1
2
11-0
2
5  -1
2
2  -1
2
1  -0

0  -1 
8
119
8
14-7
8
1  -6

0  -1
16
190
16
11-14(E)

0  -11(B)
   
           

=> 4510 = (101101)2                          11910=(167)8                       19010=(BE)16                       


Q3. Conversion of Decimal system (Fraction part) to other systems

a) (.23)10   = (?)2
b) (.225)10 = (?)8
c) (.225)10 = (?)16


Fraction
Integer
.23 X 2 = 0.46
.46
0
.46 X 2 = 0.92
.92
0
.92 X 2 = 1.84
.84
1
.84 X 2 = 1.68
.68
1
.68 X 2 = 1.36
.36
1

=> (.23)10   = (.00111)2        [Similar method is used for decimal (fraction) to Octal (multiply by 8)and hexadecimal(multiply by 16)]

Q4. Conversion of Other systems (Integer part) to Decimal


a)  (101101)2    =( ? )10     b)    (167)8  = (?)10                 (BE)16 =(?)10                      
   
  a) (101101)2                                                   
     =1x25+0x24+1x23+1x22+0x21+1x20 
    = 32   + 0   +   8   +  4   + 0     +1
    = 45 
b) (167)8          
     =1x82+6x81+7x80 
    = 64   + 48   +  7
    = 119 
c) (BE)2            
     =Bx161+Ex160 
    =  11x161+14x160 
    =  176   + 14
    =   190 


Q5. Conversion of Other systems(Fraction part) to Decimal number system

a)  (.110)2    =( ? )10     b)    (.75)8  = (?)10                 (.13)16 =(?)10                       
   
  a) (.110)2                                                        
     =.{1x2-1+1x2-2+0x2-3} 
     =.{ 1/2   + 1/4   +   0}
     =.{  .5    +  .25  +    0}
     =.75
b) (.75)8            
     =.{7x8-1+5x8-2  }
     =.{ 7/8   + 5/64 }
     = .{.875 + .0781}
     = .9531 
c) (.13)16           
     =.{1x16-1+3x16-2  }
     =.{1/16   +3/256} 
    =  .{.0625   + .01171}
    =   .0742 



      Conversion of  non-decimal Number system to Other non-decimal number system


      For example to convert OCTAL into HEXADECIMAL, use the follwing steps:

1)            Convert octal into decimal

2)            Convert decimal into hexadecimal

Topics covered with examples: Number Systems in Computer Science and Conversion Method

Conversion of Decimal number system to other  number systems

Conversion of Decimal number system to binary number systems
Conversion of Decimal number system to octal number systems
Conversion of Decimal number system to hexadecimal number systems
Conversion of  non-decimal Number system to Other non-decimal number system

Conversion of other number systems to Decimal number system
Conversion of binary number systems to Decimal number system
Conversion of octal number systems to Decimal number system
Conversion of  hexadecimal number systems to Decimal number system



Comments

Popular posts from this blog

Basic Structure of HTML Document

Basic Structure of HTML Document  The basic structure of an HTML document is given below: <HTML>         <HEAD>                  </HEAD>                 <BODY>                </BODY> </HTML> The above format shows that an HTML document starts with <HTML> tag and ends with </HTML> tag. It is also clear that an HTML document consists of two main sections:  Head Section Head section is used to specify a title of the web page, normally. There are some other uses of Head section too, like linking external style sheets and Java script code, etc. Head section starts with the <HEAD> tag and ends with the </HEAD> tag. <TITLE> tag is used to display a title of...

What are Different Types of Input Devices With Examples

Topic: Different types of input devices of a computer system with examples, pictures and explanation:  Topics Covered are: Definition of Input Devices Functions of Input Devices ( How input devices work? ) Examples of Input Devices Pictures / Images of different input devices Different Examples of Input Devices With Description Keybboard Mouse Trach Ball Trackpad Joy Stick Light Pen Microphone Scanner Graphic Tablet ( Digitizer ) Digital Camera Touch Screen ( I/O Device / Dual Device - Perform Both Functions input + Output ) INPUT DEVICES ( Definition ) Input devices are used to enter data and instructions into computer memory from external world. Input Device is a hardware part of the computer that is used to enter data and instructions into computer memory. The examples of input devices include: Keyboard, Mouse , Track ball, Track Pad, Joy stick, Touch Screen, Light pen,   Scanner , Digital Camera, Microphone, Graphics tablet e...

What are Different Types of Computer Hardware

What is Hardware? The physical parts of a computer are called hardware. Hardware can be touched or seen by us. For example, hard disk, mouse, keyboard, CD, CD-ROM Drive, Floppy Disk, Speakers, Modem and Printers - all are computer hardware. Explain different types of computer hardware Different types of hardware components on the basis of the functionality  they provide are as follows: 1.    Input devices Input devices are used to enter data and instructions into computer. Examples of input devices are: Keyboard, mouse, scanner, digital camera etc. Microphone Mouse Keyboard 2.    The Central Processing unit Central processing unit is the brain of the computer . It is also called CPU or Processor. Intel is the leading manufacturer of microprocessors. For example, Intel Pentium IV 3.2 MHz is an example of a CPU. You can see the images of processors / Micro processors or CPUs. Images of CPU or Microprocessor or s...