THE SCHOOL OF CISCO NETWORKING (SCN): NUMBERS CONVERSION - BINARY TO DECIMAL, OCTAL, HEXADECIMAL AND SO:
Contact No:   ### / ###/ ###
Welcome To The IT Knowledge Base Sharing Freeway "Study With The Zero Fees / Zero Money" Web - If We Believe, That If We Have Knowledge, Let Others Light Their Candles With It. - Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Ones Please. "Student Expectations And Satisfaction Is Always Our Highest Priority")

'Love All, Serve All, Help Ever Hurt Never'

Please Welcome To The "Zero Fees And Zero Money SCN Community Study Page"

We Like To Share Our Stuff With Everyone And Hope You Will Find Something Useful Here. Enjoy Our Collection And Come Back Again And Again, We'll Do Our Best To Make It Always Interesting For You. All Our Stuff Always Available May Be 100% Totally Freely. Use Only For Non-Commercial Purposes Only!

THE SCHOOL OF CISCO NETWORKING (SCN) Is A IT Support Community – Based, Non - Profit Volunteer Organizations, Offering Our Assistance And Support To Developmental Our Services Dedicated To All.

Because Large Section Of Our Students In This World, Especially In Villages, Who Are Under Privileged Expecting For Equal Opportunity In Terms Of Money And Education. We Feel The Sufferings Of Talented Students Losing Their Opportunity To Shine Because Of Their Poor Financial Status. So We Thought That Professional Education Will Be Providing Them Freely.

Our Web Site Is To Give An Easy Way To Understand Each And Every Student Who Are Going To Start CISCO Lab Practice Without Any Doubts And Our ARTICLES STUFF Are Always 100% Totally Free For Everyone, Which Is Belongings To THE SCHOOL OF CISCO NETWORKING (SCN).

Also This Guide Provides Technical Guidance Intended To Help All Network Students, Network Administrators And Security Officers Improve Of Their Demonstrated Ability To Achieve Specific objectives Within Set Timeframes.

Hands - On Experience Is An Invaluable Part Of Preparing For The Lab Exam And Never Pass Up An Opportunity To Configure Or Troubleshoot A Router ( If You Have Access To Lab Facilities, Take Full Advantage Of Them) There Is No Replacement For The Experience You Can Gain From Working In A Lab, Where You Can Configure Whatever You Want To Configure And Introduce Whatever Problems You Want To Introduce, Without Risk Of Disrupting A Production Network.

For Better View Of Our Web Page - Please Use Any Latest Web Browser, Such As (Mozilla Firefox, Google Chrome, Opera, Safari, Internet Explorer, Torch, Maxthon, Sea Monkey, Avant Browser, Deepnet Explorer, And Etc ), Because Some Elements Or Scripts Are Not Work In The Old Web Browser (It Might Not Be Displayed Properly Or Are Not Appearing properly!). Thank You For Your Time And Best Of Luck!

Your Sincerely – Premakumar Thevathasan.
"Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Once Please,Thank You."

NUMBERS CONVERSION - BINARY TO DECIMAL, OCTAL, HEXADECIMAL AND SO:

NUMBERS CONVERSION - BINARY TO DECIMAL, OCTAL, HEXADECIMAL AND SO :

Introduction Of Numbering Systems (Binary, Decimal, Octal And Hexadecimal):

◙ - ► Binary (Base 2):  0, 1
◙ - ► Octal (Base 8):  0, 1, 2, 3, 4, 5, 6, 7
◙ - ► Decimal (Base 10):  0, 1, 2, 3, 4, 5, 6, 7, 8, 9
◙ - ► Hexadecimal (Base 16):  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

For More About - > Notes For Number Systems (Binary, Decimal, Octal, Hexadecimal):

Conversion Table - Binary, Decimal, Hexadecimal, Octal:

The Binary Concept - Power Of Two:

HEXADECIMAL 0 1 2 3 4 5 6 7 8 9 A B C D E F
DECIMAL 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Power Of Two :

   2^0=1
   2^1=2
   2^2=4
   2^3=8
   2^4=16
   2^5=32
   2^6=64
   2^7=128

The Relationship Between These Number Systems Can Be Seen In The Following Table, Where The Zero Position Refers To The Rightmost Digit Of A Number, And The ^ Symbol Represents Exponentiation:

Position :
Value in Base :

10

2

8

