Skip to main content
Mathematics LibreTexts

3.5: Supplementary Topics

  • Page ID
    82992
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    You will need: A Calculator

    So far, we've studied how to change a whole number in a different base to a whole number in Base Ten. It's also possible to work with a numeral that has a decimal point in another base. Look again at the chart for how the place value system worked for a number in Base n. The pattern continues to the left forever.

    \(n^{11}\) \(n^{10}\) \(n^{9}\) \(n^{8}\) \(n^{7}\) \(n^{6}\) \(n^{5}\) \(n^{4}\) \(n^{3}\) \(n^{2}\) \(n^{1}\) \(n^{0}\)

    The model above is sufficient for a whole number. If you are looking at a number that does not have a decimal point, it is implied that the decimal point is to the right of the rightmost digit. We can stretch this model to include a number with decimal points. This is analogous to working with fractions. Following the pattern established above, the place values to the right of the decimal point, in order, are \(n^{-1}, n^{-2}, n^{-3}, n^{-4},\)...

    So, a way to view the various place values in base b is:

    \(\underline{b^{4}} \ \underline{b^{3}} \ \underline{b^{2}} \ \underline{b^{1}} \ \underline{b^{0}} \bullet \underline{b^{-1}} \ \underline{b^{-2}} \ \underline{b^{-3}} \ \underline{b^{-4}} \)

    That big dot in the middle is the decimal point. The place values still go infinitely to the left and also to the right. The above model only shows five places to the left of the decimal point and four places to the right of the decimal point.

    Now, you need to recall from algebra what a negative exponent means. In case you've forgotten, here is the definition of a negative exponent and what it means to have an exponent of zero.

    If \(b \neq 0\) and for any n, \(b^{-n} = \frac{1}{b^{n}}\)

    Example: \(6^{-2} = \frac{1}{6^{2}} = \frac{1}{36}\)

    If \(b \neq 0\), then \(b^{0} = 1\)

    Example: \(8^{0} = 1\)

    Exercise 1

    Simplify by first rewriting each problem so that there are no negative exponents. Simplify each fraction.

    a. \(4^{-1}\) b. \(4^{-2}\) c. \(4^{-3}\)
    d. \(3^{-1}\) e. \(5^{-2}\) f. \(2^{-3}\)

    Let's figure out how to rewrite each of the following numerals in Base Ten.

    Example 1

    \(142.3_{\text{five}}\)

    Solution

    \(\begin{align*} 142.3_{\text{five}} &= (1 \times 5^{2}) + (4 \times 5^{1}) + (2 \times 5^{0}) + (3 \times 5^{-1}) \\ &= (1 \times 25) + (4 \times 5) + (2 \times 1) + (3 \times \frac{1}{5^{1}}) \\ &= 25 + 20 + 2 + \frac{3}{5} \\ &= 47\frac{3}{5} \end{align*}\)

    Exercise 2

    Convert each numeral to Base Ten. Show each of the following steps:

    Step 1: Write the numeral in expanded notation.

    Step 2: Simplify each number that has a positive exponent; rewrite each number that has a negative exponent as a number with a positive exponent.

    Step 3: Simplify each term (terms are separated by addition signs).

    Step 4: Add the terms together. Simplify any fractions if necessary

    a. \(43.2_{\text{eight}}\) =
    b. \(143.7_{\text{eleven}}\) =
    c. \(1111.1_{\text{two}}\)
    d. \(123.2_{\text{four}}\) =

    Here is an example of converting to base ten when the numeral has more than one place after the decimal point.

    Example 2

    \(24.31_{\text{five}}\)

    Solution

    \(\begin{align*} 24.31_{\text{five}} &= (2 \times 5^{1}) + (4 \times 5^{0}) + (3 \times 5^{-1}) + (1 \times 5^{-2}) \\ &= (2 \times 5) + (4 \times 1) + (3 \times \frac{1}{5^{-1}}) + (1 \times \frac{1}{5^{2}}) \\ &= 10 + 4 + \frac{3}{5} + \frac{1}{25} \end{align*}\)

    (To add fractions, you need a common denominator, which is fairly easy in bases since the denominator will be a power of the original base.)

    \(\begin{align*} &= 14 + \frac{15}{25} + \frac{1}{25} \\ &= 14\frac{16}{25} \end{align*}\)

    Exercise 3

    Convert each numeral to Base Ten. Show each of the following steps:

    Step 1: Write the numeral in expanded notation

    Step 2: Simplify each number that has a positive exponent; rewrite each number that has a negative exponent as a number with a positive exponent

    Step 3: Simplify each term (terms are separated by addition signs)

    Step 4: Add like terms together; to add fractions, get a common demominator (it will be a power of the original base.)

    Step 5: Simplify further if necessary. Reduce any fractions if necessary

    a. \(43.21_{\text{six}}\) =
    b. \(231.123_{\text{four}}\) =
    c. \(156.12_{\text{seven}}\)
    d. \(111.101_{\text{two}}\) =
    e. \(222.222_{\text{three}}\)
    f. \(T2E.0T_{\text{twelve}}\) =

    In order to really understand computer technology, you must have the ability to express numbers in base two and sixteen. At first, Base Two (called the Binary System) was used to express computer code. Base Two was the natural choice, since there are only two symbols, 0 and 1. At the most primitive level, electronic computers only know two things, off (0) and on (1). To get a basic feel for how some information gets read into a computer, imagine there are eight switches –switch 1, switch 2, switch 3,..., switch 8. How the computer responds depends on which of the eight switches are turned "on." There are actually 256 (\(2^{8}\)) different configurations possible.

    Imagine that switch 7, switch 2 and switch 1 was turned on. We will use an 8-digit code to show this. It looks like an 8-digit numeral, where the rightmost digit represents switch 1 and the leftmost digit represents switch 8. For our example, there should be a 1 in the spots for switches 1, 2 and 7 and a 0 in the spots for switches 3, 4, 5, 6 and 8. The code looks like this: 01000011. This is read: "off-on-off-off-off-off-on-on." The code 01000011 is really in the format of a Base Two numeral and can be converted to Base Ten. When writing binary code for the computer, base two is implied, but the numeral is not written as a base two number. Code is written 01000011, whereas the base two numeral is written \(1000011_{\text{two}}\).

    Exercise 4

    Using this system of eight switches being either turned on or off, represent the binary code if the switches indicated are turned on. Then, write the base ten numeral (also called decimal numeral) represented by each binary number.

    a. switches that are on: 1, 3, 5, 6:

    Binary Code: ____

    Base ten numeral it represents: ____

    b. switches that are on: 2, 4, 5, 8:

    Binary Code: ____

    Base ten numeral it represents: ____

    c. switches that are on: 3, 5, 7:

    Binary Code: ____

    Base ten numeral it represents: ____

    d. No switches are on:

    Binary Code: ____

    Base ten numeral it represents: ____

    e. All eight switches are one:

    Binary Code: ____

    Base ten numeral it represents: ____

    The binary system is fairly simplistic in that all it comes down to is a sequence of on and off switches. Actually, at the present time, the two electrical states usually used in computers are low voltage and high voltage. Whether we think of positive and negative charges, on and off switches, low and high voltages, etc., the main idea is the same –there are only two states. Although binary is simple on one hand, the disadvantage of the binary system is that even small numbers are made up of lots of digits. For instance, the base ten numeral 50 is written as \(110010_{\text{two}}\) which has 6 digits. The base ten (also called decimal) numeral 1025 is written as \(10000000001_{\text{two}}\) which has eleven digits!

    An intermediate system of numeration, using a larger base, was developed so that the code for the numerals could be written more compactly, with fewer digits. For convenience, a base that was a power of two (making conversion easy) and one that had a reasonable number (not too many) of primary symbols was used.

    In the first example where switches 1, 2 and 7 were on, the binary code was 01000011. Anything that can be typed on a keyboard actually has a special 8-digit code like this one.

    A standard code called ASCII (an acronym for "American Standard Code for Information Interchange") was established in 1968 by the American National Standards Institute. Each separate keyboard symbol (and 32 special control functions, such as the "return" key) was assigned a number from 0 to 127, giving 128 different possibilities. When you type the uppercase letter "C" on the keyboard, the computer codes this little piece of information as 01000011 –more ASCII code is on page 54.

    If I typed my name "JULIE HARLAND" on the keyboard, the computer would code this with 13 eight-digit numerals –one 8-digit numeral for each letter and one for the space in the middle. If I wanted to print out and read the code, I would be looking at 104 digits! To make this task less cumbersome, we can have the computer convert each original 8-digit numeral (which is really just a base two numeral) to a special hexadecimal (base sixteen) numeral, which consists of only two, instead of eight, digits. Note that if I wanted to read the 8-digit numeral as a single-digit numeral, I'd need a base 256 system, which would require 256 different symbols –that would be way too complicated! Here is how the 8-digit binary code 01000011 is converted to the hexadecimal system, making it easier for me to read the code.

    Each 8-digit binary code numeral is broken into two separate 4-digit numerals: 0100 0011. Each 4 digit numeral is converted from base 2 to base 16 (there are 24 , or 16 possibilities for a system with only 4 switches.) But in Base Sixteen, 16 different primary symbols are needed. WE DO NOT USE T for ten, E for eleven AND W for twelve IN BASE SIXTEEN! Instead, these are the 16 symbols used for counting in base 16: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. In other words, A stands for ten, B for eleven, C for twelve, D for thirteen, E for fourteen and F for fifteen. The first group of four digits converts from 0100 in base two to 4 in base ten. 4 in base ten is written as 4 in base sixteen. The second group of four digits converts from 0011 in base 2 to 3 in base ten. 3 in base ten is written as 3 in base sixteen. Therefore, the 8-digit numeral 01000011 is simply written as 43 in hexadecimal.

    Base Eight (the octal system) is another common intermediate system used. One only needs to memorize eight symbols for this system (0, 1, 2, 3, 4, 5, 6, and 7). Base Sixteen is more compact and only requires one to memorize six more than the usual ten in base ten. Using A, B, C, D, E and F for 10,11,12,13,14 and 15 is fairly natural for most people to learn. On the other hand, going to a base 32 (the next power of 2) system would be fairly cumbersome because you'd have to incorporate 22 new symbols. We'll limit our discussion to hexadecimal, and not work in the octal system in this exercise set.

    One more example:

    Example 3

    If switches 8, 7, 5, 4 and 2 are switched on, write the code for this configuration in binary and in hexadecimal. What decimal numeral does this represent?

    Solution

    In binary, the code is 11011010.

    The first 4-digit sequence, 1101, is thirteen in base ten–D in hex; the second 4-digit sequence, 1010, is ten in base ten–A in hex. Therefore, the code in hex is DA. Convert the binary or the hex to base ten to get 218.

    Remember: If writing a "code" then the base is not written it is implied and the binary code is simply written as 11011010 or in hex as DA. If I'm writing a base two numeral, write it as 11011010two or if writing as a hexadecimal numeral, write DAsixteen. Pay attention to the directions!

    Exercise 5

    Write the binary and hex code corresponding to these switches being turned on.

    Note: You already wrote the binary code for these in exercise 4. To check that you write the correct hexadecimal code, convert the base sixteen numeral back to base ten and see if it matches what you wrote for base ten in exercise 4.

    a. switches that are on: 1, 3, 5, 6

    Binary Code: ____

    Hex Code: ____

    b. switches that are on: 2, 4, 5, 8

    Binary Code: ____

    Hex Code: ____

    c. switches that are on: 3, 5, 7

    Binary Code: ____

    Hex Code: ____

    d. No switches are on

    Binary Code: ____

    Hex Code: ____

    e. All eight switches are on

    Binary Code: ____

    Hex Code: ____

    Exercise 6

    Convert each hexadecimal code to binary code, and to a base ten numeral.

    a. Convert 5E to binary code: ____ and to base ten: ____
    b. Convert E5 to binary code: ____ and to base ten: ____
    c. Convert 39 to binary code: ____ and to base ten: ____
    d. Convert 1F to binary code: ____ and to base ten: ____
    e. Convert 98 to binary code: ____ and to base ten: ____
    f. Convert 2A to binary code: ____ and to base ten: ____
    g. Convert 07 to binary code: ____ and to base ten: ____
    h. Convert 40 to binary code: ____ and to base ten: ____

    Part of the ASCII code chart (for only 28 of the 128 possible keyboard strokes) is shown below. The keyboard stroke, the decimal (base ten) numeral, the hexadecimal code and the binary code are given for these 28 keyboard strokes.

    Key Base Ten Hex Binary
    <space> 32 20 00100000
    ! 33 21 00100001
    , 44 2C 00101100
    - 45 2D 00101101
    . 46 2E 00101110
    A 65 41 01000001
    B 66 42 01000010
    C 67 43 01000011
    D 68 44 01000100
    E 69 45 01000101
    F 70 46 01000110
    G 71 47 01000111
    H 72 48 01001000
    I 73 49 01001001
    J 74 4A 01001010
    K 75 4B 01001011
    L 76 4C 01001100
    M 77 4D 01001101
    N 78 4E 01001110
    O 79 4F 01001111
    P 80 50 01010000
    Q 81 51 01010001
    R 82 52 01010010
    S 83 53 01010011
    T 84 54 01010100
    U 85 55 01010101
    V 86 56 01010110
    W 87 57 01010111

    Remember that first numeral we wrote where switches 1, 2 and 7 were on? We wrote this as 01000011, and I mentioned that this is the ASCII code for the letter "C." Look up the code for "C" in the chart –is this starting to make a little more sense?

    In any case, let's get back to how the code for "JULIE HARLAND" would look. We'll do it in both hex and binary, separating the code for each space or letter by a comma. Hex is easier, so let's do that first: 4A, 55, 4C, 49, 45, 20, 48, 41, 52, 4C, 41, 4E, 44. That's all there is to it. It's a code. The computer stores it in binary as: 01001010, 01010101, 01001100, 01001001, 01000101, 00100000, 01001000, 01000001, 01010010, 01001100, 01000001, 01001110, 01000100.

    Note that I've only given you the ASCII code for some of the upper case letters of the alphabet. Code for a lower case letter is different from code for an upper case letter.

    Exercise 7

    Decode the following messages. Part a is in binary and part b is in hex.

    a. 01001001, 00100000, 01001100, 01001111, 01010110, 01000101, 00100000, 01001101, 01000001, 01010100, 01001000, 00100001

    translates to: _____

    translates to: ____

    Exercise 8

    Write each of the following in hexadecimal code and in binary code. Show work.

    a. HELP!

    Hex: ___

    Binary: ____

    b. BE HAPPY. Note: I bet you can figure out the code for the “Y” if you try!

    Hex: ___

    Binary: ____

    c. Write your first name in Hex and Binary. Be sure to include your work.

    Exercise 9

    Convert the following Base Ten numerals to binary and to hexadecimal. In this case, you aren't being asked to write a code, so remember to write the base to the right and a little below each numeral as with converting to any other base. Show all work

    a. 73
    b. 122
    c. 50
    d. 250
    e. 1000

    This page titled 3.5: Supplementary Topics is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Julie Harland via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.