SlideShare a Scribd company logo
1 of 33
John Owen, Rockport Fulton HS 1
Computer Science
LESSON 1 on
Number Bases
John Owen, Rockport Fulton HS 2
Objective
 In this lesson you’ll learn about
different Number Bases,
specifically about those used by the
computer
 Those include:
 Base Two – binary
 Base Eight – octal
 Base Sixteen – hexadecimal
John Owen, Rockport Fulton HS 3
Base Ten
 First let’s talk about base ten, the
decimal number system which
humans use and you have been
working with for years.
 It’s called base ten because…?
John Owen, Rockport Fulton HS 4
Base Ten
 If you said, “because it has ten
counting digits, 0,1,2,3,4,5,6,7,8,
and 9”, you are right!
 To count in base ten, you go from 0
to 9, then do combinations of two
digits starting with 10 all the way to
99
John Owen, Rockport Fulton HS 5
Base Ten
 After 99 comes three-digit
combinations from 100 – 999, etc.
 This combination system is true for
any base you use.
 The only difference is how many
digits you have before you go to the
next combination
John Owen, Rockport Fulton HS 6
Base Two
 To count in base two, which only
has 0 and 1 as counting digits, you
count 0,1, then switch to two digit
combinations, 10,11, then to three
digit combos, 100, 101,110,111,
then four digit, 1000,
_____,_______, …, 1111
John Owen, Rockport Fulton HS 7
Base Three
 To count in base three, which has
0, 1, and 2 as counting digits, you
count 0,1,2, then switch to two digit
combinations, 10,11, 12, 20, 21,
22, then to three digit combos, 100,
101,102, 110,111, 112, etc…
John Owen, Rockport Fulton HS 8
Base Eight
 Jumping to base eight (often called
octal)… what are the counting
digits?
 Can you count correctly using
single digits, two-digit
combinations, and then three-digit
combos?
John Owen, Rockport Fulton HS 9
Base Eight
 Here is the base eight counting
sequence
 0,1,2,3,4,5,6,7,10,11,12,13,…77
 100,101,102,103,104,105,106,107
 110,111, etc.
John Owen, Rockport Fulton HS 10
Base Sixteen
 Now for one that’s a bit strange.
 Base Sixteen, also known as
hexadecimal, was especially
created by computer scientists to
help simplify low-level
programming, like machine
language and assembly language.
John Owen, Rockport Fulton HS 11
Base Sixteen
 To count in base sixteen, you need
16 counting digits.
 To get sixteen counting digits, you
use 0-9, but still need six more…so
it was decided to use A,B,C,D,E,
and F.
John Owen, Rockport Fulton HS 12
Base Sixteen
 The symbol A represents the value
10, B is 11, C is 12, D is 13, E is 14,
and F is 15.
 Here’s the single digit sequence for
base sixteen:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
John Owen, Rockport Fulton HS 13
Base Sixteen
 Then the two-digit combos:
10,11,12,…
19,1A,1B,1C,1D,1E,1F,20,21,22
,…2D,2E,2F,30,31,…FF
John Owen, Rockport Fulton HS 14
Base conversion
 To convert from base ten to another
base, such as base two, eight, or
sixteen, is an important skill for
computer scientists and
programmers.
 The next section shows how to do
this.
John Owen, Rockport Fulton HS 15
Base Ten to Base Two
 Let’s take the value 27 and convert it
into base 2.
 Here’s the process:
 Divide 27 by 2
 The answer is 13, remainder 1
 Divide 13 by 2
 Answer is 6, remainder 1
John Owen, Rockport Fulton HS 16
Base Ten to Base Two
 Continue until the answer is 1.
 6 divided by 2 = 3, remainder 0
 3 divided by 2 = 1, remainder 1
 Now take the last answer, 1, and all
of the remainders in reverse order,
and put them together…11011
 27 base 10 = 11011 base two
John Owen, Rockport Fulton HS 17
Base Ten to Base Two
 Here’s an easy way to do it on
paper
 27 divided by 2 = 13, R 1
John Owen, Rockport Fulton HS 18
Base Ten to Base Two
 13 / 2 = 6, R 1
John Owen, Rockport Fulton HS 19
Base Ten to Base Two
 6 / 2 = 3, R 0
John Owen, Rockport Fulton HS 20
Base Ten to Base Two
 3 / 2
= 1, R 1
John Owen, Rockport Fulton HS 21
Base Ten to Base Two
 Stop, and write the answer
John Owen, Rockport Fulton HS 22
Base Ten to Base Two
John Owen, Rockport Fulton HS 23
Exercises
 Now try a few yourself (see last
slide for answers):
1. 1610 = _________2
2. 4710 = _________2
3. 14510 = _________2
4. 3110 = _________2
5. 3210 = _________2
John Owen, Rockport Fulton HS 24
Base Ten to Base Eight
 Let’s again take the value 27 and
convert it into base 8.
 Same process:
 Divide 27 by 8
 The answer is 3, remainder 3
 Stop! You can’t divide anymore
because the answer is less than 8
John Owen, Rockport Fulton HS 25
Base Ten to Base Eight
 The last answer was 3, and the only
remainder was 3, so the base eight
value is 33, base 8.
John Owen, Rockport Fulton HS 26
Base Ten to Base Eight
 Use the same method on paper
 27 divided by 8 = 3, R 3
 27, base 10 = 33, base 8
John Owen, Rockport Fulton HS 27
Exercises
 Now try the same values for base
eight.
6. 1610 = _________8
7. 4710 = _________8
8. 14510 = _________8
9. 3110 = _________8
10. 3210 = _________8
John Owen, Rockport Fulton HS 28
Base Ten to Base Sixteen
 Finally we’ll convert 27 into base 16.
 Divide 27 by 16
 The answer is 1, remainder 11
 Stop! You can’t divide anymore
because the answer is less than 16
John Owen, Rockport Fulton HS 29
Base Ten to Base Sixteen
 The last answer was 1, and the only
remainder was 11, which in base 16
is the letter B, so the base sixteen
value is 1B, base 16.
John Owen, Rockport Fulton HS 30
Base Ten to Base Sixteen
 Again, the same method on paper
 27 divided by 16 = 1, R 11 or B
 27, base 10 = 1B, base 16
John Owen, Rockport Fulton HS 31
Exercises
 And now try base sixteen!
11. 1610 = _________16
12. 4710 = _________16
13. 14510 = _________16
14. 3110 = _________16
15. 3210 = _________16
John Owen, Rockport Fulton HS 32
Conclusion
 Now you should know
 how to count in different bases
 how to convert from

Base ten to base 2

Base ten to base 8

Base ten to base 16
John Owen, Rockport Fulton HS 33
Here are the answers to the
exercises, in jumbled order
10 1F 20 20 2F 37 40
57 91 221 10000 11111
101111 100000 10010001

More Related Content

What's hot (20)

Number system
Number systemNumber system
Number system
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Estimating Square Roots (Number Line Method)
Estimating Square Roots (Number Line Method)Estimating Square Roots (Number Line Method)
Estimating Square Roots (Number Line Method)
 
number system ppt
number system ppt number system ppt
number system ppt
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
The rules of indices
The rules of indicesThe rules of indices
The rules of indices
 
Conversion binary to decimal
Conversion binary to decimalConversion binary to decimal
Conversion binary to decimal
 
09 binary number systems
09   binary number systems09   binary number systems
09 binary number systems
 
Types of numbers
Types of numbersTypes of numbers
Types of numbers
 
Decimal number system
Decimal number systemDecimal number system
Decimal number system
 
Presentation on introducing whole number
Presentation on introducing whole numberPresentation on introducing whole number
Presentation on introducing whole number
 
1 1 review on factoring
1 1 review on factoring1 1 review on factoring
1 1 review on factoring
 
Basic of number system
Basic of number systemBasic of number system
Basic of number system
 
Presentation on the real number system
Presentation on the real number systemPresentation on the real number system
Presentation on the real number system
 
Number System Conversion | BCA
Number System Conversion | BCANumber System Conversion | BCA
Number System Conversion | BCA
 
Number bases
Number basesNumber bases
Number bases
 
Chapter 1 Numbers IGCSE- part 1
Chapter 1 Numbers IGCSE- part 1Chapter 1 Numbers IGCSE- part 1
Chapter 1 Numbers IGCSE- part 1
 
number system
number systemnumber system
number system
 
Decimal
DecimalDecimal
Decimal
 

More from primeteacher32

More from primeteacher32 (20)

Software Development Life Cycle
Software Development Life CycleSoftware Development Life Cycle
Software Development Life Cycle
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
 
Returning Data
Returning DataReturning Data
Returning Data
 
Intro to Functions
Intro to FunctionsIntro to Functions
Intro to Functions
 
Introduction to GUIs with guizero
Introduction to GUIs with guizeroIntroduction to GUIs with guizero
Introduction to GUIs with guizero
 
Function Parameters
Function ParametersFunction Parameters
Function Parameters
 
Nested Loops
Nested LoopsNested Loops
Nested Loops
 
Conditional Loops
Conditional LoopsConditional Loops
Conditional Loops
 
Introduction to Repetition Structures
Introduction to Repetition StructuresIntroduction to Repetition Structures
Introduction to Repetition Structures
 
Input Validation
Input ValidationInput Validation
Input Validation
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
 
Nesting Conditionals
Nesting ConditionalsNesting Conditionals
Nesting Conditionals
 
Conditionals
ConditionalsConditionals
Conditionals
 