16
0
10^0 = 1 2^0 = 1 8^0 = 1 16^0 = 1
1
10^1 = 10 2^1 = 2 8^1 = 8 16^1 = 16
2
10^2 = 100 2^2 = 4 8^2 = 64 16^2 = 256
3
10^3 = 1000 2^3 = 8 8^3 = 512 16^3 = 4,096
4
10^4 = 10,000 2^4 = 16 8^4 = 4,096 16^4 = 65,536
5
10^5 = 100,000 2^5 = 32 8^5 = 32,768 16^5 = 1,048,576
6
10^6 = 1,000,000 2^6 = 64 8^6 = 262,144 16^6 = 16,777,216
7
10^7 = 10,000,000 2^7 = 128 8^7 = 2,097152 16^7 = 268,435,456


BINARY TO DECIMAL CONVERSION


  1. Start The Decimal Result At 0.
  2. Remove The Most Significant Binary Digit (Leftmost) And Add It To The Result.
  3. If All Binary Digits Have Been Removed, You’re Done. Stop.
  4. Otherwise, Multiply The Result By 2.
  5. Go To Step 2.

An Example Of Converting 11100000000 Binary To Decimal :

Binary Digits  Operation  Decimal Result  Operation  Decimal Result
11100000000+11× 22
1100000000+13× 26
100000000+17× 214
00000000+014× 228
0000000+028× 256
000000+056× 2112
00000+0112× 2224
0000+0224× 2448
000+0448× 2896
00+0896× 21792
0+01792


DECIMAL TO BINARY CONVERSION


The Decimal (Base Ten) Numeral System Has Ten Possible Values (0,1,2,3,4,5,6,7,8, Or 9) For Each Place-Value. In Contrast, The Binary (Base Two) Numeral System Has Two Possible Values, Often Represented As 0 Or 1, For Each Place-Value.

To Avoid Confusion While Using Different Numeral Systems, The Base Of Each Individual Number May Be Specified By Writing It As A Subscript Of The Number. For Example, The Decimal Number 156 May Be Written As 15610 And Read As "One Hundred Fifty-Six, Base Ten". The Binary Number 10011100 May Be Specified As "Base Two" By Writing It As 10011100 2 .

Decimal To Binary Conversion Examples :

  • (51)10 = (110011)2
  • (217)10 = (11011001)2
  • (8023)10 = (1111101010111)2

Decimal Binary Conversion Table:

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

An Example Of Using Repeated Division To Convert 1792 Decimal To Binary :

  1. Divide The Decimal Number By The Desired Target Radix (2, 8, Or 16).
  2. Append The Remainder As The Next Most Significant Digit.
  3. Repeat Until The Decimal Number Has Reached Zero.
Decimal Number  Operation  Quotient  Remainder  Binary Result
1792÷ 2 =89600
896÷ 2 =448000
448÷ 2 =2240000
224÷ 2 =11200000
112÷ 2 =56000000
56÷ 2 =280000000
28÷ 2 =1400000000
14÷ 2 =7000000000
7÷ 2 =31100000000
3÷ 2 =111100000000
1÷ 2 =0111100000000
0

Now We Are Going To See How To Convert Decimal To Binary :

The Decimal or "Denary" Counting System Uses The Base of 10 Numbering System Where Each Digit In A Number Takes On One Of Ten Possible Values From 0 to 9, eg 21310 (Two Hundred And Thirteen). In A Decimal System Each Digit Has A Value Ten Times Greater Than Its Previous Number And This Decimal Numbering System Uses A Set Of Symbols, b, Together With A Base, q, To Determine The Weight Of Each Digit Within A Number. For Example, The Six In Sixty Has A Lower Weighting Than The Six In Six Hundred And In A Binary Numbering System We Need Some Way Of Converting Decimal To Binary.

Any Numbering System Can Be Summarised By The Following Relationship :

   N = bi qi
   where: N Is A Real Positive Number
b Is The Symbol
q Is The Base Value
and integer (i) Can Be Positive, Negative Or Zero
N = b2 q2 + b1 q1  + b0 q0 + b-1 q-1 ... etc.

In The Decimal Or Denary System, The Columns Have Values Of Units, Tens, Hundreds Etc As We Move From Right To Left And Mathematically These Values Are Written As 100, 101, 102, 103 etc. The Decimal Numbering System Has A Base Of 10 Or Modulo-10 (Sometimes Called MOD-10) With The Position Of Each Digit In The Decimal System Indicating The Magnitude Or Weight Of The Number. For Example, 20 (Twenty) Is The Same As Saying 2 X 101 And 400 (Four Hundred) Is The Same As Saying 4 X 102. Likewise, For Fractional Numbers The Weight Of The Number Is Negative, 10-1, 10-2, 10-3 etc.

