John Owen, Rockport Fulton HS

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

Chapter 4.2 Binary numbers: Arithmetic
John Owen, Rockport Fulton HS1 Computer Science LESSON 2 ON Number Bases.
Binary (Base 2, b) Octal (Oct, Base 8) Hexadecimal (Hex, Base 16, h, 0x) Decimal (Base 10, d) OR Counting for Aliens.
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
Page 1 Data Structures in C for Non-Computer Science Majors Kirs and Pflughoeft Basic Data Types Note that the methods we used to convert from decimal.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
LESSON ON Number Base Subtraction and Simple Equations
Real Numbers and the Decimal Number System
Number Systems.
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.
Numbering Systems CS208.
Numeration Systems Introduction to Binary, Octal, and Hexadecimal.
IT-101 Section 001 Lecture #3 Introduction to Information Technology.
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Number Systems Ron Christensen CIS 121.
Number systems, Operations, and Codes
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
Positional Notation 642 in base 10 positional notation is:
How a Computer Processes Information. Java – Numbering Systems OBJECTIVE - Introduction to Numbering Systems and their relation to Computer Problems Review.
1 Computer Science LESSON 1 on Number Bases. 2 Objective In this lesson you’ll learn about different Number Bases, specifically about those used by the.
Computer Science Introduction to the Number Base Unit developed by John Owen Computer Science Instructor, Rockport-Fulton High School, Rockport, Texas.
Computer Science Introduction to the Number Base Unit Adapted from Slides by John Owen Computer Science Instructor, Rockport-Fulton High School, Rockport,
Computer Number System
1 Discrete Math LESSON ON Number Base Addition. 2 Objective In this lesson you’ll learn how to do simple addition in Base 2, 8, and 16. It is essentially.
Computer Science LESSON 2 ON Number Bases.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Numbering Systems and Conversion Understand How Computing Devices Work 1.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
Conversions 1)Binary to Denary Method 1 Work out the position values of the binary bits and add those values together So above would be
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
WHAT IS BINARY? Binary is a number system that only uses two digits: 1 and 0. Any information that processed by a computer it is put into sequence of.
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Decimal Numbers.
Different Numeral Systems
Discrete Mathematics Numbering System.
Hexadecimal Conversion
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Computer Science LESSON 1 on Number Bases.
ITE102 – Computer Programming (C++)
Base ‘b’ number for i = 0 to n – 1 for an n digit quantity
Location in course textbook
Tools of Web Development 1: Module A: Numbering Systems
Number System conversions
Chapter 1 Number Systems & Conversions
Number Systems and Binary Arithmetic
Introduction to IT By: Muhammed s. anwar.
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Hexadecimal Conversions
Binary Lesson 3 Hexadecimal
Binary Numbers? Foley SED 514 Section /2/2019.
Digital Electronics and Microprocessors
Binary Lesson 3 Hexadecimal
Chapter 2: Number Systems
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
AP Computer Science LESSON 1 on Number Bases.
John Owen, Rockport Fulton HS
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Binary Lesson 4 Hexadecimal and Binary Practice
GCSE COMPUTER SCIENCE Topic 3 - Data 3.4 Hexadecimal Conversion.
Chapter 2 Number Systems.
Exercises in Number Base Conversion
Chapter 2 Number Systems.
1. Number Systems Chapt. 2.
Presentation transcript:

John Owen, Rockport Fulton HS Computer Science LESSON 1 on Number Bases John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS Base Ten to Base Two 13 / 2 = 6, R 1 John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS Base Ten to Base Two 6 / 2 = 3, R 0 John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS Base Ten to Base Two 3 / 2 = 1, R 1 John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS Base Ten to Base Two Stop, and write the answer John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS Base Ten to Base Two John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS Exercises Now try a few yourself (see last slide for answers): 1610 = _________2 4710 = _________2 14510 = _________2 3110 = _________2 3210 = _________2 John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS 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

John Owen, Rockport Fulton HS Exercises Now try the same values for base eight. 1610 = _________8 4710 = _________8 14510 = _________8 3110 = _________8 3210 = _________8 John Owen, Rockport Fulton HS

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

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

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

John Owen, Rockport Fulton HS Exercises And now try base sixteen! 1610 = _________16 4710 = _________16 14510 = _________16 3110 = _________16 3210 = _________16 John Owen, Rockport Fulton HS

John Owen, Rockport Fulton HS 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

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 John Owen, Rockport Fulton HS