Docsity

Lecture Notes on Different Base Systems | MATH 116, Study notes of Mathematics

Toggle sidebar
bg1
Section 4.3: Different Base Systems
Practice HW from Mathematical Excursions Textbook (not to hand in)
p. 205 # 21-27 odd, 17, 1-19 odd
Recall that the number system that we use (the Hindu-Arabic system is a base 10
system since all numbers can be written as a sum of the powers of 10). In this section, we
learn about other modern place value systems. In particular, we discuss how to convert
between bases used in modern times, and bases that computers use.
Binary Numbers
Binary Numbers are base 2 numbers are made up only of 0’s and 1’s. Computers use
these numbers to represent data internally. Examples of binary numbers are 0 (which
represents the number 0) 100 (which represents the number 4), 1001 (which represents
the number 9), and 1011000 (which represents the number 88). We now give a formal
definition of a binary number.
Definition: A binary number
0121
bbbbb
kk
, where
1or 0
i
b
, represents the base
10 decimal number given by
0
0
1
1
2
2
1
1
22222 bbbbb
k
k
k
k
We illustrate this definition in the following examples.
Example 1: Find the base 10 decimal representation of the binary number
2
100
.
Solution:
█
1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Lecture Notes on Different Base Systems | MATH 116 and more Study notes Mathematics in PDF only on Docsity!

Section 4.3: Different Base Systems

Practice HW from Mathematical Excursions Textbook (not to hand in) p. 205 # 21-27 odd, 17, 1-19 odd Recall that the number system that we use (the Hindu-Arabic system is a base 10 system since all numbers can be written as a sum of the powers of 10). In this section, we learn about other modern place value systems. In particular, we discuss how to convert between bases used in modern times, and bases that computers use.

Binary Numbers

Binary Numbers are base 2 numbers are made up only of 0’s and 1’s. Computers use these numbers to represent data internally. Examples of binary numbers are 0 (which represents the number 0) 100 (which represents the number 4), 1001 (which represents the number 9), and 1011000 (which represents the number 88). We now give a formal definition of a binary number. Definition: A binary number b^ k bk  1  b 2 b 1 b 0 , where bi^ ^0 or^1 , represents the base 10 decimal number given by 0 0 1 1 2 2 1 b 2 b 1 2 b 2 b 2 b 2 k k k k ^        We illustrate this definition in the following examples. Example 1: Find the base 10 decimal representation of the binary number 100 2. Solution:

Example 2: Find the base 10 decimal representation of the binary number 1011000 2. Solution: █ Example 3: Find the base 10 decimal representation of the binary number 1110001011 2. Solution:

Example 6: Convert 5413 to binary. Solution: We start by computing the powers of 2 that are less than 5413. This gives 2 8 2 128 2 2048 2 4 2 64 2 1024 2 2 2 32 2 512 2 8192 4096 STOP! 2 1 2 16 2 256 2 4096 3 7 11 2 6 10 1 5 9 13 0 4 8 12                Then we can write 5413 as 12 11 10 9 8 7 6 5 4 3 2 1 0 12 10 8 5 2 0 12 0 2 12 0 2 12 02 0 2 12 0 2 02 12 0 2 12 2 2 2 2 2 2 4096 1024 256 32 4 1 4096 1024 256 32 5 4096 1024 256 37 4096 1024 293 5413 4096 1317                                                    Thus, reading off the coefficients, we see that the binary representation (base 2) representation of 5413 is (^10101001001012) █

Conversion to Numbers Involving Other Bases

We can extend the above concepts to arbitrary base conversions. We extend the concept of binary numbers to arbitrary bases. Definition: A number of base a given by b^ k bk  1  b 2 b 1 b 0 , where 0  b^ ia , represents the base 10 decimal number given by 0 0 1 1 2 2 1 b a b 1 a ba ba ba k k k k ^       

Notes

  1. Numbers with bases larger than 10 need additional digits. The additional digits are added starting with the letter A and adding subsequent letters when need. The letters in base 10 represent increasing values. For example, A = 10, B = 11, C = 12, D = 13, etc. For example, the following represent the digits and their numerical base 10 values for the base 12 and base 16. Base 12 Digit 0 1 2 3 4 5 6 7 8 9 A B Base 10 Value 0 1 2 3 4 5 6 7 8 9 10 11 Base 16 Digit 0 1 2 3 4 5 6 7 8 9 A B C D E F Base 10 Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  2. The bases two (binary), eight (octal) and sixteen (hexadecimal) are number systems that are important in computer science. Example 9: Convert the numeral EA3sixteen^ to base 10. Solution:

Converting From Base Ten Numbers Back to an Arbitrary Base

Converting from base ten numbers back to numbers of an arbitrary base is a slightly more difficult process. The basic behind goes back to the process of long division you learned in high school. We review this concept in the following example. Example 10: Consider 3 40 40  3 . Determine the quotient and remainder and write the result as an equation. Solution: █ To determine the quotient and remainder for division of larger numbers, we can use a calculator for assistance. The process involves getting the quotient by performing the division on the calculator and truncating or chopping all the digits to the right of the decimal point. We illustrate the process in the following example. Example 11 : Calculate the quotient and remainder of the division 1024  37 using a calculator. Solution:

Example 13 : Convert 5123 to base twelve. Solution: