You rush a miraclemaker and you get lousy miracles. - PowerPoint PPT Presentation

Loading...

PPT – You rush a miraclemaker and you get lousy miracles. PowerPoint presentation | free to view - id: 137967-Y2FhY



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

You rush a miraclemaker and you get lousy miracles.

Description:

'You rush a miracle-maker and you get lousy miracles. ... Said to be confusing, but after practice, it is not. A lot like normal decimal division ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 18
Provided by: alcar4
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: You rush a miraclemaker and you get lousy miracles.


1
You rush a miracle-maker and you get lousy
miracles.
http//www.imdb.com/title//
  • Billy Crystal in The Princess Bride (1987)

2
Computer Science 101Lecture 8
www.pjrc.com/tech/ 8051/board5/schematic.gif
  • Spring Semester 2008
  • Monday, January 28
  • Week 4/18
  • Albert H. Carlson

3
Announcements
  • HW 2 is due on Friday, February 8

4
Division
  • Said to be confusing, but after practice, it is
    not
  • A lot like normal decimal division
  • Remember, you can only use 1 and 0. Either it
    goes in, or it does not. It is that simple
  • Set it up just like you normally do for decimal
    division

5
An Example
0110/0010
Lets forget the leading 0s on 0010
0
0
1
1
10 / 0110
10
1
0
10
6
Practice Problems
1010/0011
11r1
1101/0010
110r1
7
Convert Between Bases
  • Sometimes it is important to be able to convert a
    number in one base to another
  • We are primarily concerned with decimal to
    binary, and back
  • Sometimes we need to convert from strange bases
    to other bases
  • Fortunately, the procedure is easy and very
    regular

8
  • We are going back to what we did on binary
  • Here we make columns based on powers of the base
  • Usually, it is easiest to convert to base 10 and
    then convert to the target base

b0
b1
b2
b3

bn
9
  • What we do is to calculate the value of the
    number in base 10. We have done this before
  • Next, we create the columns in the target base
  • Then we figure out how much goes in each of the
    new columns in the target base

10
An Example
21123 to base 7
27 9 3 1
68
  • Convert to base 10

2 1 1 2
- 0 68
1a. Make the base column list
2. Calculate the Sum
1
7
49
343
-49 19
2 1 2
3. Make the target base column list
0
1
2
5
1 3 3
1 9 9
-14 5
2 27 54
21123 01257
68
-5 0
Stop when the column is MORE than the number
4. Start subtracting from highest number
11
Practice Problems
1000002 to Hex
20H
72158 to decimal
3725
73209 to base 5
124305
12
MSB and LSB
  • When we write a number, we need to know what
    order it is written in
  • By convention we make the smallest number column
    on the right
  • Because this column has the lowest weight, it is
    called the Least Significant Bit, or LSB
  • The column on the left is the Most Significant
    Bit, or MSB

M L S S B B 1000000
13
Big vs Little Endian
  • Big Endian
  • L M
  • S S
  • B B
  • Little Endian
  • M L
  • S S
  • B B

14
Statistics
  • A common use of the computer is to take and
    analyze statistics
  • Statistics are used to find underlying
    information about data
  • It starts by asking a question that can be
    characterized by data
  • Then you go off and collect data about the
    question and record it

15
The Solution Space
  • Lets say we want to measure something about an
    experiment
  • We will define an experiment as a repeatable
    test, like flipping a coin
  • All of the possible outcomes of the experiment
    can be listed in a space, called the solution
    space

16
Solution Space
  • For example, the solution space for flipping a
    coin is
  • Head,Tail
  • For rolling a dice the solution space is
  • 1,2,3,4,5,6
  • For one of my exams, the solution space is
  • 0,100

17
Questions?
About PowerShow.com