John Owen, Rockport Fulton HS1 Computer Science LESSON 2 ON Number Bases.

Slides:



Advertisements
Similar presentations
NUMBER SYSTEM. How to convert hexadecimal numbers to decimal numbers? 230 Working from right to left, MULTIPLY each position with 8 raised to the power.
Advertisements

John Owen, Rockport Fulton HS
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Agenda Shortcuts converting among numbering systems –Binary to Hex / Hex to Binary –Binary to Octal / Octal to Binary Signed and unsigned binary numbers.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
2.1 2 Number Systems Foundations of Computer Science  Cengage Learning.
Prepared By Rama Gaikwad 1. Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20,
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. 1 Number Systems 0, 1 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 0, 1, 2, 3,
LESSON ON Number Base Subtraction and Simple Equations
Number Systems.
Numbering Systems CS208.
Numbering Systems. CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system.
DECIMAL BASE Based on power of 10 In the number 2,468 – from right to left -- the 8 represents the ones, the 6 represents the tens, the 4 represents the.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Number Systems Ron Christensen CIS 121.
Number systems, Operations, and Codes
Numbering System Base Conversion. Number systems Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary – 0, 1 Octal – 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal system.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Number Systems 0, 1 0, 1, 2,
CPIT 201 Introduction to Computing
AP Computer Science A – Healdsburg High School 1 Unit 1 - Binary Numbers - Hexadecimal Numbers.
Binary, Hexadecimal, Decimal, and How They Relate.
Programming Logic Controllers Number Systems and Codes - Chapter 3.
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,
Discrete Mathematics Numbering System.
MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
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.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
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.
Chapter 01 Numbers. Chapter 02 Base 10 example Decimal Number Place Place (place - 1) ===============================
Chapter 32 Binary Number System. Objectives After completing this chapter, you will be able to: –Describe the binary number system –Identify the place.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH 2 Number Systems CPIT 201 Introduction.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Coding Part 2. Weight of the Digit 3672 Thousands (10 3 )Hundreds (10 2 )Tens (10 1 )Units (1) = Weights Decimal Example (3672) 10 Binary.
Decimal Numbers.
Discrete Mathematics Numbering System.
NUMBER SYSTEM Prepared by: Engr Zakria.
Hexadecimal Conversion
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Computer Science LESSON 1 on Number Bases.
ITE102 – Computer Programming (C++)
Location in course textbook
Number Systems Lab session 1 Xuan Guo.
Tools of Web Development 1: Module A: Numbering Systems
Number System conversions
Data Storage Introduction to computer, 2nd semester, 2010/2011
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Numbering System TODAY AND TOMORROW 11th Edition
Binary Lesson 3 Hexadecimal
There are 10 types of people of people in this world…
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
AP Computer Science LESSON 1 on Number Bases.
John Owen, Rockport Fulton HS
Binary Lesson 4 Hexadecimal and Binary Practice
GCSE COMPUTER SCIENCE Topic 3 - Data 3.4 Hexadecimal Conversion.
Remember the 10 types of people of people in this world…
Exercises in Number Base Conversion
Computer Science 1 Review and finish Number base conversion
1. Number Systems Chapt. 2.
Presentation transcript:

John Owen, Rockport Fulton HS1 Computer Science LESSON 2 ON Number Bases

John Owen, Rockport Fulton HS2 Objective In the last lesson you learned about different Number Bases used by the computer, which were Base Two – binary Base Eight – octal Base Sixteen – hexadecimal

John Owen, Rockport Fulton HS3 Base Conversion You also learned how to convert from the decimal (base ten) system to each of the new bases…binary, octal, and hexadecimal.

John Owen, Rockport Fulton HS4 Other conversions Now you will learn other conversions among these four number systems, specifically: Binary to Decimal Octal to Decimal Hexadecimal to Decimal

John Owen, Rockport Fulton HS5 Other conversions As well as Binary to Octal Octal to Binary Binary to Hexadecimal Hexadecimal to Binary

John Owen, Rockport Fulton HS6 Other conversions And finally Octal to Hexadecimal Hexadecimal to Octal

John Owen, Rockport Fulton HS7 Binary to Decimal Each binary digit in a binary number has a place value. In the number 111, base 2, the digit farthest to the right is in the “ones” place, like the base ten system, and is worth 1. Technically this is the 2 0 place.

John Owen, Rockport Fulton HS8 Binary to Decimal The 2 nd digit from the right, 111, is in the “twos” place, which could be called the “base” place, and is worth 2. Technically this is the 2 1 place. In base ten, this would be the “tens” place and would be worth 10.

John Owen, Rockport Fulton HS9 Binary to Decimal The 3 rd digit from the right, 111, is in the “fours” place, or the “base squared” place, and is worth 4. Technically this is the 2 2 place. In base ten, this would be the “hundreds” place and would be worth 100.

John Owen, Rockport Fulton HS10 Binary to Decimal The total value of this binary number, 111, is 4+2+1, or seven. In base ten, 111 would be worth , or one-hundred eleven.

John Owen, Rockport Fulton HS11 Binary to Decimal Can you figure the decimal values for these binary values?

John Owen, Rockport Fulton HS12 Binary to Decimal Here are the answers: 11 is 3 in base ten 101 is is is is 27

John Owen, Rockport Fulton HS13 Octal to Decimal Octal digits have place values based on the value 8. In the number 111, base 8, the digit farthest to the right is in the “ones” place and is worth 1. Technically this is the 8 0 place.

John Owen, Rockport Fulton HS14 Octal to Decimal The 2 nd digit from the right, 111, is in the “eights” place, the “base” place, and is worth 8. Technically this is the 8 1 place.

