0% found this document useful (0 votes)
108 views

Binary Number Conversion

Numbering systems represent numbers in computer systems using defined sets of digits. The document discusses four main numbering systems: binary uses the digits 0 and 1, octal uses digits 0-7, decimal uses 0-9, and hexadecimal uses 0-9 and A-F. It provides examples of how to convert between these numbering systems by grouping digits and looking up values in tables. Converting between bases involves repeatedly dividing by the new base to obtain remainders that make up the number in that base.

Uploaded by

Mine Rahol
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Binary Number Conversion

Numbering systems represent numbers in computer systems using defined sets of digits. The document discusses four main numbering systems: binary uses the digits 0 and 1, octal uses digits 0-7, decimal uses 0-9, and hexadecimal uses 0-9 and A-F. It provides examples of how to convert between these numbering systems by grouping digits and looking up values in tables. Converting between bases involves repeatedly dividing by the new base to obtain remainders that make up the number in that base.

Uploaded by

Mine Rahol
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Numbering System

Numbering systems are the technique to represent numbers In the computer system
architecture, easy value that you are saving or getting into/ from computer memory has a
defined number system.
Computer architecture supports following number systems.

 Binary number system


 Octal number system
 Decimal number system
 Hexadecimal (hex) number system
BINARY NUMBER SYSTEM :- A Binary number system has only two digits that are 0
and 1. Every number (value) represents with 0 and 1 in this number system. The base of
binary number system is 2, because it has only two digits.
OCTAL NUMBER SYSTEM :- Octal number system has only eight (8) digits from 0 to 7.
Every number (value) represents with 0,1,2,3,4,5,6 and 7 in this number system. The base of
octal number system is 8, because it has only 8 digits.
DECIMAL NUMBER SYSTEM :- Decimal number system has only ten (10) digits from 0
to 9. Every number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this number system.
The base of decimal number system is 10, because it has only 10 digits.
HEXADECIMAL NUMBER SYSTEM :- A Hexadecimal number system has sixteen (16)
alphanumeric values from 0 to 9 and A to F. Every number (value) represents with
0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in this number system. The base of hexadecimal
number system is 16, because it has 16 alphanumeric values. Here A is 10, B is 11, C is 12,
D is 14, E is 15 and F is 16

Generally we have seen in the above explanation of number systems. We


will see here in table.
Number Base(Radix Used digits Examples
system )
Binary 2 0,1 (111100000)2
Octal 8 0,1,2,3,4,5,6,7 (340)8
Decimal 10 0,1,2,3,4,5,6,7,8,9 (3400)10
Hexadecima 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, (3F5A)16
l F

Numbering system conversion


 Binary to octal: To convert a number in binary to octal group three binary
digits together starting from the last digit (right) and if there are no enough digits
add zeros to the front End (left) and find the corresponding Octal of each group.

Binary: 11100101= 11 100 101

011 100 101 Pad the most significant digits


(3 4 5)8 with zeros if necessary to
complete a group of three.

 Binary to decimal: Multiply the digit with 2(with place value exponent).
Eventually add all the multiplication becomes the Decimal number.
 *A number X1 X2 X3 …Xn in base M can be expanded as
(X0 X1 X2 X3 …..Xn) M=X0*mn-1+X1*mn-2X2*mn-3+ …Xd-1*m1+Xnm0 in base 10

 Ex:- The binary number 1101 may be expanded as


(1101)2 =1*23+1*22+0*21+1*20 =(1*8)+(1*4)+(0*2)+(1*1)=(13)10

 Binary to Hexadecimal:- To convert binary to hexadecimal group four


binary digits together starting from right and if there are no enough digits add zeros
at the left.

Binary: 11100101 = 1110 0101


Then look up each in group in a table below :-

Binary: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 11 11
10
Hexadec 0 1 2 3 4 5 6 7 8 9 A B C D E F
imal:

Binary 1110 0101


Hexadecimal E 5

(11100101)2=(E5)16

 Octal to binary : - Converting from octal to binary is as easy as converting from


binary to octal. Simply look up each octal digit to obtain the equivalent group of three
binary digits.

Octal: 0 1 2 3 4 5 6 7
Binary 000 001 010 011 100 101 110 111
:
EX : - convert (346) to (?) 8 2

Octal 3 4 6
Binary 011 100 110
Then it give as (011100110)2
 Octal to decimal : - The conversion can also be performed in the conventional
mathematical way, by showing each digit place as an increasing power of 8.
(345)8= (3 * 82 ) + (4 * 81 ) + (5 * 80 ) = (3 * 64) + (4 * 8) + (5 * 1) = (229) 10
 Octal to Hexadecimal : -When converting from octal to hexadecimal, it is
often easier to first convert the octal number into binary and then from binary into
hexadecimal. For example, to convert 345 octal into hex:
Octal 3 4 5
Binary 011 100 101 =(011100101)2
Drop any leading zeros or pad with leading zeros to get groups of four binary digits
(bits): Binary 011100101 = 1110 0101=(E5)16
 Decimal to an other bases : - To convert a decimal number X to a
number in base m, divide X by m, store the remainder, again divide the quotient
by M, store the remainder, and continue until the quotient is 0. And concatenate
(collect) the remainders starting from the last up to the first.

Decimal to binary : - Ex.. Convert 5610 to base two (binary) X=56 M=2

5610 =1110002

Decimal to Octal : -

EX. Convert 7810 to base eight (Octal)

7810=1168
Decimal to Hexadecimal : -

EX.. Convert 3010 to base sixteen (hexadecimal)

3010=1E16

Convert 1610 to base sixteen (hexadecimal)

1610=1016

 Hexadecimal to binary : -Converting from hexadecimal to binary is as easy as


converting from binary to hexadecimal. Simply look up each hexadecimal digit to obtain
the equivalent group of four binary digits.

Example : -(A2DE)16=(1010 0010 1101 1110)2

 Hexadecimal to octal : - To convert from hexadecimal to octal, first


convert the hexadecimal to binary and then the binary to octal.

Hexadecimal: A 3 E
Binary : 1010 0011 1110

(101 000 111 110)2=(5 0 7 6)8

Hexadecimal to Decimal : - The conversion can also be performed in the


conventional mathematical way, by showing each digit place as an increasing power of 16.

To convert a number X consists of digits X 1 X2 X3 …Xn in base m to decimal;


simply expand the number with base M. That is

(X1X2X3…Xn) m =X1*mn-1+X2*mn-2 +X3*mn-3+...+ Xi*mn-i+… Xn-1m1+Xn*m0

=Y10

Convert (A1B) 16 to decimal

= (2587)10

Convert (101)16 to decimal


=(257)10
THANK YOU FOR YOUR
RECOMMENDATION ! !

You might also like