You are on page 1of 62

Computer Numbers

Systems Conversions
Assumptions
• What is Binary ??

• Units of Data You already


Know
• Types of Computer Number
System

What You Will Learn


• Computer Number system conversions
Course Contents
Short Summary
• What is Binary ??

• Units of Data

• Types of Computer Number


System

Course Topic
• Computer Number system
conversions
0 1
What is Binary ?
0 1
OFF ON

Bit = smallest unit of


data
1 Bit = 0 OR 1 bit = 1
1 byte=8 bits
Units of Data

1 bit=0 or
1 bit=1
1 byte=8 bits
1 KiloByte (KB) = 1024 bits
1 Mega Byte(MB) = 1024 Kilobytes (KB)
1 Giga Byte (GB) = 1024 Megabytes (MB)
1 Tera Byte(TB) = 1024 Gigabytes (GB)
Types of Computer Number System

Types Of Computer Number


Systems Numb
Binary Hexadecimal
Number Number
System Systems

Base 2 Decimal Octal


Base 16
Number of Number Number
Systems Number of
symbols = 2 Systems
Symbols=16
0,1,2,3,4,5,6,7,8,9,
0,1 Base 10 Base 8 10,11,12,13,14,15
Example: (11010)2 Number of Symbols=10 Number of Symbols=8
0,1,2,3,4,5,6,7,8,9 0,1,2,3,4,5,6,7 A, B, C, D, E, F
Example:(219)10 Example:(1736)8 Example: (C23E)16
Number Systems Summary Table

Number Base Used Digits Example


System
Binary 2 0,1 (11010101)2
Octal 8 0,1,2,3,4,5,6,7 (175)8
Decimal 10 0,1,2,3,4,5,6,7,8,9 (569)10
Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, (F0)16
F
Whole number Conversion Road Map Floating point number

Octal into Binary Decimal into other bases


Use Table

Binary into Octal


Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal


Other Bases into Decimal
Octal Binary Hex

Binary Decimal
Hexadecimal into Octal
Decimal
Hex Binary Octal Octal
Hexadecimal Decimal
Octal into Binary
Use Table
Binary into Octal
Table Making Procedure

Octal into Binary

Binary into Octal

Binary = 2
Octal = 8

What should be the power of 2 to get the answer


8?
2?=8

Ans) 2 x 2 x 2 = 8 23
Table will be Conversion from Binary into Octal & Octal to Binary
used
FOR
How to Make the Table
3 columns 8 rows
23 =8
8/2=4 2/2=1
Write four times 0
0 0 0 0 Then Write four times 1 Write one time 0
1 0 0 1 Write one time 1
4/2=2 Is Column completely
2 0 1 0
0 1 1 filled ? NO….
3 Write two times 0
Carry on till whole this
4 1 0 0 Then Write two times 1
column is filled
Still some boxes of this column
5 1 0 1 are empty, So again repeat
6 1 1 0 Write two times 0
Then Write two times 1 (Now
7 1 1 1 col is filled completely)
Octal into Binary
Use Table
Binary into Octal
Octal into Binary
Table will be used
FOR
Convert (25)8 = ( ? )2
Whole
number
(25) 8

o 0 0 0
1 0 0 1 2 5
2 0 1 0
3 0 1 1
4 1 0 0 010 101
5 1 0 1 010101
6 1 1 0 Answer
7 1 1 1 (25)8 = (10101)2
Octal into Binary
Table will be used
FOR
Convert (76.4)8 = ( )2 ?
Floating point
(76.4) 8 number

0 0 0
7 6 . 4
o
1 0 0 1
2 0 1 0 111 110 100
3 0 1 1
4 1 0 0 111110.100
5 1 0 1
6 1 1 0 Answer
7 1 1 1 (76.4)8 = (111110.100)2
Octal into Binary
Use Table
Binary into Octal
Binary into Octal
Table will be used
FOR
Convert (10110)2 = ( )8 ???

(10110) 2 Whole
number

010 110
o 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1 2 6
4 1 0 0
5 1 0 1 26
6 1 1 0 Answer
7 1 1 1 (10110)2 = (26)8
Binary into Octal
Table will be used
FOR
Convert (11.10)2 = ( )8 ???

