Tools of Web Development 1: Module A: Numbering Systems

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

DATA REPRESENTATION CONVERSION.
CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
James Tam Beyond base 10: Non-decimal based number system What exactly is decimal? How do other number systems work (binary, octal and hex) How to convert.
Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:
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.
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Binary Numbers.
Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
Binary Conversions Number systems Binary to decimal Decimal to binary.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Binary and Hexadecimal Numbers
Number Systems.
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 
CSCI N301: Fundamental Computer Science Concepts Copyright ©2006  Department of Computer & Information Science The Switch, Part One.
Numbering Systems. CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system.
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Number Systems Ron Christensen CIS 121.
Chapter 4: Representation of data in computer systems: Number OCR Computing for GCSE © Hodder Education 2011.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Number systems, Operations, and Codes
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
Digital Electronics Octal & Hexadecimal Number Systems.
Binary, Hexadecimal, Decimal, and How They Relate.
Number Systems and Binary Math
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Octal & Hexadecimal Number Systems
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 4 Number Representation and Calculation.
Number Systems – Definitions page 214 The radix or base 밑 refers to the number b in an expression of the form b n. The number n is called the exponent.
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.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Introduction To Number Systems
Computer Maintenance Numbering Systems Trade & Industrial Education
Digital Design Chapter One Digital Systems and Binary Numbers
Different Numeral Systems
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
Number Systems and Binary Arithmetic
CHAPTER 1 : INTRODUCTION
COMPUTING FUNDAMENTALS
Convert Decimal to Binary
Octal & Hexadecimal Number Systems
Number System conversions
Visualizing Decimal and Binary
Number Systems and Binary Arithmetic
Introduction to IT By: Muhammed s. anwar.
Dr. Clincy Professor of CS
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
Chapter 2: Number Systems
AP Computer Science LESSON 1 on Number Bases.
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Decimal / Binary Conversions
Computer Science 1 Binary and Hexadecimal Numbers
Chapter 2 Number Systems.
Beyond Base 10: Non-decimal Based Number Systems
Binary, Hexadecimal, and Base 10.
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
Chapter 2 Number Systems.
Presentation transcript:

Tools of Web Development 1: Module A: Numbering Systems

Goals Understand why computers use binary (Base-2) numbering. Understand how to convert Base-2 numbers to Base-10 or Base-8. Understand how to convert Base-8 numbers to Base-10 or Base 2. Understand how to convert Base-16 numbers to Base-10.

Why Binary? Computers are made of a series of switches Each switch has two states: ON or OFF Each state can be represented by a number – 1 for “ON” and 0 for “OFF”

Understanding Placeholders Each numbering system has placeholders The possible values of each place holder depends on the maximum number of single-digit numbers available for that numbering system In the Base-10 world (aka Decimal), there are ten possible digits that each placeholder can take (0-9)

4 3 6 Base-10 Placeholders Number: Placeholder Name: “Tens” “Ones” “Hundreds” Value: 100*4 10*3 1*6 Exponential Expression: 102*4 101*3 100*6

1 Base-2 Placeholders Number: Placeholder Name: “Fours” “Twos” “Ones” Number: Placeholder Name: “Fours” “Twos” “Ones” n10 Value: 4*1 2*0 1*1 n10 Exponential Expression: 22*1 21*0 20*1

Converting Base-2 to Base-10 12 ON/OFF ON OFF OFF ON ON Exponent: 24 23 22 21 20 16 2 1 Calculation: + + + + = 1910

Converting Base-10 to Base-2 STEP ONE: Find the largest exponent of two that is less than or equal to the Base-10 number: 2110= 16 24 23 22 21 20

Converting Base-10 to Base-2 STEP TWO: Calculate the value of each exponent and place that value above it: 2110= 16 8 4 2 1 24 23 22 21 20

Converting Base-10 to Base-2 STEP THREE: Place a “1” above the left-most placeholder: 2110= 1 16 8 4 2 1 24 23 22 21 20

Converting Base-10 to Base-2 STEP FOUR: Add left-most value to the next place-holder. Put a “0” above is the sum is greater than the number being converted, otherwise put a “1” above: 2110= 1 16 8 4 2 1 24 23 22 21 20