The Value Of A Decimal Number Is Equal To The Sum Of The Digits Multiplied By Their Respective Weights. For Example:  N = 616310  (Six Thousand One Hundred And Sixty Three)  In A Decimal Format Is Equal To:

(6×103) + (1×102) + (6×101) + (3×100) = 6163

Unlike The Decimal Numbering System Which Uses The Base Of 10, Digital Logic Uses Just Two Values Or States, A Logic Level "1" Or A Logic Level "0", So Each "0" And "1" Is Considered To Be A Single Digit In A Base Of 2 or Binary numbering system. In The Binary Numbering System, Each Digit Has A Value Twice That Of The Previous Digit But Can Only Have A Value Of Either "1" Or "0" Therefore, q = "2" And The Position Of Either A "0" Or A "1" Indicates Its Weight.

For Example:

Decimal Digit Value: 256 128 64 32 16 8 4 2 1

Binary Digit Value: 1 0 1 1 0 0 1 0 1

By Adding Together All The Decimal Number Values From Right To Left At The Positions That Are Represented By A "1" Gives Us:  (256) + (64) + (32) + (4) + (1) = 35710 or three hundred and fifty seven in decimal.

Then, The Binary Array Of Digits 1011001012 Is Equivalent To 35710 In Decimal Or Denary. As The Decimal Number Is A Weighted Number, Converting From Decimal To Binary Will Also Produce A Weighted Binary Number With The Right-Hand Most Bit Being The Least Significant Bit Or LSB, And The Left-Hand Most Bit Being The Most Significant Bit Or MSB. And We Can Represent These As.

MSBBinary DigitLSB
282726 25242322 2120
256 1286432 1684 21

Repeated Division-By-2 Method:

Another Method Of Converting Decimal to Binary Number Equivalents Is To Write Down The Decimal Number And To Continually Divide By 2 (Two) To Give A Result And A Remainder Of Either A "1" Or A "0" Until The Final Result Equals Zero.

Example.  Convert The Decimal Number 29410 Into Its Binary Number Equivalent.

Number 294       Dividing Each Number By "2" Gives A Result Plus A Remainder. The Binary Result Is Obtained By Placing The Remainders In Order With The Least Significant Bit (LSB) Being At The Top And The Most Significant Bit (MSB) Being At The Bottom.
Divide By 2
Result 147Remainder0  (LSB)
Divide By 2
Result73Remainder1
Divide By 2
Result 36Remainder1
Divide by 2
Result 18Remainder0
Divide by 2
Result 9Remainder0
Divide by 2
Result 4Remainder1
Divide by 2
Result 2Remainder0
Divide by 2
Result 1Remainder0
Divide by 2
Result 0Remainder1  (MSB)

Then, The Decimal To Binary Conversion Gives The Decimal Number 29410 equivalent of 1001001102 In Binary, Reading From Right To Left.

Then The Main Characteristics Of A Binary Numbering System Is That Each "Digit" Or "Bit" Has A Value Of Either "1" or "0" With Each Digit Having A Weight Or Value Double That Of Its Previous Bit Starting From The Lowest Or Least Significant Bit (LSB) And This Is Called The "Sum-Of-Weights" Method. So We Can Convert A Decimal Number To Binary Either By Using The Sum-Of-Weights Method Or By Using The Repeated Division-by-2 method.


BINARY TO HEXADECIMAL CONVERSION


To Convert A Binary Number Into Its Hexadecimal Equivalent, Divide It Into Groups Of Four Bits. If The Number Of Bits Isn't A Multiple Of Four, Simply Insert Extra 0 Bits At The Left Are Called Padding.

For Example:

10100102 = 0101 0010 Grouped With Padding = 5216

110111012 = 1101 1101 Grouped = DD16

Another Easy Conversion To Do Is Binary To Hexadecimal. The Hexadecimal Number System Uses The Digits 0 To 9 And A, B, C, D, E, F. And Since The Hexadecimal System Is A Power Of 2 (24), We Can Take A Binary Number In Groups Of 4 And Use The Appropriate Hexadecimal Digit In Its Place.

The Steps To Doing So Are Simple. Begin At The Rightmost 4 Bits. If There Are Not 4 Bits, Pad 0s To The Left Until You Hit 4. Repeat The Steps Until All Groups Have Been Converted.

