Fundamentals of Python: First Programs Chapter 4: Number Systems.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

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.
DATA REPRESENTATION CONVERSION.
Copyright (c) 2004 Professor Keith W. Noe Number Systems & Codes Part I.
Introduction to Computer Engineering by Richard E. Haskell Number Systems Module M3.1 Sections
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
Number System Conversions Lecture L2.2 Section 2.3.
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
COMPUTER FUNDAMENTALS David Samuel Bhatti
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.
Number Systems.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 3): The Fundamentals: Algorithms, the.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 1 – Number Systems and.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
Supplemental Chapter Number Bases
NUMBER SYSTEM.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
1 Week 2: Binary, Octal and Hexadecimal Numbers READING: Chapter 2.
Number systems, Operations, and Codes
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Positional Notation 642 in base 10 positional notation is:
Number Base Conversions
Converting From decimal to Binary & Hexadecimal to Binary
Fundamentals of Python: First Programs
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Chapter 2 Data Representation.
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Hexadecimal Data Representation. Objectives  Know how the Hexadecimal counting system works  Be able to convert between denary, binary & hexadecimal.
NUMBER SYSTEM. Number System Number Base B => B symbols – Base 16(Hexa):0, 1,……9, A,…, E, F – Base 10 (Decimal): 0, 1, 2,……, 7, 8, 9 – Base 8(Octal):
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Computer Studies Today Chapter 19 1 Chapter 19. Computer Studies Today Chapter 19 2 »Information stored in a computer is in two states: –ON –OFF.
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.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
YOUR VIRTUAL WORLD – THE HEXADECIMAL NUMBERING SYSTEM Prepared by Mrs. Christina Morris, July, 2014.
Lecturer: Santokh Singh
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Fundamentals of Python: First Programs
Unit 18: Computational Thinking
By: Jonathan O. Cabriana
What is a byte? What is it? How would you use it?
Positional Notation A positional or place-value notation is a numeral system in which each position is related to the next by a constant multiplier, called.
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Copyright (c) 2004 Professor Keith W. Noe
Base ‘b’ number for i = 0 to n – 1 for an n digit quantity
CSE 102 Introduction to Computer Engineering
Number Systems Lab session 1 Xuan Guo.
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
Data Storage Introduction to computer, 2nd semester, 2010/2011
Binary Quiz UIN: ____________________
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Binary Lesson 3 Hexadecimal
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
There are 10 types of people of people in this world…
Binary Lesson 3 Hexadecimal
Fundamentals of Python: First Programs
Binary Lesson 3 Hexadecimal
Chapter Four Data Representation in Computers By Bezawit E.
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Binary Lesson 4 Hexadecimal and Binary Practice
Chapter 2 Number Systems.
Remember the 10 types of people of people in this world…
Computer Science 1 Review and finish Number base conversion
Chapter 2 Number Systems.
Presentation transcript:

Fundamentals of Python: First Programs Chapter 4: Number Systems

Fundamentals of Python: First Programs2 Objectives After completing this lesson, you will be able to Convert a string representation of a number from one base to another base

Fundamentals of Python: First Programs3 Problem Convert (Octal = base 8) to a decimal number (base 10)

Fundamentals of Python: First Programs4 Today’s Lesson “The How” Reading a “Technical Text” Determine the central ideas of the text, summarizing the complex concepts, processes, and/or information presented in the text by paraphrasing them in simpler but still accurate terms. Determine the meaning of symbols, key terms, and Python commands.

Fundamentals of Python: First Programs5 Today’s Lesson “The What” Number Systems: Converting hexadecimal, octal, binary, and decimal numbers Read Section 4.3 (Pages 129 – 135)

Fundamentals of Python: First Programs6 Today’s Lesson “The How Part 2” –Start with private thinking time. –We will use “Listen & Compare” Structured Discussion with your partner. –Groups will share What you learned including: The positional system Converting Binary to Decimal Converting Decimal to Binary Converting Hexadecimal & Octal to Binary using the shortcuts

Fundamentals of Python: First Programs7 Problem Part 2 Convert (Octal = base 8) to a decimal number (base 10)

Fundamentals of Python: First Programs8 Exit Ticket –Socrative.com –Room number: LCHS607 Number Conversion.xlsx Number Conversion.xlsx

Fundamentals of Python: First Programs9 Strings and Number Systems The digits used in each system are counted from 0 to n - 1, where n is the system’s base To represent digits with values larger than 9 10, systems such as base 16 use letters –Example: A 16 represents the quantity 10 10, whereas represents the quantity 16 10

Fundamentals of Python: First Programs10 The Positional System for Representing Numbers In positional notation, a digit has a positional value, determined by raising the base to the power specified by the position (base position )

Fundamentals of Python: First Programs11 Converting Binary to Decimal Each digit or bit in binary number has positional value that is power of 2 We occasionally refer to a binary number as a string of bits or a bit string To determine the integer quantity that a string of bits represents:

Fundamentals of Python: First Programs12 Converting Binary to Decimal (continued)

Fundamentals of Python: First Programs13 Converting Binary to Decimal (cont.)

Fundamentals of Python: First Programs14 Conversion Shortcuts Thus, a quick way to compute the decimal value of the number is , or 31 10

Fundamentals of Python: First Programs15 Octal and Hexadecimal Numbers To convert from octal to binary, start by assuming that each digit in the octal number represents three digits in the corresponding binary number To convert binary to octal, you begin at the right and factor the bits into groups of three bits each

Fundamentals of Python: First Programs16 Octal and Hexadecimal Numbers (continued) To convert from hex to binary, replace each hex digit with the corresponding 4-bit binary number To convert from binary to hex, factor the bits into groups of 4 and look up the corresponding hex digits