Converting Base-10 to Base-2 STEP FIVE: Add subsequent placeholders. If the sum is greater than than the number being converted, put a “0” above and disregard it. Otherwise, put a “1” above and including it in your running total. 2110= 1 1 1 16 8 4 2 1 24 23 22 21 20

Converting Base-10 to Base-2 STEP SIX: The resulting 1s and 0s in the top row form the binary equivalent of the Base-10 number with which we started: 2110 = 101012

Introducing Octal Computer scientists are often looking for shortcuts to do things One of the ways in which we can represent binary numbers is to use their octal equivalents instead This is especially helpful when we have to do fairly complicated tasks using numbers

Introducing Octal The octal numbering system includes eight base digits (0-7) After 7, the next placeholder to the right begins with a “1” 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...

2 4 1 Octal Placeholders Number: Placeholder Name: “Ones” “Eights” “Sixty-Fours” Value: 64*2 8*4 1*1 Exponential Expression: 82*2 81*4 80*1

Converting Base-2 to Base-8 100011001010012 STEP ONE: Take the binary number and from right to left, group all placeholders in triplets. Add leading zeros, if necessary: 010 001 100 101 001

Converting Base-2 to Base-8 100011001010012 = 214518 STEP TWO: Convert each triplet to its single-digit octal equivalent. (HINT: For each triplet, the octal conversion is the same as converting to a decimal number): 010 001 100 101 001 2 1 4 5 1

Converting Base-8 to Base-2 435208 = 1000111010100002 STEP ONE: Take each octal digit and convert each digit to a binary triplet. Keep leading zeros: 4 3 5 2 100 011 101 010 000

Converting Base-8 to Base-10 23748 STEP ONE: Multiply each octal digit by the exponential expression that represents its placeholder: 2 * 83 = 1024 3 * 82 = 192 7 * 81 = 56 4 * 80 = 4

Converting Base-8 to Base-10 23748 = 127610 STEP TWO: Add the products together. The sum represents the Base-10 equivalent: 1024 + 192 + 56 + 4 = 1276

Converting Base-10 to Base-8 483210 STEP ONE: Divide the Base-10 number by eight. DO NOT DIVIDE PAST THE DECIMAL POINT – INSTEAD INCLUDE A REMAINDER: 4832 / 8 = 604 r0

Converting Base-10 to Base-8 483210 STEP TWO: Divide the quotient of the previous expression by eight. Repeat the process until you have a quotient of 0: 4832 / 8 = 604 r0 604 / 8 = 75 r4 75 / 8 = 9 r3 9 / 8 = 1 r1 1 / 8 = r1

Converting Base-10 to Base-8 483210 = 113408 STEP THREE: The octal equivalent can be found by looking at the remainders from the bottom up: 4832 / 8 = 604 r0 604 / 8 = 75 r4 75 / 8 = 9 r3 9 / 8 = 1 r1 1 / 8 = r1

Hexadecimal Numbering Sometimes, it is necessary to use a numbering system that has more than ten base digits One such numbering system, hexadecimal, is useful on the Web Hexadecimal number, a Base-16 numbering system, is used in specifying web colors

Hexadecimal Numbering There are new symbols for the Base-16 equivalents of the Base-10 numbers 10, 11, 12, 14 and 15. Examine: DEC 1 2 3 4 5 6 7 HEX 8 9 10 11 12 13 14 15 A B C D E F

Converting Base-10 to Base-16 21410 STEP ONE: Divide the Base-10 number by sixteen. Do not divide past the decimal point: 214 / 16 = 13 r6

Converting Base-10 to Base-16 21410 STEP TWO: Convert both the quotient and the remainder to their hexadecimal equivalents: 214 / 16 = 13 r6 D 6 Hex Equivalents

Converting Base-10 to Base-16 21410 = D616 STEP THREE: The quotient represents the first digit of the hexadecimal equivalent and the remainder represents the second digit: 214 / 16 = 13 r6 D 6 Hex Equivalents

Questions?