(11.10) 2 Floating point


number

0 0 0
011 . 10 0
o
1 0 0 1
2 0 1 0 3 . 4
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0 Answer
7 1 1 1 (11.10)2 = (3.4)8
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal
Table Making Procedure

Conversion from Hexadecimal into Binary

Conversion from Binary into Hexadecimal

Binary = 2
Hexadecimal = 16

What should be the power of 2 to get the answer


16 ?
2?=16

Ans) 2 x 2 x 2 x 2 = 16 24
Table will be Conversion from Binary into HexaDecimal & Hexadecimal to Binary
used How to Make the Table
FOR
4 columns
16 rows
0 0 0 0 0 24 = 16
1 0 0 0 1
0 0 1 0
4/2=2
2 16 / 2 = 8
3 0 0 1 1
Write eight times 0
4 0 1 0 0
Then Write eight times 1 Write two times 0
5 0 1 0 1
Write two times 1
6 0 1 1 0 8/2=4 Is Column completely filled ?
7 0 1 1 1 Write four times 0 Carry on till whole this column
8 1 0 0 0 Then Write four times 1 is filled
9 1 0 0 1 Still some boxes of this column
A 10 1 0 1 0 are empty, So again repeat 2/2=1
B 11 1 0 1 1 Write four times 0 Write one time 0
C 12 1 1 0 0 Then Write four times 1 (Carry Write one time 1
D 13 1 1 0 1 on till whole this column is Is Column completely filled ?
E 14 1 1 1 0 filled) Carry on till whole this column
F 15 1 1 1 1 is filled
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal
Table will be used Hexadecimal into Binary
FOR
Convert (64)16 = ( )2 ?
0 0 0 0 0 Whole
1 0 0 0 1 number
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1 6 4
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1 0110 0100
A 10 1 0 1 0
1 0
B 11
C 12 1 1
1
0
1
0
Answer
D 13 1 1 0 1
E 14 1 1 1 0 (64)16 = (01100100)2
F 15 1 1 1 1
Table will be used Hexadecimal into Binary
FOR
Convert (5C.E)16 = ( )2 ?
0 0 0 0 0 Floating point
1 0 0 0 1 number
2 0 0 1 0
3
4
0
0
0
1
1
0
1
0
5 C . E
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1 0101 1100 1110
8 1 0 0 0
9 1 0 0 1
A 10 1 0 1 0
1
B 11
C 12 1
0
1
1
0
1
0
Answer
D 13 1 1 0 1
E 14 1 1 1 0 (5C.E)16 = (01011100.1110)2
F 15 1 1 1 1
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal
Table will be used Binary into Hexadecimal
FOR
Convert (1001101)2 = ( )16 ???

0 0 0 0 0 Whole
1 0 0 0 1
0 0 1 0
number
2
3 0 0 1 1 0100 1101
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1 4 D
8 1 0 0 0
9 1 0 0 1
A 10 1 0 1 0
1
B 11
C 12 1
0
1
1
0
1
0
Answer
D 13 1 1 0 1
E 14 1 1 1 0 (1001101)2 = ( 4 D )16
F 15 1 1 1 1
Table will be used Binary into Hexadecimal
FOR
Convert (11.1101)2 = ( )16 ?
0 0 0 0 0 Floating point
1 0 0 0 1 number
2 0 0 1 0
3 0 0
1
1
0
1 0 011 . 1101
4 0 0
5 0 1 0 1
6 0 1 1 0
7
8
0
1
1
0
1
0
1
0
3 . D
9 1 0 0 1
A 10 1 0 1 0
B 11
C 12
1
1
0
1
1
0
1
0
Answer
D 13 1 1 0 1
E 14 1 1 1 0 (11.1101)2 = ( 3 . D ) 16
F 15 1 1 1 1
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Octal into Binary
Table will be used
FOR
Convert (66.4)8 = ( )2 ?
Floating point
number

6 6 . 4
o 0 0 0
1 0 0 1
2 0 1 0 110 110 100
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0 Answer
7 1 1 1 (66.4)8 = (110110.100)2
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Table will be used Binary into Hexadecimal
FOR
Convert (111110.100)2 = ( )16 ?
0 0 0 0 Floating point
0
1 0 0 0 1 number
2 0 0 1 0
3 0 0 1 1 0 0 11 1110 . 100 0
4 0 1 0 0
5 0 1 0 1