An Example Is Below :

Take The Binary Number (1000101). Using The Above Steps, Here Is The Conversion:

0100 | 0101 	Note That We Needed To Pad A 0 To The Left.
4 | 5

Answer: (45)16


HEXADECIMAL TO BINARY CONVERSION


This Conversion Is Also Simplistic. Given A Hexadecimal Number, Simply Convert Each Digit To It’s Binary Equivalent. Then, Combine Each 4 Bit Binary Number And That Is The Resulting Answer.

Hexadecimal To Binary Conversion Examples :
  • (1e3)16 = (111100011)2
  • (0a2b)16 = (101000101011)2
  • (7e0c)16 = (111111000001100)2

Hexadecimal To Binary Conversion Chart Table:

Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

Take The Hexadecimal Number (A2F)16 And Convert It To Its Binary Form:

A | 2 | F
1010 | 0010 | 1111

Answer: (1010 0010 1111)2

Take the hexadecimal number (55)16 and convert it to it’s binary form:

5 | 5
0101 | 0101

Answer: (1010101)2


BINARY TO OCTAL CONVERSION


An Octal System Is Again A Power Of Two (23), We Can Take Group The Bits Into Groups Of 3 And Represent Each Group As An Octal Digit. The Steps Are The Same For The Binary To Hexadecimal Conversions Except We Are Dealing With The Octal Base Now.

Given A Binary Number You Start By Grouping The Binary "1" And "0" Digits In Groups Of 3, Starting At The Right. Then Convert Each Of These Groups Into One Octal Digit.

Take The Binary Number (10011)2 And Convert It To Octal (Converting From One Base (Base 2) To Base 8) :

010 | 011
2 | 3

Answer: (23)8

Example:

binary number = 11001100010
grouped in 3s = 11 001 100 010
3s into octal = 3 1 4 2

So, The Base 2 number 11001100010 equals 3142 in base 8. (Octal Is A Base 8 System And Binary Is A Base 2 System).

Note:To Convert An Octal Number Into A Binary, Just Reverse The Above Process; Starting All The Way To The Right, Convert Each Digit Into A 3-Bit Binary Number.


DECIMAL TO OCTAL CONVERSION :


The Steps As Followed To Convert Decimal To Binary Are :

To Convert A Decimal Number Into An Octal Number, Divide It By 8 Repeatedly And Note The Remainders. The Remainders Are The Digits Of The Octal Number. The “Last” Remainder Is The Most Significant Digit, And The “First” Remainder Is The Least Significant Digit.

For Example,

1701(base 10) = 3245(base 8)          1701 ÷ 8 = 212     remainder     5     LSB
 212 ÷ 8 =  26 remainder 4  
  26 ÷ 8 =   3 remainder 2  
   3 ÷ 8 =   0 remainder 3 MSB


OCTAL TO DECIMAL CONVERSION :


Converting Octal To Decimal Can Be Done With Repeated Division.

  1. Start The Decimal Result At 0.
  2. Remove The Most Significant Octal Digit (Leftmost) And Add It To The Result.
  3. If All Octal Digits Have Been Removed, You’re Done. Stop.
  4. Otherwise, Multiply The Result By 8.
  5. Go To Step 2.

The Conversion Can Also Be Performed In The Conventional Mathematical Way, By Showing Each Digit Place As An Increasing Power Of 8.

345 octal = (3 * 82) + (4 * 81) + (5 * 80) = (3 * 64) + (4 * 8) + (5 * 1) = 229 decimal

Take The Octal Number (764)8 And Convert It To Decimal:

7 * 82 + 6 * 81 + 4 * 80
448 + 48 + 4 = 500

Answer: (500)10

Take The Octal Number (5771)8 And Convert It To Decimal:

5 * 83 + 7 * 82 + 7 * 81 + 1 * 80
2560 + 448 + 56 + 1 = 3,065

Answer: (3065)10


DECIMAL TO HEXADECIMAL CONVERSION


The Only Addition To The Algorithm When Converting From Decimal To Hexadecimal Is That A Table Must Be Used To Obtain The Hexadecimal Digit If The Remainder Is Greater Than Decimal 9.

Decimal To Hexadecimal Conversion Examples:
  • (79)10 = (4F)16
  • (120)10 = (78)16
  • (1728)10 = (6C0)16

Decimal Hex Conversion Chart Table:

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F

