A Computer Uses A Binary Number System Which Has A Base 2 And Digits Can Have Only TWO Values: 0 And 1.
A Decimal Number With A Few Digits Can Be Expressed In Binary Form Using A Large Number Of Digits. Thus The Number 65 Can Be Expressed In Binary Form As 1000001.
The Binary Form Can Be Expressed More Compactly By Grouping 3 Binary Digits Together To Form An Octal Number. An Octal Number With Base 8 Makes Use Of The EIGHT Digits 0,1,2,3,4,5,6 And 7.
A More Compact Representation Is Used By Hexadecimal Representation Which Groups 4 Binary Digits Together. It Can Make Use Of 16 Digits, But Since We Have Only 10 Digits, The Remaining 6 Digits Are Made Up Of First 6 Letters Of The Alphabet. Thus The Hexadecimal Base Uses 0,1,2,….8,9,A,B,C,D,E,F As Digits.
BINARY NUMBERS AND BASE TWO :
Binary Numbers All Consist Of Combinations Of The Two Digits '0' And '1'. These Are Some Examples Of Binary Numbers:1
10
1010
11111011
11000000 10101000 00001100 01011101
Engineers And Mathematicans Sometimes Call The Binary Numbering System A Base-Two System Because Binary Numbers Only Contain Two Digits. By Comparison, Our Normal Decimal Number System Is A Base-Ten System. Hexadecimal Numbers Are A Base-Sixteen System.
HEXADECIMAL NUMERAL SYSTEM:
The Hexadecimal Numeral System, Also Known As Just Hex, Is A Numeral System Made Up Of 16 Symbols (Base 16). The Standard Numeral System Is Called Decimal (Base 10) And Uses 10 Symbols: 0,1,2,3,4,5,6,7,8,9. Hexadecimal Uses The Decimal Numbers And Includes Six Extra Symbols. We Do Not Have Symbols That Mean Ten, Or Eleven Etc. So These Symbols Are Characters Taken From The English Alphabet: A, B, C, D, E And F. Hexadecimal A = Decimal 10, And Hexadecimal F = Decimal 15.This Is 16 Numbers. Hex = 6 And Decimal = 10, So It Is Called Hexadecimal. Four Bits Is Called A Nibble (Sometimes Spelled Nybble). A Nibble Is One Hexadecimal Digit, And Is Written Using A Symbol 0-9 Or A-F. Two Nibbles Is A Byte (8 Bits). Most Computer Operations Use The Byte, Or A Multiple Of The Byte (16 Bits, 24, 32, 64, Etc).
WORKING WITH BINARY NUMBERS:
Computers Usually Group These Digits Into Eight Place Values, Known As A Byte or an octet. The Eight Place Values Are
27 26 25 24 23 22 21 20
THE PLACE VALUES ARE CALCULATED AS FOLLOWS :
20 = 1
21 = 1 x 2 = 2
22 = 2 x 2 = 4
23 = 4 x 2 = 8
24 = 8 x 2 = 16
25 = 16 x 2 = 32
26 = 32 x 2 = 64
27 = 64 x 2 = 128
VALUES OF A BINARY OCTET ARE:
128 64 32 16 8 4 2 1
THE BINARY OCTET 10010111 CAN BE READ AS FOLLOWS:
1 x 128 = 128
0 x 64 = 0
0 x 32 = 0
1 x 16 = 16
0 x 8 = 0
1 x 4 = 4
1 x 2 = 2
1 x 1 = 1
or 128 + 16 + 4 + 2 + 1 = 151
Where Converting Binary To Decimal Is A Matter Of Adding The Place Values, Converting From Decimal To Binary Is A Matter Of Subtracting Place Values. To Convert The Decimal Number 178 To Binary, For Instance, Begin By Subtracting The Highest Base 2 Place Value Possible From The Number:
178 Is Greater Than 128, So We Know There Is A 1 At That Place Value: 178 128 = 50.
50 Is Less Than 64, So There Is A 0 At That Place Value.
50 Is Greater Than 32, So There Is A 1 At That Place Value: 50 32 = 18.
18 Is Greater Than 16, So There Is A 1 At That Place Value: 18 16 = 2.
2 Is Less Than 8, So There Is A 0 At That Place Value.
2 Is Less Than 4, So There Is A 0 At That Place Value.
2 Is Equal To 2, So There Is A 1 At That Place Value: 2 2 = 0.
0 Is Less Than 1, So There Is A 0 At That Place Value.
Putting The Results Of All These Steps Together, 178 Is 10110010 In Binary.
Another Example Might Be Helpful. Given 110,
110 Is Less Than 128, So There Is A 0 At That Place Value.
110 Is Greater Than 64, So There Is A 1 At That Place Value: 110 64 = 46.
46 Is Greater Than 32, So There Is A 1 At That Place Value: 46 32 = 14.
14 Is Less Than 16, So There Is A 0 At That Place Value.
14 Is Greater Than 8, So There Is A 1 At That Place Value: 14 8 = 6.
6 Is Greater Than 4, So There Is A 1 At That Place Value: 6 4 = 2.
There Is A 1 At The 2 Place Value: 2 2 = 0.
0 Is Less Than 1, So There Is A 0 At That Place Value.
Therefore, 110 Is 01101110 In Binary.
WORKING WITH HEXADECIMAL NUMBERS:
Life Is Much Easier If An Octet Is Viewed As Two Groups Of Four Bits. For Instance, 11010011 Can Be Viewed As 1101 And 0011. There Are 24 = 16 Possible Combinations Of Four Bits, So With A Base 16, Or Hexadecimal, Numbering System, An Octet Can Be Represented With Two Digits. (The Root hex Means Six, and deci Means Ten.) Shows The Hexadecimal Digits And Their Decimal And Binary Equivalents.
Hex | Decimal | Binary |
---|---|---|
0 | 0 | 0000 |
1 | 1 | 0001 |
2 | 2 | 0010 |
3 | 3 | 0011 |
4 | 4 | 0100 |
5 | 5 | 0101 |
6 | 6 | 0110 |
7 | 7 | 0111 |
8 | 8 | 1000 |
9 | 9 | 1001 |
A | 10 | 1010 |
B | 11 | 1011 |
C | 12 | 1100 |
D | 13 | 1101 |
E | 14 | 1110 |
F | 15 | 1111 |
Because the first 10 characters of the decimal and the hexadecimal numbering system are the same, it is customary to precede a hex number with a 0x, or follow it with an h, to distinguish it from a decimal number. For example, the hex number 25 would be written as 0x25 or as 25h. This book uses the 0x convention.
After Working With Binary For Only A Short While, It Is Easy To Determine A Decimal Equivalent Of A 4-Bit Binary Number In Your Head. It Is Also Easy To Convert A Decimal Digit To A Hex Digit In Your Head. Therefore, Converting A Binary Octet To Hex Is Easily Done In Three Steps:1. | Divide The Octet Into Two 4-Bit Binary Numbers. |
2. | Convert Each 4-Bit Number To Decimal. |
3. | Write Each Decimal Number In Its Hex Equivalent. |
For Example, To Convert 11010011 To Hex,
11010011 becomes 1101 and 0011.
1101 = 8 + 4 + 1 = 13, and 0011 = 2 + 1 = 3.
13 = 0xD, and 3 = 0x3.
Therefore, 11010011 In Hex Is 0xD3.
Converting From Hex To Binary Is A Simple Matter Of Working The Three Steps Backward. For Example, To Convert 0x7B to Binary,
0 x 7 = 7, And 0xB = 11.
7 = 0111, And 11 = 1011.
Putting The 4-Bit Numbers Together, 0x7b = 01111011, Which Is Decimal 123.
WORKING WITH BINARY AND HEXADECIMAL:
The Use Of Place Values Allows The Representation Of Large Numbers With A Few Digits, Such As The 10 Decimal Digits. The Place Values Of All Numbering Systems Begin At The Right, With The Base Raised To The Power Of 0. Reading To The Left, Each Place Value Is The Base Raised To A Power That Is One More Than The Power Of The Previous Place Value :
B4 B3 B2 B1 B0
In Base 10, The First Five Place Values Are
104 103 102 101 100
100 = 1
101 = 1 x 10 = 10
102 = 10 x 10 = 100
103 = 100 x 10 = 1000
104 = 1000 x 10 = 10,000
So, The First Five Place Values Of The Base 10 Numbering System Are
10,000 1000 100 10 1
Reading A Number Such As 57,258 In Terms Of Place Values Means There Are Five Quantities Of 10,000, Seven Quantities Of 1000, Two Quantities Of 100, Five Quantities Of 10, And Eight Quantities Of 1. That Is,
5 x 10,000 = 50,000
7 x 1000 = 7000
2 x 100 = 200
5 x 10 = 50
8 x 1 = 8
Adding These Individual Results Together, The Result Is 50,000 + 7000 + 200 + 50 + 8 = 57,258.
MORE CHAPTERS ABOUT NUMBER SYSTEM:
◙ - ► For More About - > Numbers Conversion - Binary To Decimal, Octal, Hexadecimal:
◙ - ► For More About - > The Binary Concept - Power Of Two:
◙ - ► For More About - > Conversion Table - Decimal, Hexadecimal, Octal, Binary:
CONCLUSION:
The Goal Of This Article Is To Give An Easy Way To Understand The “Number Systems With Binary And Hexadecimal". Hope This Article Will Help Every Beginner 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, MCSE, MCSA, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+ And Etc.
WARNING AND 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, But No Warranty Or Fitness Is Implied.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.
Home Page Of - > The School Of Cisco Networking (SCN)
Contact Details / About Us Page
To Send Email
Window Minimize OR Window Maximize
No comments:
Post a Comment