.
6 0 1 1 0
7
8
0 1 1 1 3 E 8
1 0 0 0
9 1 0 0 1
A 10 1 0 1 0
B 11
C 12
1
1
0
1
1
0
1
0
Answer
D 13 1 1 0 1 (111110.100)2 = ( 3 E . 8) 16
E 14 1 1 1 0
F 15 1 1 1 1 (66.4)8 = ( 3 E . 8 ) 16
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Table will be used Hexadecimal into Binary
FOR
Convert (5A.B)16 = ( )2 ?
0 0 0 0 0 Floating point
1 0 0 0 1 number
2 0 0 1 0
3
4
0
0
0
1
1
0
1
0
5 A . B
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1 0101 1010 1011
8 1 0 0 0
9 1 0 0 1
A 10 1 0 1 0 01011010.1011
1
B 11
C 12 1
0
1
1
0
1
0
Answer
D 13 1 1 0 1
E 14 1 1 1 0 (5A.B)16 = (01011010.1011)2
F 15 1 1 1 1
Octal into Binary
Use Table
Binary into Octal

HexaDecimal into Binary


Use Table
Binary into Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Binary into Octal
Table will be used
FOR
Convert (01011010.1011)2 = ( )8 ???

Floating point
number

001 011 010 . 101 10 0


o 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1 1 3 2 . 5 4
4 1 0 0
5 1 0 1 Answer
6 1 1 0
7 1 1 1
(01011010.1011)2 = ( 1 3 2 . 5 4 )8
(5A.B)16 = ( 1 3 2 . 5 4 )8
Octal into Binary Decimal into other bases
Use Table
Whole number Floating point number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Decimal into other bases Whole number

Decimal Binary

Divide the given number by 2

Decimal Octal

Divide the given number by 8

Decimal Hexadecimal
Divide the given number by 16
Octal into Binary Decimal into other bases
Use Table
Whole number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Decimal into Binary
Convert (198)10 = ( 11000110 ) 2 Whole
number

2 198
2 - Quotient 99 49 2412 6 3 1
2 -
- Remainder 0 1 1 0 0 01
2
2 -
2 -
2 -
Answer
2 -
(11000110)2
Octal into Binary Decimal into other bases
Use Table
Whole number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Decimal into Octal
Convert (798)10 = ( 1436 ) 8 Whole
number

8 798
8 - Quotient 99 12 1
8 -
- Remainder 6 3 4

Answer
(1436)8
Octal into Binary Decimal into other bases
Use Table
Whole number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Decimal into Hexadecimal
Convert (798)10 = ( 31E ) 16 Whole
number

16 798
16 - Quotient 49 3
16 -
Remainder E 1

Answer
(31E)16
Octal into Binary Decimal into other bases
Use Table
Floating point number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Floating point Decimal into Binary
number
Is the Fractional Part =
Convert (.625)10 = ( .101 )2 0

Integer Part Fractional Part


Ans .625 * 2 = 1.25 1 .25

* 2 = 0.5 0 0.5

* 2 = 1.0 1 0
Now the fractional part = 0 So, STOP
Answer (.625)10 = ( .101 ) 2
Octal into Binary Decimal into other bases
Use Table
Floating point number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Floating point Decimal into Octal
number
Is the Fractional Part
Convert (0.015625)10 = ( .01 ) 8 =0

Integer Part Fractional Part


Ans .015625 * 8 = 0.125 0 .125

* 8 = 1.000 1 0.0

Now the fractional part = 0 So, STOP

Answer
(.015625)10 = ( 0.01 ) 8
Octal into Binary Decimal into other bases
Use Table
Floating point number
Binary into Octal
Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal

Octal Binary Hex

Hexadecimal into Octal

Hex Binary Octal


Floating point Decimal into Hexadecimal Conversion
number
Is the Fractional Part
Convert (.93)10 = ( ) 16 =0

Integer Part Fractional Part