Intro to Python with GPIO
Intro to Python with GPIOIntro to Python with GPIO
Intro to Python with GPIO
 
Variables and Statements
Variables and StatementsVariables and Statements
Variables and Statements
 
Variables and User Input
Variables and User InputVariables and User Input
Variables and User Input
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Hardware vs. Software Presentations
Hardware vs. Software PresentationsHardware vs. Software Presentations
Hardware vs. Software Presentations
 
Block chain security
Block chain securityBlock chain security
Block chain security
 

Recently uploaded

Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen DatingDubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Datingkojalkojal131
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...shivangimorya083
 
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...Suhani Kapoor
 
Delhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
Call Girl in Low Price Delhi Punjabi Bagh  9711199012Call Girl in Low Price Delhi Punjabi Bagh  9711199012
Call Girl in Low Price Delhi Punjabi Bagh 9711199012sapnasaifi408
 
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual serviceanilsa9823
 
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...shivangimorya083
 
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...Niya Khan
 
The Impact of Socioeconomic Status on Education.pdf
The Impact of Socioeconomic Status on Education.pdfThe Impact of Socioeconomic Status on Education.pdf
The Impact of Socioeconomic Status on Education.pdftheknowledgereview1
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
Preventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptxPreventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptxGry Tina Tinde
 
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...Suhani Kapoor
 
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service BhiwandiVIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service BhiwandiSuhani Kapoor
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...shivangimorya083
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...Suhani Kapoor
 
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
VIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service Bhilai
VIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service BhilaiVIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service Bhilai
VIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackVIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackSuhani Kapoor
 
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsSonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsNiya Khan
 
Production Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbjProduction Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbjLewisJB
 

Recently uploaded (20)

Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen DatingDubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
 
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
 
Delhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Patparganj 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
Call Girl in Low Price Delhi Punjabi Bagh  9711199012Call Girl in Low Price Delhi Punjabi Bagh  9711199012
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
 
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Gosainganj Lucknow best sexual service
 
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
 
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
 
The Impact of Socioeconomic Status on Education.pdf
The Impact of Socioeconomic Status on Education.pdfThe Impact of Socioeconomic Status on Education.pdf
The Impact of Socioeconomic Status on Education.pdf
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
 
Preventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptxPreventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptx
 
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
VIP Russian Call Girls in Bhilai Deepika 8250192130 Independent Escort Servic...
 
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service BhiwandiVIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
 
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Jamshedpur Aishwarya 8250192130 Independent Escort Ser...
 
VIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service Bhilai
VIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service BhilaiVIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service Bhilai
VIP Call Girl Bhilai Aashi 8250192130 Independent Escort Service Bhilai
 
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackVIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
 
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsSonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
 
Production Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbjProduction Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbj
 

