Section 1.4 Place Value Systems of Numeration in Other Bases



Similar documents
Base Conversion written by Cathy Saxton

6 The Hindu-Arabic System (800 BC)

=

NUMBER SYSTEMS. William Stallings

CSI 333 Lecture 1 Number Systems

Lecture 11: Number Systems

Useful Number Systems

Computer Science 281 Binary and Hexadecimal Review

Lecture 2. Binary and Hexadecimal Numbers

2 Number Systems. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

Positional Numbering System

Chapter 4: Computer Codes

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems

Number Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi)

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Numbering Systems. InThisAppendix...

Binary Numbers. Binary Octal Hexadecimal

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Binary, Hexadecimal, Octal, and BCD Numbers

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

Cyber Security Workshop Encryption Reference Manual

Numeration systems. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Counting in base 10, 2 and 16

Number Systems and Radix Conversion

NUMBER SYSTEMS. 1.1 Introduction

NUMBER SYSTEMS APPENDIX D. You will learn about the following in this appendix:

Decimal to Binary Conversion

Unsigned Conversions from Decimal or to Decimal and other Number Systems

Chapter 2. Binary Values and Number Systems

The Hexadecimal Number System and Memory Addressing

Binary Representation

Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6

Memory is implemented as an array of electronic switches

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

3. Convert a number from one number system to another

2011, The McGraw-Hill Companies, Inc. Chapter 3

Data Representation. What is a number? Decimal Representation. Interpreting bits to give them meaning. Part 1: Numbers. six seis

Grade 6 Math Circles. Binary and Beyond

Number Systems. Introduction / Number Systems

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

The string of digits in the binary number system represents the quantity

Digital codes. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Chapter 1: Digital Systems and Binary Numbers

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

4.3 TABLE 3 TABLE five

HOMEWORK # 2 SOLUTIO

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

THE BINARY NUMBER SYSTEM

CPEN Digital Logic Design Binary Systems

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Systems I: Computer Organization and Architecture

Goals. Unary Numbers. Decimal Numbers. 3,148 is s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

International Securities Identification Number (ISIN)

Binary Adders: Half Adders and Full Adders

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

YOU MUST BE ABLE TO DO THE FOLLOWING PROBLEMS WITHOUT A CALCULATOR!

A Step towards an Easy Interconversion of Various Number Systems

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

Number Representation

CS321. Introduction to Numerical Methods

Solution for Homework 2

CS201: Architecture and Assembly Language

Data Storage. 1s and 0s

The Euclidean Algorithm

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

Chapter 5. Binary, octal and hexadecimal numbers

Let s put together a Manual Processor

Sheet 7 (Chapter 10)

Accuplacer Arithmetic Study Guide

Lecture 8: Binary Multiplication & Division

**Unedited Draft** Arithmetic Revisited Lesson 5: Decimal Fractions or Place Value Extended Part 3: Multiplying Decimals

The Subnet Training Guide

Comp 255Q - 1M: Computer Organization Lab #3 - Machine Language Programs for the PDP-8

The BBP Algorithm for Pi

BINARY CODED DECIMAL: B.C.D.

The programming language C. sws1 1

Decimal Notations for Fractions Number and Operations Fractions /4.NF

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Classless Subnetting Explained

Chapter 1. Binary, octal and hexadecimal numbers

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

APP INVENTOR. Test Review

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Count the Dots Binary Numbers

Math Circle Beginners Group October 18, 2015

Streaming Lossless Data Compression Algorithm (SLDC)

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

The gas can has a capacity of 4.17 gallons and weighs 3.4 pounds.

Session 29 Scientific Notation and Laws of Exponents. If you have ever taken a Chemistry class, you may have encountered the following numbers:

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal

COMPSCI 210. Binary Fractions. Agenda & Reading

Memory Systems. Static Random Access Memory (SRAM) Cell

Pre-Algebra Lecture 6

Transcription:

