COMPUTER PROGRAMMING I Objective 1.02 Understand Numbering Systems.

Slides:



Advertisements
Similar presentations
Hexadecimal In today’s lesson we will look at: the need for something other than binary how hexadecimal works how to convert between hexadecimal and binary.
Advertisements

IT Systems What Number? EN230-1 Justin Champion C208 –
Binary & Decimal numbers = 3* * *10 + 5*1 = 3* * * *10 0 Decimal system: Ten digits: 0,1,2,3,…,9 Example:
1 Binary Arithmetic, Subtraction The rules for binary arithmetic are: = 0, carry = = 1, carry = = 1, carry = = 0, carry =
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Converting Binary to Octal
Number Systems and Arithmetic
© Copyright 2000 Indiana University Board of Trustees Proficiency Quiz Study Guide Note: The following slides are provided courtesy of Dr. Bob Orr (Computer.
Hexadecimal Dk Izzati Pg Haji Ahmad.
Revision Introductory Lesson
Significant Figures.
Newport Math Club Copyright © 2009 by Newport Math Club.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Number Systems Binary and Hexadecimal. Base 2 a.k.a. Binary  Binary works off of base of 2 instead of a base 10 like what we are taught in school 
Numeration Systems Introduction to Binary, Octal, and Hexadecimal.
Significant Figures And Mathematical Calculations.
Multiplying Whole Numbers and Decimals Lesson 2-2.
Salisbury Numbers we use in Auto Shop Why do I need to know this. When working on the computers in the auto shop sometimes we need to look into the.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Significant Figures. The Basics  All nonzero digits are significant  Ex: 1.2 – 2 significant digits  Ex: has 5 significant digits  Zeroes between.
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 Representation. Representing numbers n Numbers are represented as successive powers of a base, or radix.
Positional Notation 642 in base 10 positional notation is:
Chapter 2 Number Systems: Decimal, Binary, and Hex.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
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.
Announcement!!! First exam next Thursday (I’m trying to give you a first exam before the drop date) I’ll post a sample exam over the weekend and will try.
Computer Science Introduction to the Number Base Unit Adapted from Slides by John Owen Computer Science Instructor, Rockport-Fulton High School, Rockport,
Phys 4330 Digital ElectronicsBinary System Digital circuits process signals that contain just two voltage levels or states, labeled logic "0" and logic.
Math 5 Comparing and Ordering Decimals part 2
Scientific Notation How to cope with really big and really small numbers…
1 4. Computer Maths and Logic 4.1 Number Systems.
NUMBER SYSTEMS.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
Numbering Systems and Conversion Understand How Computing Devices Work 1.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
Data Types and Information Representation
Two’s Complement The language of machines, part II.
STARTER – CRACK THE CODE
Binary, Decimal and Hexadecimal Numbers 1. Numbering Systems Radix - In mathematical numeral systems, the radix or base is the number of unique digits,
Binary Numbers Press any key to begin.. In order to understand the binary numbering system lets first look at our decimal system. The decimal numbering.
Significant Figures And Mathematical Calculations.
Binary & Decimal numbers
Introduction To Number Systems
Understanding Significant Figures
Digital Design Chapter One Digital Systems and Binary Numbers
Data Representation – numbers Binary conversion Hexadecimal Negative numbers Binary addition Binary shifts.
Hexadecimal Conversion
Computer Number Systems
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Number System conversions
Multiplying by powers of 10 Decimals
Lesson Objectives Aims You should be able to: Convert Denary to Binary
Binary Quiz UIN: ____________________
Number Systems and Binary Arithmetic
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Binary / Hex Binary and Hex The number systems of Computer Science.
Binary Numbers Press any key to begin..
Data Representation – Numbers
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Objective 1.02 Understand Numbering Systems
Starter Using the fingers on only one hand, what is the highest number you can count to? Rules: You must start at 1 You must count sequentially (i.e.
Binary Lesson 3 Hexadecimal
AP Computer Science LESSON 1 on Number Bases.
The basics of any electronic device means either electricity is flowing or it is not i.e. a switch is either on or off Computers are electronic devices.
Binary Lesson 4 Hexadecimal and Binary Practice
Binary to Decimal Conversion
LO1 – Understand Computer Hardware
Presentation transcript:

COMPUTER PROGRAMMING I Objective 1.02 Understand Numbering Systems

Number Systems 2/29/2016 Computer Programming I 2 Number systems we will talk about:  Decimal (Base 10 )  Binary (Base 2 )  Hexadecimal (Base 16 )

Decimal 2/29/2016 Computer Programming I 3 The number system we use in math and in life. Base 10: ten one digit numbers:  0,1,2,3,4,5,6,7,8,9  After 9 comes 10 (the first two digit number) of course.  10 2 = 100  Base squared =

Decimal What can we say about the decimal system? It is our day to day number system… The Decimal system has 10 digits; values are from 0 to

Binary 2/29/2016 Computer Programming I 5 Binary is Base 2 2 one digit numbers  0 and 1 For example: Base 10 of 4 = Binary 0100 or =100 – works in binary too! 2 squared = 4

Machine Language Binary or Base 2 : Only contains 2 types of digits; 1 or 0. The power of 2. Each digit from the right to the left is increased by power of 2. Each one (1) digit has a value representing on and each zero (0) digit do not hold a value representing off. OOOO Ex: = The right most digit (1) = 1  (2 0 ) The two middle digits are 0 therefore have no value. The left most digit (1) = 8 (2 3 or 2x2x2). The other digits have no value. The total value of all numbers would = 9. ( ) ex:  = 15 in decimal amount  = 255 6

Why Binary? 2/29/2016 Computer Programming I 7 Computers operate on a series on electric impulses. If the current is flowing the circuit is complete (1), otherwise the current is off (0) Write down the powers of 2 from

Powers of 2 2/29/2016 Computer Programming I 8 Remember from math the powers of 2: 1, 2, 4, 8, 16, 32, 64, 128 (first 8) Remember any number to the zero power is 1 and any number to the 1 power is that number. So if Decimal 4= 100 in binary, what does decimal 5 equal in binary?

Powers of 2 2/29/2016 Computer Programming I 9 Remember from math the powers of 2: 1, 2, 4, 8, 16, 32, 64, 128 (first 8) Remember any number to the zero power is 1 and any number of the 1 power is that number. So if Decimal 4= 100 in binary, what does decimal 5 equal in binary?  A:

The 1’s 2/29/2016 Computer Programming I 10 So let’s go beyond our basic example. Remember the most right digit has the least significant value and the most left digit has the most significant value. What is in Decimal? That would be 255. So… would be 256, right?

Let’s Try This… 2/29/2016 Computer Programming I 11 On your paper draw 8 columns Above each column label a power of 2, starting at 128 in the first (left most) column. Finish with 1 in the last (right most) column

Example Binary 2/29/2016 Computer Programming I 12 Figure out the following numbers in binary… Decimal

Example Binary Answers 2/29/2016 Computer Programming I 13 Figure out the following numbers in binary: Dec Binary (Answer) 56       

Hexadecimal 2/29/2016 Computer Programming I 14 Hex is Base 16 There are fifteen one digit numbers:  0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F What comes after F? Remember our rule: 10 2 =100 (16 2 =256 in decimal)  This works in Hex as it does for ANY number system.

Hexadecimal Contains 16 digits starting with 0-9 & A-F containing the values from 0 – 15. Hex DecHex Dec-Hex 20-2F and so on… 0 = 0 10 = 16-Each digit carries a value of = 1 11 = 17-Hex = 6 + Decimal = 10 (Hexadecimal =16) 2 = 2 12 = 18-Hexadecimal is only 4 bits (binary value) 3 = 3 13 = 19-ex: 1111 = 15 in decimal “F” in Hex value 4 = 4 14 = 20-Another ex: = 9C in Hex and 5 = 5 15 = in Decimal value. 6 = 6 16 = 22 7 = 7 17 = 23 8 = 8 18 = 24 9 = 9 19 = 25 Remember! Hex is only 4 bits long and its A = 10 1A = 26 highest value is F in Hex or B = 11 1B = in decimal or 1111 in binary. C = 12 1C = 28 D = 13 1D = 29 Mainframe computers use Hexadecimal to E = 14 1E = 30utilize less disk space. F = 15 1F = 31 15

Hexadecimal Conversion Computer Programming I 16 Hex 9F to binary 9 F Hex 9F to Decimal 9 F (16 * 9) + (1 * 15) = 159 in Decimal Add the values… F Base 16 = Base 2 9F Base 16 = 159 Base 10

Hexadecimal 2/29/2016 Computer Programming I 17 Think if you had 3 hands. You would have 15 fingers right? That is what hex has! So after 9 comes A (10), B (11), C (12), D (13), E (14) and F (15) Let try our example again in Hex.

Another Conversion to Hexadecimal 2/29/2016 Computer Programming I 18 Figure out the following Decimal numbers to Hex: Decimal Ask “How many of ‘256’ can come out of 56 (our decimal number)? 0 2.Ask “How many of ‘16’ can come out of 56? 3 (3 * 16 = 48 with 8 left over) Put the 3 in the 16’s spot 3.Ask “How many of ‘1’ can come out of 8 (the left over)? 8 with 0 left over 3 8

Example Hex Answers 2/29/2016 Computer Programming I 19 Figure out the following Decimal numbers to Hex: Dec Hex 56    C6 64     100

Conclusion 2/29/2016 Computer Programming I 20 In this lesson we learned about number systems used in Programming. Decimal Binary Hexadecimal

For More Information xtra=page%253D1&page=1 xtra=page%253D1&page=