Number Base Part1

  • 1. John Owen, Rockport Fulton HS 1 Computer Science LESSON 1 on Number Bases
  • 2. John Owen, Rockport Fulton HS 2 Objective  In this lesson you’ll learn about different Number Bases, specifically about those used by the computer  Those include:  Base Two – binary  Base Eight – octal  Base Sixteen – hexadecimal
  • 3. John Owen, Rockport Fulton HS 3 Base Ten  First let’s talk about base ten, the decimal number system which humans use and you have been working with for years.  It’s called base ten because…?
  • 4. John Owen, Rockport Fulton HS 4 Base Ten  If you said, “because it has ten counting digits, 0,1,2,3,4,5,6,7,8, and 9”, you are right!  To count in base ten, you go from 0 to 9, then do combinations of two digits starting with 10 all the way to 99
  • 5. John Owen, Rockport Fulton HS 5 Base Ten  After 99 comes three-digit combinations from 100 – 999, etc.  This combination system is true for any base you use.  The only difference is how many digits you have before you go to the next combination
  • 6. John Owen, Rockport Fulton HS 6 Base Two  To count in base two, which only has 0 and 1 as counting digits, you count 0,1, then switch to two digit combinations, 10,11, then to three digit combos, 100, 101,110,111, then four digit, 1000, _____,_______, …, 1111
  • 7. John Owen, Rockport Fulton HS 7 Base Three  To count in base three, which has 0, 1, and 2 as counting digits, you count 0,1,2, then switch to two digit combinations, 10,11, 12, 20, 21, 22, then to three digit combos, 100, 101,102, 110,111, 112, etc…
  • 8. John Owen, Rockport Fulton HS 8 Base Eight  Jumping to base eight (often called octal)… what are the counting digits?  Can you count correctly using single digits, two-digit combinations, and then three-digit combos?
  • 9. John Owen, Rockport Fulton HS 9 Base Eight  Here is the base eight counting sequence  0,1,2,3,4,5,6,7,10,11,12,13,…77  100,101,102,103,104,105,106,107  110,111, etc.
  • 10. John Owen, Rockport Fulton HS 10 Base Sixteen  Now for one that’s a bit strange.  Base Sixteen, also known as hexadecimal, was especially created by computer scientists to help simplify low-level programming, like machine language and assembly language.
  • 11. John Owen, Rockport Fulton HS 11 Base Sixteen  To count in base sixteen, you need 16 counting digits.  To get sixteen counting digits, you use 0-9, but still need six more…so it was decided to use A,B,C,D,E, and F.
  • 12. John Owen, Rockport Fulton HS 12 Base Sixteen  The symbol A represents the value 10, B is 11, C is 12, D is 13, E is 14, and F is 15.  Here’s the single digit sequence for base sixteen: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
  • 13. John Owen, Rockport Fulton HS 13 Base Sixteen  Then the two-digit combos: 10,11,12,… 19,1A,1B,1C,1D,1E,1F,20,21,22 ,…2D,2E,2F,30,31,…FF
  • 14. John Owen, Rockport Fulton HS 14 Base conversion  To convert from base ten to another base, such as base two, eight, or sixteen, is an important skill for computer scientists and programmers.  The next section shows how to do this.
  • 15. John Owen, Rockport Fulton HS 15 Base Ten to Base Two  Let’s take the value 27 and convert it into base 2.  Here’s the process:  Divide 27 by 2  The answer is 13, remainder 1  Divide 13 by 2  Answer is 6, remainder 1
  • 16. John Owen, Rockport Fulton HS 16 Base Ten to Base Two  Continue until the answer is 1.  6 divided by 2 = 3, remainder 0  3 divided by 2 = 1, remainder 1  Now take the last answer, 1, and all of the remainders in reverse order, and put them together…11011  27 base 10 = 11011 base two
  • 17. John Owen, Rockport Fulton HS 17 Base Ten to Base Two  Here’s an easy way to do it on paper  27 divided by 2 = 13, R 1
  • 18. John Owen, Rockport Fulton HS 18 Base Ten to Base Two  13 / 2 = 6, R 1
  • 19. John Owen, Rockport Fulton HS 19 Base Ten to Base Two  6 / 2 = 3, R 0
  • 20. John Owen, Rockport Fulton HS 20 Base Ten to Base Two  3 / 2 = 1, R 1
  • 21. John Owen, Rockport Fulton HS 21 Base Ten to Base Two  Stop, and write the answer
  • 22. John Owen, Rockport Fulton HS 22 Base Ten to Base Two
  • 23. John Owen, Rockport Fulton HS 23 Exercises  Now try a few yourself (see last slide for answers): 1. 1610 = _________2 2. 4710 = _________2 3. 14510 = _________2 4. 3110 = _________2 5. 3210 = _________2
  • 24. John Owen, Rockport Fulton HS 24 Base Ten to Base Eight  Let’s again take the value 27 and convert it into base 8.  Same process:  Divide 27 by 8  The answer is 3, remainder 3  Stop! You can’t divide anymore because the answer is less than 8
  • 25. John Owen, Rockport Fulton HS 25 Base Ten to Base Eight  The last answer was 3, and the only remainder was 3, so the base eight value is 33, base 8.
  • 26. John Owen, Rockport Fulton HS 26 Base Ten to Base Eight  Use the same method on paper  27 divided by 8 = 3, R 3  27, base 10 = 33, base 8
  • 27. John Owen, Rockport Fulton HS 27 Exercises  Now try the same values for base eight. 6. 1610 = _________8 7. 4710 = _________8 8. 14510 = _________8 9. 3110 = _________8 10. 3210 = _________8
  • 28. John Owen, Rockport Fulton HS 28 Base Ten to Base Sixteen  Finally we’ll convert 27 into base 16.  Divide 27 by 16  The answer is 1, remainder 11  Stop! You can’t divide anymore because the answer is less than 16
  • 29. John Owen, Rockport Fulton HS 29 Base Ten to Base Sixteen  The last answer was 1, and the only remainder was 11, which in base 16 is the letter B, so the base sixteen value is 1B, base 16.
  • 30. John Owen, Rockport Fulton HS 30 Base Ten to Base Sixteen  Again, the same method on paper  27 divided by 16 = 1, R 11 or B  27, base 10 = 1B, base 16
  • 31. John Owen, Rockport Fulton HS 31 Exercises  And now try base sixteen! 11. 1610 = _________16 12. 4710 = _________16 13. 14510 = _________16 14. 3110 = _________16 15. 3210 = _________16
  • 32. John Owen, Rockport Fulton HS 32 Conclusion  Now you should know  how to count in different bases  how to convert from  Base ten to base 2  Base ten to base 8  Base ten to base 16
  • 33. John Owen, Rockport Fulton HS 33 Here are the answers to the exercises, in jumbled order 10 1F 20 20 2F 37 40 57 91 221 10000 11111 101111 100000 10010001