Section.4 Place Value Systems of Numeration in Other Bases Other Bases The Hindu-Arabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason for the choice of base ten is the fact that most human beings have ten fingers. However, a positional value system can be created with a base of any counting number greater than one. In this section we are going to examine how numbers can be written in systems in bases other than ten. Why would we write a number in another base? Base 2, also called binary, is the natural base for working with computers. At the basic level, a computer is a collection of billions of bits of information. Each bit is essentially a microelectronic gate that is either open or closed. We represent these positions by the value of the bit being either a or a. An ordered string of 8 bits makes up a byte. There are 26 different possible combinations of s and s in a byte, hence 26 different characters can be encoded with a byte. Base 2 is the logical system for working with these strings of s and s. Computer programmers 4 have also found base 8 ( 2 ) and base 6 ( 2 ) to be useful when working with combinations of bits. Base 8 is also known as octal, and base 6 is known as hexadecimal (or hex). Beyond computer applications, learning how to write numbers in different bases highlights the properties of a place-value system of numeration that we take for granted. Symbols and Notation A system of numeration in base b needs a symbol for the quantities from to ( b ). For quantities less than ten, the symbols,, 2,, 4,, 6, 7, 8, 9 in the Hindu-Arabic system will be used. For bases larger than ten, a single symbol is needed to represent quantities that we normally see as two digit numbers in base ten. Symbols for the numbers ten, eleven, twelve and following will be capital letters, starting with A for ten, B for eleven, C for twelve, and so on. The symbols for base 6 are given below. Number in base Number in base 6 Number in base Number in base 6 9 9 A 2 2 B 2 C 4 4 D 4 E 6 6 F 7 7 6 8 8 - -

Section.4 To identify the base in which a number is written, we will adopt the convention of identifying bases other than ten with a subscript on the right side of a number in a different base. For example, the number sixteen in base sixteen will be written 6. The Expanded Form of a Number The values of each position in a Hindu-Arabic number are powers of ten 4 2...,(), (), (), (), The above place values represent, for example, the ten-thousands place, the thousands place, the hundreds place, the tens place, the ones place, etc. (Notice that is a power of ten, since =.) The rule that allows a string of digits from -9 to represent any counting number requires that each digit in a particular place in the string is multiplied by the place s appropriate power of ten. Explicitly writing out this multiplication for a number expressed in a placevalue system is called writing the number in expanded form. Example : Write the base ten number 628 in expanded form. In expanded form, 2 628 = + 6 + 2 + 8 (Notice that 8 can be written as 8.) A number written in any base may be written in expanded form in a similar fashion. The place values for a binary system (base 2) are 4 2...,2, 2, 2, 2, 2, (Notice that = 2.) The expanded form of a binary number multiplies each digit by its corresponding power of 2. Example 2: Write the binary number 2 in expanded form. The number has 7 digits, so the leftmost digit is multiplied by form: 7 6 2 = 2. In expanded 6 4 2 2 = 2 + 2 + 2 + 2 + 2 + 2 + 2-6 -

Section.4 Example : Write the number 28 in expanded form. In base 8 the place values are 4 2..., 8, 8, 8, 8, (Notice that = 8.) The number 28 has four digits, so the highest power of 8 used in this number is. In expanded form: 2 28 = 2 8 + 8 + 8 + 8 Converting from Another Base to Base Ten The expanded form of a number written in any base may be used to convert it to a number in base ten. Simply perform the multiplication and addition indicated in the expanded form in base ten. The resulting answer is the base ten representation of the number. Example 2 Revisited: Write 2 in base ten. The expanded form of 2 is 2 6 4 2 = 2 + 2 + 2 + 2 + 2 + 2 + Performing the multiplication and addition indicated: 6 4 2 2 + 2 + 2 + 2 + 2 + 2 + = ( 64) + ( 2) + ( 6) + ( 8) + ( 4) + ( 2) + = 64 + + 6 + 8 + + + = 89 Therefore, 2 = 89 in base ten. - 7 -