Ans .93 16 = 14.88 14 (E) .88
*
* 16 = 14.08 14(E) 0.08
* 16 = 1.28 1 .28
* 16 = 4.48 4 0.48
* 16 = 7.68 7 0.48
Now the fractional part not ending.. So, STOP
Doing it five times is enough if it is not ending (You can do it more if you want)

Answer (.93)10 = ( .EE147 ) 16


Decimal into other bases
What if we are given with the number that has integer part
as well as fractional part ?? How will we solve it ?

• e.g (198.625)10 into ( )2


• Solution
• the integral part (198 ) using Prime factorization method
• & the fractional part (0.625) using the conversion
method of decimal into other bases for floating point
numbers
• & then Combine both answers to get final answer
Decimal into Binary
Convert (198.625)10 = ( )2

Final Answer (198.625)10 = ( 11000110.101 ) 2


Decimal into Octal
Convert (798.015625)10 = ( )8

Final Answer (798.015625)10 = ( 1436.01 ) 8


Decimal into Hexadecimal
Convert (798.93)10 = ( ) 16

Final Answer (798.93)10 = ( 31E.EE147 ) 16


Octal into Binary Decimal into other bases
Use Table

Binary into Octal


Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal


Other Bases into Decimal
Octal Binary Hex

Binary Decimal
Hexadecimal into Octal
Decimal
Hex Binary Octal Octal
Hexadecimal Decimal
Octal into Binary Decimal into other bases
Use Table

Binary into Octal


Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal


Other Bases into Decimal
Octal Binary Hex

Binary Decimal
Hexadecimal into Octal
Decimal
Hex Binary Octal Octal
Hexadecimal Decimal
Binary into Decimal
Q:1) Convert (1011)2 = ( ) 10 Q:2) Convert (.101)2 = ( ) 10
Whole number Fractional Number

Ans 1 0 1 1 . 1 0 1

1 * 23 0 * 22 1 * 21 1 * 20 1 * 2-1 1 * 2-2 1 * 2-3

8 0 2 1 1/2 0 1/8

Answer 11 Answer .625

Q:3) Convert (1011.101)2 = Q:1 & Q:2


Answer
(1011.101)2 = ( 11.625 )10
Octal into Binary Decimal into other bases
Use Table

Binary into Octal


Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal


Other Bases into Decimal
Octal Binary Hex

Binary Decimal
Hexadecimal into Octal
Octal Decimal
Hex Binary Octal
Hexadecimal Decimal
Octal into Decimal
Q:1) Convert (106)8 = ( ) 10 Q:2) Convert (.32)8 = ( ) 10
Whole Number Fractional Number

Ans 1 0 6 . 3 2

1 * 82 0 * 81 6 * 80 3 * 8-1 2 * 8-2

64 0 6 3/8 2/64

Answer 70 Answer .40625

Q:3) Convert (106.32)8 = ( ) 10= Q:1 & Q:2


Answer
(106.32)8 = ( 70.40625 )10
Octal into Binary Decimal into other bases
Use Table

Binary into Octal


Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal


Other Bases into Decimal
Octal Binary Hex

Binary Decimal
Hexadecimal into Octal
Octal Decimal
Hex Binary Octal
Hexadecimal Decimal
Conversion from Hexadecimal into Decimal
Q:1) Convert (13A)16 = ( ) 10 Q:2) Convert (.B8)16 = ( ) 10
Whole Number Fractional Number

Ans 1 3 A . B 8

1 * 162 3 * 161 A(10) * 160 B(11) * 16-1 8 * 16-2

256 48 10 11/16 8/256

Answer 314 Answer .71875

Q:3) Convert (13A.B8)16 = ( ) 10 = Combine Q:1 & Q:2


Answer
(13A.B8)16 = ( 314.71875 )10
Octal into Binary Decimal into other bases
Use Table

Binary into Octal


Decimal Binary
HexaDecimal into Binary
Use Table Decimal Octal
Binary into Hexadecimal
Decimal Hexadecimal

Octal into Hexadecimal


Other Bases into Decimal
Octal Binary Hex

Binary Decimal
Hexadecimal into Octal
Octal Decimal
Hex Binary Octal
Hexadecimal Decimal
Thank YOU !!

You might also like