The Wonders of Conversion. A number system is a system in which a number is represented. There are potential infinite number systems that can exist (there.

Slides:



Advertisements
Similar presentations
How to Convert Decimal Numbers to Binary EXAMPLES.
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.
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.
2.2 General Positional-Number-System Conversion
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Data Representation in Computers
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
Converting Binary to Octal
Computer Systems 1 Fundamentals of Computing
Number Systems and Arithmetic
Prepared By Rama Gaikwad 1. Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20,
 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)
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.
Number Systems.
Numbering Systems CS208.
Conversion of Number System Conversion Among Bases The possibilities: Hexadecimal DecimalOctal Binary
NUMBER SYSTEMS Prepared By K.Anitha Associate Professor Dept of ECE PVPSIT.
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,
Number systems, Operations, and Codes
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Positional Notation 642 in base 10 positional notation is:
Number Base Conversions
Number System sneha.
Octal to Decimal Hexadecimal DecimalOctal Binary.
DECIMALBINARY a) b) c) d) e) f) Revision Exercise DECIMALBINARY a) b) c)
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Topic 14.1 Extended Hexadecimal  Decimal is base 10 and uses 10 digits (0,1,2,3,4,5,6,7,8,9).  Binary is base 2 and uses 2 digits (0,1).  Computers.
Computer Number System
ECE 3110: Introduction to Digital Systems Number Systems.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Hexadecimal (base 16) BY MAT D. What is hexadecimal  Hexadecimal is a number system like binary or denary that has 16 characters, the numbers 0-9 and.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
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. There are 10 kinds of people in the world, those who understand binary and those who don’t.
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.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Digital Design Chapter One Digital Systems and Binary Numbers
Chapter 02 Nell Dale & John Lewis.
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
Lecture 3: Binary values and number systems
Base ‘b’ number for i = 0 to n – 1 for an n digit quantity
CSE 102 Introduction to Computer Engineering
Convert Binary Number to Octal
Location in course textbook
Number System conversions
Chapter 1 Number Systems & Conversions
Data Storage Introduction to computer, 2nd semester, 2010/2011
Number Systems and Binary Arithmetic
Introduction to IT By: Muhammed s. anwar.
Digital Electronics and Microprocessors
Chapter Four Data Representation in Computers By Bezawit E.
Chapter 2 Number Systems.
Numeral systems (radix)
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
Chapter 2 Number Systems.
1. Number Systems Chapt. 2.
Dr. Clincy Professor of CS
Presentation transcript:

The Wonders of Conversion

A number system is a system in which a number is represented. There are potential infinite number systems that can exist (there are infinite numbers, after all), but you are only responsible for a very small subset. For the AP Exam, you will need to know binary (base- 2), octal (base-8), decimal (base-10) and hexadecimal (base-16). Notice that all of those bases are powers of 2!

The binary number system is the one your computer explicitly understands. All numbers are represented by bits, which is either a 0 or a 1. A byte is a collection of 8 bits, and can represent numbers from -256 to 255. (The max value of a collection of bits is always 2^ numbits -1  = 255) For example, is 182 in decimal.

Octal is base-8. Only digits 0-7 are used. Using 182 again, it is 266 in octal. (That is not a typo – the number appears to be bigger!)

Decimal is good old base-10. You’ve been using this all of your lives! 182 is 182 in decimal!

Hexadecimal is base-16. It uses the digits 0-9 and the letters A-F to represent 10-15, respectfully. For example, 15 base 10 is F in hexadecimal. 16 is is 37A.

The following is called the expansion method and only works on converting a number TO BASE-10!!! You need to understand how these numbers are written. You have to analyze the number starting on the right. This number represents the base number raised to the 0 th power. The second number from the right represents the base number raised to the first power. …and so on

Consider the following binary number: What is this number in decimal format? Start looking at the rightmost digit. This represents the base number raised to the 0 th power. Multiply this number by the digit present (which is a 1). Save this number. Look at the second rightmost digit. This represents the base number raised to the first power. Multiply this number by the digit present (which is a 1). Save this number. …do this for all numbers present and add all of products together to get your base-10 number.

to decimal 2 0 * 1 = * 1 = * 0 = * 0 = * 1 = * 1 = * 1 = * 0 = 0 The sum is 115.

Convert to decimal. Convert to decimal. Convert to decimal.

Convert 234 base-8 to decimal. 8 0 * 4 = * 3 = * 2 = 128 The sum is 156.

Convert 716 base-8 to decimal. Convert 45 base-8 to decimal. Convert 10 base-8 to decimal.

REMEMBER: A = 10 B = 11 C = 12 D = 13 E = 14 F = 15 Convert F16 to decimal.

Work: 16 0 * 6 = * 1 = * 15 = 3840 The sum is 3862.

Convert C10 to decimal. Convert FF to decimal. Convert 16 to decimal.

One method of converting any base number to base-10 is by continuously dividing the original decimal number by the desired base until you get a quotient of 0, and then read the remainders backwards. Note: if you are converting to hexadecimal, remember that are represented by A..F respectively!)

Convert 201 to binary. Work: 201 / 2 = 100 remainder / 2 = 50 remainder 0 50 / 2 = 25 remainder 0 25 / 2 = 12 remainder 1 12 / 2 = 6 remainder 0 6 / 2 = 3 remainder 0 3 / 2 = 1 remainder 1 1 / 2 = 0 remainder in binary is

Convert 1076 to binary. Convert 200 to binary. Convert 450 to binary.

Convert 173 to octal. Work: 173 / 8 = 21 remainder 5 21 / 8 = 2 remainder 5 2 / 8 = 0 remainder base-10 is 255 base-8.

Convert 1076 to octal. Convert 200 to octal. Convert 450 to octal.

Convert 506 to hexadecimal. Work: 506 / 16 = 31 remainder / 16 = 1 remainder 15 1 / 16 = 0 remainder 1 BUT 10 is A and 15 is F so… 506 base-10 is 1FA base-16.

Convert 1076 to hexadecimal. Convert 200 to hexadecimal. Convert 450 to hexadecimal.

There is a neat trick that allows one to convert from binary to hexadecimal, without converting the binary to base-10 first. Every base-16 digit (including letters) can be represented by four bits:

Base -2Base Base-2Base A 1011B 1100C 1101D 1110E 1111F

Convert base-2 to base-16. Starting from the right, break up the binary number into groups of 4 bits. If the last group doesn’t have four bytes, pad it on the left with zeros. Base-2 groups: Base-16: Answer = 1257

to base-16 Groups: Base-2: Base-16: 7 F C 8 D Answer = 7FC8D

Convert base-16 to base-2 Groups: Base-16: Base-2: Answer:

Convert 1a2b3c to base-2 Groups: Base-16:1a2b3c Base-2: Answer:

Convert to hexadecimal. Convert to hexadecimal. Convert 3f5a86 to binary. Convert aa4fc to binary.