John Owen, Rockport Fulton HS15 Octal to Decimal The 3 rd digit from the right, 111, is in the “sixty-fours” place, the “base squared” place, and is worth 64. Technically this is the 8 2 place.

John Owen, Rockport Fulton HS16 Octal to Decimal The total value of this octal number, 111, is , or seventy-three.

John Owen, Rockport Fulton HS17 Octal to Decimal Can you figure the value for these octal values?

John Owen, Rockport Fulton HS18 Octal to Decimal Here are the answers: 21 is 17 in base is is is is 1093

John Owen, Rockport Fulton HS19 Hexadecimal to Decimal Hexadecimal digits have place values base on the value 16. In the number 111, base 16, the digit farthest to the right is in the “ones” place and is worth 1. Technically this is the 16 0 place.

John Owen, Rockport Fulton HS20 Hexadecimal to Decimal The 2 nd digit from the right, 111, is in the “sixteens” place, the “base” place, and is worth 16. Technically this is the 16 1 place.

John Owen, Rockport Fulton HS21 Hexadecimal to Decimal The 3 rd digit from the right, 111, is in the “two hundred fifty-six” place, the “base squared” place, and is worth 256. Technically this is the 16 2 place.

John Owen, Rockport Fulton HS22 Hexadecimal to Decimal The total value of this hexadecimal number, 111, is , or two hundred seventy-three.

John Owen, Rockport Fulton HS23 Hexadecimal to Decimal Can you figure the value for these hexadecimal values? 2A 15F A7C 11BE A10D

John Owen, Rockport Fulton HS24 Hexadecimal to Decimal Here are the answers: 2A is 42 in base 10 15F is 351 A7C is BE is 4542 A10D is 41229

John Owen, Rockport Fulton HS25 Binary to Octal The conversion between binary and octal is quite simple. Since 2 to the power of 3 equals 8, it takes 3 base 2 digits to combine to make a base 8 digit.

John Owen, Rockport Fulton HS26 Binary to Octal 000 base 2 equals 0 base = = = = = = = 7 8

John Owen, Rockport Fulton HS27 Binary to Octal What if you have more than three binary digits, like ? Just separate the digits into groups of three from the right, then convert each group into the corresponding base 8 digit base 2 = 63 base 8

John Owen, Rockport Fulton HS28 Binary to Octal Try these: Hint: when the leftmost group has fewer than three digits, fill with zeroes from the left: = =

John Owen, Rockport Fulton HS29 Binary to Octal The answers are: = = = = = 635 8

John Owen, Rockport Fulton HS30 Binary to Hexadecimal The conversion between binary and hexadecimal is equally simple. Since 2 to the power of 4 equals 16, it takes 4 base 2 digits to combine to make a base 16 digit.

John Owen, Rockport Fulton HS31 Binary to Hexadecimal 0000 base 2 equals 0 base = = = = = = = 7 16

John Owen, Rockport Fulton HS32 Binary to Hexadecimal = = = A = B = C = D = E = F 16

John Owen, Rockport Fulton HS33 Binary to Hexadecimal If you have more than four binary digits, like , again separate the digits into groups of four from the right, then convert each group into the corresponding base 16 digit base 2 = D7 base 16

John Owen, Rockport Fulton HS34 Binary to Hexadecimal Try these: Hint: when the leftmost group has fewer than four digits, fill with zeroes on the left: = =

John Owen, Rockport Fulton HS35 Binary to Hexadecimal The answers are: = DC = B = = 1B = 1A5D 16

John Owen, Rockport Fulton HS36 Octal to Binary Converting from Octal to Binary is just the inverse of Binary to Octal. For each octal digit, translate it into the equivalent three-digit binary group. For example, 45 base 8 equals base 2

John Owen, Rockport Fulton HS37 Hexadecimal to Binary Converting from Hexadecimal to Binary is the inverse of Binary to Hexadecimal. For each “hex” digit, translate it into the equivalent four-digit binary group. For example, 45 base 16 equals base 2

John Owen, Rockport Fulton HS38 Octal and Hexadecimal to Binary Exercises Convert each of these to binary: A2D FF 16

John Owen, Rockport Fulton HS39 Octal and Hexadecimal to Binary Exercises The answers are: 63 8 = = (drop leading 0s) 75 8 = A2D 16 = = FF 16 =

John Owen, Rockport Fulton HS40 Hexadecimal to Octal Converting from Hexadecimal to Octal is a two-part process. First convert from “hex” to binary, then regroup the bits from groups of four into groups of three. Then convert to an octal number.

John Owen, Rockport Fulton HS41 Hexadecimal to Octal For example: 4A3 16 = =

John Owen, Rockport Fulton HS42 Octal to Hexadecimal Converting from Octal to Hexadecimal is a similar two-part process. First convert from octal to binary, then regroup the bits from groups of three into groups of four. Then convert to an hex number.

John Owen, Rockport Fulton HS43 Hexadecimal to Octal For example: = = = F9 8

John Owen, Rockport Fulton HS44 Octal/Hexadecimal Practice Convert each of these: 63 8 = ________ = ________ = ________ 16 A2D 16 = ________ = ________ 16 3FF 16 = ________ 8

John Owen, Rockport Fulton HS45 Octal/Hexadecimal Practice The answers are 63 8 = = = 3D 16 A2D 16 = = FF 16 =

John Owen, Rockport Fulton HS46 Number Base Conversion Summary Now you know twelve different number base conversions among the four different bases (2,8,10, and 16) With practice you will be able to do these quickly and accurately, to the point of doing many of them in your head!

John Owen, Rockport Fulton HS47 Practice Now it is time to practice. Go to the Number Base Exercises slide show to find some excellent practice problems. Good luck and have fun!