NUMBER SYSTEMS (BINARY, DECIMAL, OCTAL, HEXADECIMAL) INTRODUCTION:
There Are Infinite Ways To Represent A Number. The Four Commonly Associated With Modern Computers And Digital Electronics Are: Decimal, Binary, Octal, And Hexadecimal.
A Number Can Be Represented With Different Base Values. We Are Familiar With The Numbers In The Base 10 (Known As Decimal Numbers), With Digits Taking Values 0,1,2,…,8,9.
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 Numeral System - Base-2
◙ - ► Octal Numeral System - Base-8
◙ - ► Decimal Numeral System - Base-10
◙ - ► Hex Numeral System - Base-16
- NUMBER SYSTEMS BINARY, DECIMAL, OCTAL, 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
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
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 010^0 = 1 2^0 = 1 8^0 = 1 16^0 = 1 110^1 = 10 2^1 = 2 8^1 = 8 16^1 = 16 210^2 = 100 2^2 = 4 8^2 = 64 16^2 = 256 310^3 = 1000 2^3 = 8 8^3 = 512 16^3 = 4,096 410^4 = 10,000 2^4 = 16 8^4 = 4,096 16^4 = 65,536 510^5 = 100,000 2^5 = 32 8^5 = 32,768 16^5 = 1,048,576 610^6 = 1,000,000 2^6 = 64 8^6 = 262,144 16^6 = 16,777,216 710^7 = 10,000,000 2^7 = 128 8^7 = 2,097152 16^7 = 268,435,456
NUMERAL SYSTEM
b - Numeral System Base
dn - The n-th Digit
n - Can Start From Negative Number If The Number Has A Fraction Part.
N+1 - the Number Of Digits
THE BINARY NUMBER SYSTEM
Binary Numeral System - Base-2
Binary Numbers Uses Only 0 And 1 Digits.
B Denotes Binary Prefix.
Binary (Base 2) Is The Natural Way Most Digital Circuits Represent And Manipulate Numbers. Binary Numbers Are Sometimes Represented By Preceding The Value With '0b', As In 0b1011. Binary Is Sometimes Abbreviated As Bin.
Binary Counting Goes : 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, and so on.
Examples :
101012 = 10101B = 1×24+0×23+1×22+0×21+1×20 = 16+4+1= 21
101112 = 10111B = 1×24+0×23+1×22+1×21+1×20 = 16+4+2+1= 23
1000112 = 100011B = 1×25+0×24+0×23+0×22+1×21+1×20 =32+2+1= 35
The Below Chart Can Certainly Come In Handy As These Are Most Commonly Seen When Converting Numbers. The Table Is Representing The First 11 Powers Of 2 Which Includes 2 To The 0th Power.
Mathematical Operations With Binary Can Get Tricky, As You Can Imagine, Although All You Really Need To Know How To Do Is Addition With Binary Numbers. (Subtraction Can Be Done By Adding A Negative Number To Another Number,But We'll Cover This In Another Chapter. Multiplication Can Be Done By Repeating Additions Over And Over A Given Number Of Times; Division Can Be Done By Subtracting A Number Over And Over.)
Addition In Binary Follows The Same Rules As Addition In Decimal. To Make Things Easier, Here's The Addition Table For Binary:
| 0 | 1 ---+-------+------- 0 | 0 | 1 ---+-------+------- 1 | 1 | 10(*) (*) or "0, and carry a 1"So, Say We Need To Add 01100100 Bin To 01110101 Bin. If We Write It As...
( columns: 76543210 |||||||| |||||||| ) 01100100 bin + 01110101 bin ------------We Can Add The 0 And 1 In Column Zero, And, Checking The Table, We Get 1. (Write This 1 Underneath The Line, Just Like In Decimal Addition.) Then, Moving To Column 1, 0 + 0 = 0, So Write Down A 0. In Column 2, 1 + 1 Gives Us 10 Bin. Just Like In Decimal Addition, We Write Down The Right-Most Value, 0, And Carry The 1. In Column 3, We Add The Carried 1 To 0 + 0 And Get 1. In Column 4, 0 + 1 = 1. In Column 5, 1 + 1 = 10 Bin, So We Write Down The 0 And Carry A 1 Again. In Column 6, We Add The Carried 1 To 1 + 1 Again, And Get 11. What Do We Do Here? We Can Write Down The Right-Most 1, And Then Carry The Left-Most 1. And In Column 7, We Get 1 + 0 = 1. Our Result Is 11011001 Bin.
OCTAL NUMERAL SYSTEM
Octal Numeral System - Base-8
Octal Numbers Uses Digits From 0..7.
Octal (Base 8) Was Previously A Popular Choice For Representing Digital Circuit Numbers In A Form That Is More Compact Than Binary. Octal Is Sometimes Abbreviated As Oct.
The Octal Number System Uses Base 8 Includes Only The Digits 0 Through7.
Digits (Symbols) Allowed: 0-7
Base (Radix): 8
The Weighted Values For Each Position Is As Follows :
8^5 8^4 8^3 8^2 8^1 8^0 32768 4096 512 64 8 1
Examples :
278 = 2×81+7×80 = 16+7 = 23
308 = 3×81+0×80 = 24
43078 = 4×83+3×82+0×81+7×80 = 2247
DECIMAL NUMERAL SYSTEM
Decimal Numeral System - Base-10
Decimal (Base 10) Is The Way Most Human Beings Represent Numbers. Decimal Is Sometimes Abbreviated As Dec.
Counting In Decimal. If We Ignore Zero In Our Counting, As We Usually Do (Outside Of The Computer World), We Count: 1, 2, 3, 4, 5, 6, 7, 8, 9. But Now We Have Run Out Of Single Digits In Our Decimal Alphabet! So We Put A One In The Tens Place, And Put A Zero In The Units (Ones) Place, And We Get 10. Then We Continue Counting: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19.
But We've Run Out Of Digits In The Units Place Again! So We Bump Up The Tens Place Digit From 1 To 2, And We Reset The Units Place To Zero Again. And We Continue Counting: 20, 21, 22, 23, 24, 25, And So On. When We Reach 99, We've Exhausted All Of The Digits In Both The Tens And Units Places. So We Put A One In The Hundreds Place, And Zeroes In The Tens And Units Places, And We Get 100.
Another Way Of Thinking About This Is To Imagine All Of The Possible Unoccupied "Places" In A Number To Be Zeroes. Then, Every Time We Run Out Of Digits In The Units Place, We Add One To The Place To The Left, And Change The Units Place To Zero. If The Ten's Place Runs Out Of Digits, Then We Add One To The Place To The Place To The Left, And So On. (Adding One To A Number Is Also Called Incrementing That Number, And Subtracting One From A Number Is Also Called Decrementing That Number.) Essentially, The Plan Is: If, When Counting, A Place "Runs Out Of" Digits, Set That Place's Digit To Zero And Increment The Digit At The Place To The Left. If That Place Has Run Out Of Digits, Then Repeat: Set That Place's Digit To Zero And Increment The Digit To The Place To The Left, And So On.
Now As You Know, The Decimal System Uses The Digits 0-9 To Represent Numbers. If We Wanted To Put A Larger Number In Column 10^n (E.G., 10), We Would Have To Multiply 10*10^n, Which Would Give 10^(n+1), And Be Carried A Column To The Left. For Example, Putting Ten In The 10^0 Column Is Impossible, So We Put A 1 In The 10^1 Column, And A 0 In The 10^0 Column, Thus Using Two Columns. Twelve Would Be 12*10^0, Or 10^0(10+2), Or 10^1+2*10^0, Which Also Uses An Additional Column To The Left (12).
HEXADECIMAL NUMERAL SYSTEM
Hexadecimal (Base 16) Is Currently The Most Popular Choice For Representing Digital Circuit Numbers In A Form That Is More Compact Than Binary. Hexadecimal Numbers Are Sometimes Represented By Preceding The Value With '0x', As In 0x1b84. Hexadecimal Is Sometimes Abbreviated As Hex.
Hexadecimal Counting Goes : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, And So On.
Example :
253810 = 2×103+5×102+3×101+8×100
Hexadecimal Numeral System - Base-16
Hex numbers uses digits from 0..9 and A..F.
H denotes hex prefix.
Examples:
2816 = 28H = 2×161+8×160 = 40
2F16 = 2FH = 2×161+15×160 = 47
BC1216 = BC12H = 11×163+12×162+1×161+2×160 = 48146
The Hexadecimal Number System Is Just Another Number Base System; Its Alphabet Of Digits Consists Of Sixteen Single Digits, So It Is The Base-Sixteen Number System. This Presents A Problem: The Decimal System That We Are Familiar With Has Only Ten Number Symbols, So How Should We Define Our Hexadecimal Alphabet? We Could Define Any Symbols We Want For The Digits Past 9. We Could Use Shapes, Such As A Square For The Tenth Digit, A Triangle For The Eleventh Digit, And So On, Or We Could Use Greek Letters, Or Any Other Such Scheme. But It Is Easiest Just To Use Letters From Our Normal English Alphabet To Stand For These Extra Digits. The Commonly Used Hexadecimal Alphabet Is As Follows: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, And F.
To Differentiate Between Hexadecimal Numbers And Numbers Of Other Bases, We Can Write "Hex" Or "HEX" After The Number. (Or, We Can Prefix An Extra Zero To The Number And Put A "H" Or "H" After The Number, Like This: "3F9B Hex" Becomes "03F9Bh". In The Next Chapter We Will See Language- Specific Syntaxes For Hex Numbers.)
Counting In Hexadecimal Uses The Same "Rules" As In Any Number Base, As We Have Seen Previously With Decimal, Octal, And Binary. We Count 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A (Equal To 10 Dec), B (11 Dec), C (12 Dec), D (13 Dec), E (14 Dec), And F (15 Dec). Then We Continue With 10 (16 Dec), 11 (17 Dec), And So On Up To 1F (31 Dec), And Then We Get 20 (32 Dec), 21 (33 Dec), Etc.
Note : An Octal Number (Base 8) Can Be Up To 1/3 The Length Of A Binary Number (Base 2). 8 Is A Whole Power Of 2 (23=8). That Means Three Binary Digits Convert Neatly Into One Octal Digit.
A Hexadecimal Number (Base 16) Can Be Up To 1/4 The Length Of A Binary Number. 16 Is A Whole Power Of 2 (24=16). That Means Four Binary Digits Convert Neatly Into One Hexadecimal Digit.
Unfortunately, Decimal (Base 10) Is Not A Whole Power Of 2. So, It Is Not Possible To Simply Chunk Groups Of Binary Digits To Convert The Raw State Of A Digital Circuit Into The Human-Centric Format.
The Base Is Also The Number Of Digits Or Characters Used To Represent Numbers In The System. Below Is A Chart Of The Digits Or Characters Each Number System Uses:
NUMERAL SYSTEMS CONVERSION TABLE
Decimal Base-10
Binary Base-2
Octal Base-8
Hexadecimal Base-16
0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F 16 10000 20 10 17 10001 21 11 18 10010 22 12 19 10011 23 13 20 10100 24 14 21 10101 25 15 22 10110 26 16 23 10111 27 17 24 11000 30 18 25 11001 31 19 26 11010 32 1A 27 11011 33 1B 28 11100 34 1C 29 11101 35 1D 30 11110 36 1E 31 11111 37 1F 32 100000 40 20
Each Can Be Written In The Base Representation. One Example Is:
From What We've Seen So Far, Hexadecimal Doesn't Look Very Interesting -- It Just Seems More Complicated Than Using Ordinary Decimal Numbers. But If We Take A Closer Look At Some Of The Two-Digit Hex Numbers In The Above Table, And We Look At The Binary Numbers Beside Them, We Might Notice Some Interesting Properties. Namely, Notice How The Binary Patterns For 0 Hex Through To F Hex Begin To Repeat In The Four Right-Most Digits In The Binary Patterns For 10 Hex Through To 1F Hex. In Fact, If We Keep Extending The Table, We Notice That These Patterns Continue Periodically; That Is, Every Sixteen Hexadecimal Numbers, This Pattern Repeats. Then Notice That Every Time The "0000" Occurs In The Right-Most Four Digits Of A Binary Number, The Right-Most Digit In The Hexadecimal Number Is A Zero. Every Time"0001" Occurs In That Position, The Hexadecimal Number Is A One. Every Time We See "0002", The Hexadecimal Number Is A Two. Continuing The Pattern Up To F Hex, We Notice That For A "1111" In This Position In The Binary Number, The Corresponding Hex Digit Is An "F".
This Is An Interesting Pattern. Does It Occur Elsewhere? Actually, Yes, If We Had The Patience To Extend The Table To FF Hex Or Beyond, And We Looked At The Four Digits To The Left Of The Right-Most Four Digits, We Would Notice This Pattern Repeating Itself Again! We Would See "0000" In The Table, And Associate That With A Zero In The Hexadecimal Number. And We Would See "0001" In The Table, And We Would See A Corresponding One In The Hexadecimal Number. (Mind You, There Would Be A Set Of Sixteen "0000"'S In A Row If We Scanned Down The Table, Then Sixteen "0001"'S, And So On.)
So We Have "Discovered" An Interesting Relationship Between Hexadecimal And Binary Numbers. A Set Of Four Binary Digits Is Equivalent To A Single Hexadecimal Digit. We Can See This With The First Sixteen Entries In The Above Table -- 0000 Bin Is Equivalent To 0 Hex, 0001 Bin Is Equivalent To 1 Hex, And So On. 1101 Bin Is The Same As D Hex.
This Relationship Gives Us A Clever Method Of Converting Binary Numbers To Hexadecimal. We Start At The Right Of A Given Binary Number And Work Left, And Consider Four-Digit Chunks Of The Binary Number. We Can Consult Our Table For Each Four-Digit Pattern We Encounter, And Write Down The Corresponding Hexadecimal Digit. (Make Sure The Hex Digits Are Written In The Same Right-To-Left Order As The Chunks Of Binary!)
This Conversion Is Best Explained With An Example. We Want To Convert The Ugly-Looking 100110100110101 Bin To Hexadecimal. First, Let's Break Up The Number Into Four-Digit Chunks, Starting From The Right. Any Left-Over Digits On The Left Can Be Considered As A Four-Digit Number (Add Zeroes To The Left If Necessary):
0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1
Now, We Can Consult The Table. We See That 0101 Bin Is Equivalent To 5 Hex, 0011 Bin Is The Same As 3 Hex, 1101 Bin Equals D Hex, And 0100 Equals 4 Hex.Writing These In The Correct Order, We Get 4D35 Hex. If You Want To Try Some More Examples, See If You Can Convert These Binary Numbers To Hex: A. 11001010 Bin, B. 0110110000 Bin, And C. 1100111101011001 Bin. Check Your Answers With Mine: A. CA Hex, B. 1B0 Hex, And C. CF59 Hex.
Converting From Hexadecimal To Binary Is Even Easier: Just Replace Every Hex Digit You See With Its Binary Equivalent. For Example, For 2E9A Hex, The 2 Expands To 0010 Bin, The E Expands To 1110 Bin, The 9 Expands To 1001 Bin, And The A Expands To 1010 Bin. Concatenating (Combining) These Together, We Get 0010111010011010 Bin. If You Want Some Practice, Try Converting These To Binary: A. 57 Hex, B. 1A7D Hex, And C. 3FC Hex. My Results Were: A. 01010111 Bin, B. 0001101001111101 Bin, And C. 001111111100 Bin.
Recall That The Basic Mathematical Operations, Addition, Subtraction, Multiplication, And Division, Work The Same Way With Hexadecimal Numbers As They Do With Decimal Numbers. However, When Doing Arithmetic With Hexadecimal, I Find It Very Useful To Construct Hexadecimal Addition And Multiplication Tables. For Lengthy Calculations, I Prefer To Avoid Headaches And Save Time By Converting Hex Numbers To Decimal And Then Changing The Results Back To Hex.
Now That We've Had A Brief Taste Of Hexadecimal, You Can See That It Is Often Faster To Refer To Hex Numbers Instead Of Their Binary Equivalents. The Quick Conversion Between Binary And Hex Is Probably Hexadecimal's Strongest Trait; I Wish There Were Methods Of Converting Binary To And From Decimal That Are As Quick As Those For Hexadecimal. But If You're Still Uncomfortable With Hex, Keep In Mind That You Use Can Still Use Decimal Numbers In Many Situtations.
CONVERSION OF NUMBERS FROM DIFFERENT NUMBER BASES
Binary Coded Decimal, BCD Is Also Known As Packet Decimal And Is Numbers 0 Through 9 Converted To Four-Digit Binary. Using This Conversion, The Number 25, For Example, Would Have A BCD Number Of 0010 0101 Or 00100101. However, In Binary, 25 Is Represented As 11001.
|
Also Reference (BINARY, DECIMAL, OCTAL AND HEXADECIMAL TABLE UP TO “0 to 255 NUMBERS”) :
The Binary Concept - Power Of Two:
Conversion Table - Binary, Decimal, Hexadecimal, Octal:
What Would The Binary Number 1011 Be In Decimal Notation?
1011=(1*2^3)+(0*2^2)+(1*2^1)+(1*2^0) = (1*8) + (0*4) + (1*2) + (1*1) = 11 (in decimal notation)
Try Converting These Numbers From Binary To Decimal:
10=(1*2^1) + (0*2^0) = 2+0 = 2 111 = (1*2^2) + (1*2^1) + (1*2^0) = 4+2+1=7 10101= (1*2^4) + (0*2^3) + (1*2^2) + (0*2^1) + (1*2^0)=16+0+4+0+1=21 11110= (1*2^4) + (1*2^3) + (1*2^2) + (1*2^1) + (0*2^0)=16+8+4+2+0=30
BINARY ARITHMETIC
Arithmetic In Binary Is Much Like Arithmetic In Other Numeral Systems. Addition, Subtraction, Multiplication, And Division Can Be Performed On Binary Numerals.
Arithmetic Operations Are Possible On Binary Numbers Just As They Are On Decimal Numbers. In Fact The Procedures Are Quite Similar In Both Systems. Multiplication And Division Are Not Really Difficult, But Unfamiliarity With The Binary Numbers Causes Enough Difficulty That We Will Introduce Only Addition, Subtraction, Multiplication, And Division Which Are Quite Easy.
BINARY ADDITION
Notes :
- Binary Number System
- System Digits: 0 and 1
- Bit (short for binary digit): A single binary digit
- LSB (least significant bit): The rightmost bit
- MSB (most significant bit): The leftmost bit
- Upper Byte (or nybble): The right-hand byte (or nybble) of a pair
- Lower Byte (or nybble): The left-hand byte (or nybble) of a pair
- Binary Equivalents
- 1 Nybble (or nibble) = 4 bits
- 1 Byte = 2 nybbles = 8 bits
- 1 Kilobyte (KB) = 1024 bytes
- 1 Megabyte (MB) = 1024 kilobytes = 1,048,576 bytes
- 1 Gigabyte (GB) = 1024 megabytes = 1,073,741,824 bytes
CONSIDER THE ADDITION OF DECIMAL NUMBERS :
23 +48 ___
We Begin By Adding 3+8=11. Since 11 Is Greater Than 10, A One Is Put Into The 10's Column (Carried), And A 1 Is Recorded In The One's Column Of The Sum. Next, Add {(2+4) +1} (The One Is From The Carry)=7, Which Is Put In The 10's Column Of The Sum. Thus, The Answer Is 71.
Binary Addition Works On The Same Principle, But The Numerals Are Different. Begin With One-Bit Binary Addition :
Rules Of Binary Addition:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0, And Carry 1 To The Next More Significant Bit
OR
Addition Is Almost As Easy As "One And One Is Two". Indeed,There Are Only "Zero And Zero Is Zero", "One And Zero Is One", And "One And One Is Two":
0 0 1 1 + 0 + 1 + 0 + 1 ---- ---- ---- ---- 0 1 1 10
1+1 Carries Us Into The Next Column. In Decimal Form, 1+1=2. In Binary, Any Digit Higher Than 1 Puts Us A Column To The Left (As Would 10 In Decimal Notation). The Decimal Number "2" Is Written In Binary Notation As "10" (1*2^1)+(0*2^0). Record The 0 In The Ones Column, And Carry The 1 To The Twos Column To Get An Answer Of "10." In Our Vertical Notation,
1 +1 ___ 10
The Process Is The Same For Multiple-Bit Binary Numbers:
1010 +1111 ______
- Step One:
Column 2^0: 0+1=1.
Record the 1.
Temporary Result: 1; Carry: 0 - Step Two:
Column 2^1: 1+1=10.
Record the 0, carry the 1.
Temporary Result: 01; Carry: 1 - Step Three:
Column 2^2: 1+0=1 Add 1 from carry: 1+1=10.
Record the 0, carry the 1.
Temporary Result: 001; Carry: 1 - Step Four:
Column 2^3: 1+1=10. Add 1 from carry: 10+1=11.
Record the 11.
Final result: 11001
Alternately :
11 (carry) 1010 +1111 ______ 11001
Always Remember
- 0+0=0
- 1+0=1
- 1+1=10
Notice That Adding Two Single-Digit "1's" Produces A Two-Digit Result, Which Means That We Have To "Carry" Into The Next Place, Just As With Our Familiar Decimal Addition. Let's Take A Simple Example, Two Plus Four Equals Six:
1 0 + 1 0 0 -------- 1 1 0
Above Example, Starting At The Right Column, Zero Plus Zero Equals Zero, One Plus Zero Equals One, And Zero Plus One Equals One. Too Easy; We Didn't Even Have To Carry. Let's Try Three Plus Five Equals Eight:
1 1 + 1 0 1 -------- 1 0 0 0
Above Example, Starting At The Right, One Plus One Equals Two: Bring Down The Zero, Carry The One; (Now In The 2's Column) One Plus Zero Equals One, Plus The One Carried Equals Two: Bring Down The Zero, Carry The One; (Now In The 4's Column, The Leading Or Implied) Zero Plus One Equals One, Plus The One Carried Equals Two: Bring Down The Zero, Carry The One (Into The 8's Column). Here Is A Final Example To Show How To Handle A "Three", Eleven Plus Seven Equals Eighteen:
1 0 1 1 + 1 1 1 ---------- 1 0 0 1 0
Above Example, Starting At The Right, One Plus One Equals Two: Bring Down The Zero, Carry The One; (2's Column) One Plus One Equals Two, Plus One Carried Equals Three ("11"): Bring Down The One, Carry The One; (4's Column) Zero Plus One Equals One, Plus One Carried Equals Two: Bring Down The Zero, Carry The One; (8's Column) One Plus Zero Equals One, Plus One Carried Equals Two: Bring Down The Zero, Carry The One (Into The 16's Column).
More Example In Addition :
00011010 + 00001100 = 00100110 | 1 1 | carries | ||
0 0 0 1 1 0 1 0 | = | 26(base 10) | ||
+ 0 0 0 0 1 1 0 0 |
= | 12(base 10) | ||
0 0 1 0 0 1 1 0 | = | 38(base 10) | ||
|
||||
00010011 + 00111110 = 01010001 | 1 1 1 1 1 | carries | ||
0 0 0 1 0 0 1 1 | = | 19(base 10) | ||
+ 0 0 1 1 1 1 1 0 |
= | 62(base 10) | ||
0 1 0 1 0 0 0 1 | = | 81(base 10) |
BINARY MULTIPLICATION
Multiplication In The Binary System Works The Same Way As In The Decimal System:
Rules Of Binary Multiplication:
- 0 x 0 = 0
- 0 x 1 = 0
- 1 x 0 = 0
- 1 x 1 = 1, And No Carry Or Borrow Bits
101 * 11 ____ 101 1010 _____ 1111
Note: That Multiplying By Two Is Extremely Easy. To Multiply By Two, Just Add A 0 On The End.
For Example :
00101001 × 00000110 = 11110110 | 0 0 1 0 1 0 0 1 | = | 41(base 10) | |
× 0 0 0 0 0 1 1 0 |
= | 6(base 10) | ||
0 0 0 0 0 0 0 0 | ||||
0 0 1 0 1 0 0 1 | ||||
0 0 1 0 1 0 0 1 |
||||
0 0 1 1 1 1 0 1 1 0 | = | 246(base 10) | ||
|
||||
00010111 × 00000011 = 01000101 | 0 0 0 1 0 1 1 1 | = | 23(base 10) | |
× 0 0 0 0 0 0 1 1 |
= | 3(base 10) | ||
1 1 1 1 1 | carries | |||
0 0 0 1 0 1 1 1 | ||||
0 0 0 1 0 1 1 1 |
||||
0 0 1 0 0 0 1 0 1 | = | 69(Base 10) |
BINARY DIVISION
Binary Division :
Binary Division Is The Repeated Process Of Subtraction, Just As In Decimal Division.
For example,
00101010 ÷ 00000110 = 00000111 | 1 | 1 | 1 | = | 7(base 10) | ||||||||
1 1 0 | ) | 0 | 0 | | 10 | 1 | 0 | 1 | 0 | = | 42(base 10) | ||
- | 1 | 1 | 0 | = | 6(base 10) | ||||||||
1 | borrows | ||||||||||||
| 10 | 1 | |||||||||||
- | 1 | 1 | 0 | ||||||||||
1 | 1 | 0 | |||||||||||
- | 1 | 1 | 0 | ||||||||||
0 | |||||||||||||
|
|||||||||||||
10000111 ÷ 00000101 = 00011011 | 1 | 1 | 0 | 1 | 1 | = | 27(base 10) | ||||||
1 0 1 | ) | | | | 10 | 0 | 1 | 1 | 1 | = | 135(base 10) | ||
- | 1 | 0 | 1 | = | 5(base 10) | ||||||||
1 | | 10 | |||||||||||
- | 1 | 0 | 1 | ||||||||||
1 | 1 | ||||||||||||
- | 0 | ||||||||||||
1 | 1 | 1 | |||||||||||
- | 1 | 0 | 1 | ||||||||||
1 | 0 | 1 | |||||||||||
- | 1 | 0 | 1 | ||||||||||
0 |
Follow The Same Rules As In Decimal Division. For The Sake Of Simplicity, Throw Away The Remainder.
For Example: 111011/11
10011 r 10 _______ 11)111011 -11 ______ 101 -11 ______ 101 11 ______ 10
BINARY SUBTRACTION
Rules Of Binary Subtraction:
- 0 - 0 = 0
- 0 - 1 = 1, And Borrow 1 From The Next More Significant Bit
- 1 - 0 = 1
- 1 - 1 = 0
For Example:
00100101 - 00010001 = 00010100 | 0 | borrows | ||
0 0 |
= | 37(base 10) | ||
- 0 0 0 1 0 0 0 1 |
= | 17(base 10) | ||
0 0 0 1 0 1 0 0 | = | 20(base 10) | ||
|
||||
00110011 - 00010110 = 00011101 | 0 10 1 | Borrows | ||
0 0 |
= | 51(Base 10) | ||
- 0 0 0 1 0 1 1 0 |
= | 22(base 10) | ||
0 0 0 1 1 1 0 1 | = | 29(base 10) |
Now Let’s See “How To Convert A Numbers From: Binary To Decimal, Octal, And Hexadecimal:”
For More About - > Numbers Conversion - Binary To Decimal, Octal, Hexadecimal And So :
For More About - > Notes For Number Systems (Binary, Decimal, Octal, Hexadecimal):
Conversion Table - Binary, Decimal, Hexadecimal, Octal:
The Binary Concept - Power Of Two:
For More About - > Binary Data Representation And Binary Arithmetic:
CONCLUSION:
The Goal Of This Article Is To Give An Easy Way To Understand The “Number Systems (Binary, Decimal, Octal, Hexadecimal)" 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:
Post a Comment