A2DE Hexadecimal :

= ((A) * 163) + (2 * 162) + ((D) * 161) + ((E) * 160)
= (10 * 163) + (2 * 162) + (13 * 161) + (14 * 160)
= (10 * 4096) + (2 * 256) + (13 * 16) + (14 * 1)
= 40960 + 512 + 208 + 14
= 41694 decimal


OCTAL TO HEXADECIMAL CONVERSION


Octal To Hexadecimal Is Converting A Number Is An Octal Number System To An Equivalent Number In The Hexadecimal Number System. That Is Converting A Number From Base 8 To Base 16. The Conversion Cannot Be Done Directly.

Example -1:

Convert The Octal Number 536 To Its Equivalent Hexadecimal Number.

Convert 536 (Octal) First To Its Binary Equivalent We Get :

(536)8 = (101) (011) (110)
           = (101011110)2

Now forming the groups of 4 binary bits to obtain its hexadecimal equivalent we get,
(101011110)2= (1) (0101) (1110)
                      = (0001) (0101) (1110)
                      = (15E)16

Example -2:

Convert The Hexadecimal Number 3DE To Its Octal Equivalent :

The Hexadecimal Number 3DE Is First Converted To Its Binary Equivalent.

(3DE)16 = (0011) (1101) (1110)
              = (001111011110)2

Now The Above Binary Equivalent Is Divided Into Groups Of 3 Bits To Obtain Its Octal Equivalent.
(001111011110)2 = (001) (111) (011) (110)
                             = (1736)8

Below Are The Examples On Converting Octal To Hexadecimal -

Solved Examples

Question 1: Convert 10028 to hexadecimal
Solution:
 
The given number is 10028

10028 = (1 * 83)+ (0 * 82) + (0 * 81) + (2 * 80)

=1 * 512 + 0 * 64 + 0 * 8 + 2 * 1

= 512 + 0 + 0+ 2

= 514(decimal number)

Now we convert the above decimal to hexadecimal

16 | 514
16 | 32   --2
        2 -- 0

The hexadecimal number is 202

10028 = 20216
 

Question 2: Convert 1008 to hexadecimal
Solution:
 
The given number is 1008

10028 = (1 * 82) + (0 * 81) + (0 * 80)

= 1 * 64 + 0 * 8 + 0 * 1

= 64 + 0 + 0

= 64(decimal number)

Now we convert the above decimal to hexadecimal

16 | 64
16 | 4   --0
16 | 0   -- 4

The hexadecimal number is 40

1008 = 4016
 

Question 3: Convert 158 to hexadecimal
Solution:
 
The given number is 158

158 =(1 * 81) + (5 * 80)

= 1 * 8 + 5 * 1

= 8 + 5

= 13(decimal number)

Now we convert the above decimal to hexadecimal

13 is less than 16 so the equivalent hexadecimal number is D

The hexadecimal number is D

158 = D16
 

For More About - > Notes For Number Systems (Binary, Decimal, Octal, Hexadecimal):

Conversion Table - Binary, Decimal, Hexadecimal, Octal:

The Binary Concept - Power Of Two:



CONCLUSION:


The Goal Of This Article Is To Give An Easy Way To Understand The “Numbers Conversion - Binary To Decimal, Octal, Hexadecimal And So:" Hope This Article Will Help Every Beginners Who Are Going To Start Cisco Lab Practice Without Any Doubts.

Some Topics That You Might Want To Pursue On Your Own That We Did Not Cover In This Article Are Listed Here, Thank You And Best Of Luck.

This Article Written Author By: Premakumar Thevathasan. CCNA, CCNP, CCIP, MCSE, MCSA, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+.

DISCLAIMER:


This Document Carries No Explicit Or Implied Warranty. Nor Is There Any Guarantee That The Information Contained In This Document Is Accurate. Every Effort Has Been Made To Make All Articles As Complete And As Accurate As Possible.

It Is Offered In The Hopes Of Helping Others, But You Use It At Your Own Risk. The Author Will Not Be Liable For Any Special, Incidental, Consequential Or Indirect Any Damages Due To Loss Of Data Or Any Other Reason That Occur As A Result Of Using This Document. But No Warranty Or Fitness Is Implied. The Information Provided Is On An "As Is" Basic. All Use Is Completely At Your Own Risk.

For Home Page Of - > SCN InF4 TECH


To Send Email




Window Minimize OR Window Maximize

No comments: