Binary Number Conversion
Binary Number Conversion
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 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
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:
(11100101)2=(E5)16
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 : -
7810=1168
Decimal to Hexadecimal : -
3010=1E16
1610=1016
Hexadecimal: A 3 E
Binary : 1010 0011 1110
=Y10
= (2587)10