Section.4 Example Revisited: Write 28 in base ten. The expanded form of 28 is 2 28= 2 8 + 8 + 8 + 8 Performing the indicated multiplication and addition gives 2 2 8 + 8 + 8 + = 2 2 + 64 + 8 + = 24 + 92 + 8 + = 229 Therefore, 28 = 229 in base ten. This same procedure works for a number written in any base. Let s try a few more different bases for practice. Example 4: Write the number 242 in base ten. The expanded form of this number is 2 242 = 2 + 4 + + 2 = 2 2 + 4 2 + + 2 = 2 + + + 2 = 67 Thus, 242 = 67 in base ten. Example : Write the number CA7 6 in base. The table of base sixteen numerals shows that C represents 2 and A represents. The expanded form of this number is: - 8 -

Section.4 6 2 CA7 = 2 6 + 6 + 7 Remember that 7 = 7 6. ( ) ( ) = 2 26 + 6 + 7 = 72 + 6 + 7 = 29 Thus, CA76 = 29 in base ten. In summary, you should perform the following steps to convert a number in another base to its equivalent representation in base ten:. Write the number in expanded form with powers of the base 2. Perform the indicated multiplication and addition in base ten.. The answer is the base ten representation of the original number. Converting a Base Ten Number to Another Base The number 26 in base ten is the quantity that is groups of plus 2 groups of plus 6 singles. Writing this quantity in base ten conveys these groupings to the reader. Converting a base ten number to a number in a different base involves division. Why? To write the quantity 26 in another base b, we must determine how many groups of b items can be formed from 26 items. This problem is modeled by the operation of division. This is best illustrated by examples. Example 6: Write the number 9 in base 8. The place values for base 8 are 2..., 8 = 2, 8 = 64, 8, With only 9 items, we cannot form any groups of 2 or 64. We can form groups of 8. Dividing 9 by 8 shows that 9 items can be grouped into 7 sets of 8 with left over. 7 8 9 6 The base 8 expanded form of 9 is: ( ) Therefore, 9 = 78 9 = 7 8 + 8-9 -

Section.4 Notice that we started by dividing our base ten number 9 by the largest power of 8 that is smaller than the number. This is the first step for translating any base ten number into another base. The next step is to divide the remainder of this division problem by the next smaller power of the base. A succession of division problems is created by dividing the remainder of the previous problem by the next smaller power of the base until the last division problem is dividing by. Example 7: Write the number 444 in base. The place values in base are 4 2..., = 62, = 2, = 2,, The largest power of smaller than 444 is 2. 2 444 7 69 Now divide 69 by the next lower power of, 2 2 69 9 = 2. So, we will start dividing 444 by 2 = 2. Now divide the remainder, 9, by (which is the next lower power of. 9 4 At this point, the next lower power of is. We know 4 = 4 with left over, so we often do not explicitly write out this division problem in the list. Yet, 4 is the last quotient in our sequence of division problems. The division answers show that 444 is groups of 2 plus 2 groups of 2 plus groups of plus 4 singles. Therefore, 444 = 24. - 4 -

Section.4 Example 8: Write in base 2. The place values in base 2 are 6 4 2..., 2 = 64, 2 = 2, 2 = 6, 2 = 8, 2 = 4, 2, The largest power of 2 smaller than is 2, so we begin by dividing by 2 and continue by dividing each remainder by the next smaller power of 2. 2 2 2 6 2 6 8 4 4 2 Thus, = 2. Notice that in Example 8 the division problems include dividing by EVERY power of the base starting with the largest power smaller than the number, even if the quotient is. The zeroes in the number are important to holding the places so each value is correct. Also, notice that the division by was explicitly included. Especially in base 2, it is useful to include this problem to make sure the proper number of digits is included. Example 9: Write 9 in base 2. The place values in base 2 are ( ) ( ) 2..., 2 = 728, 2 = 44, 2, The largest power of 2 that is smaller than 9 is 44. Therefore, begin by dividing by 44. 9 44 9 296 9 7 2 9 84 The convention for base 2 is that = A and = B, so 9 = 97B2. - 4 -

Section.4 In summary, you should perform the following steps to convert a base ten number to another base:. Determine the powers of the base, which are the place values. 2. Determine the largest power of the base that is smaller than the number given.. Divide the number given by the power of the base determined in step 2. 4. Create a sequence of division problems by dividing the remainder of a division problem by the next smaller power of the base. Continue until dividing by.. The quotients, in order, are the digits in each place of the numbers representation in the given base. - 42 -