1 / 25

How Do Computers Work? A Gentle Introduction for Kids

Part 2! How Do Computers Work? A Gentle Introduction for Kids Dr. Arturo Sanchez University of North Florida E-mail: asanchez@unf.edu Web: http://www.unf.edu/~asanchez This presentation: http://www.unf.edu/~asanchez/public/rawlings C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5

Faraday
Télécharger la présentation

How Do Computers Work? A Gentle Introduction for Kids

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Part 2! How Do Computers Work? A Gentle Introductionfor Kids Dr. Arturo Sanchez University of North Florida E-mail: asanchez@unf.edu Web: http://www.unf.edu/~asanchez This presentation: http://www.unf.edu/~asanchez/public/rawlings

  2. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 C9: 6 C10: 7 Initial Remember me?? I’m the Homework!  ? How Do Computers Work? Part II Dr. A. Sanchez

  3. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 C9: 6 C10: 7 Computing … How Do Computers Work? Part II Dr. A. Sanchez

  4. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 C9: 6 C10: 7 Computing … * How Do Computers Work? Part II Dr. A. Sanchez

  5. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 12 C9: 6 C10: 7 Computing … * How Do Computers Work? Part II Dr. A. Sanchez

  6. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 12 C9: 6 C10: 7 Computing … + How Do Computers Work? Part II Dr. A. Sanchez

  7. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 12 C9: 6 C10: 7 18 Computing … + How Do Computers Work? Part II Dr. A. Sanchez

  8. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 12 C9: 6 C10: 7 18 Computing … How Do Computers Work? Part II Dr. A. Sanchez

  9. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 12 C9: 6 C10: 7 18 Computing … * How Do Computers Work? Part II Dr. A. Sanchez

  10. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 5 12 C9: 6 C10: 7 18 18 Computing … * How Do Computers Work? Part II Dr. A. Sanchez

  11. C1: c8 <- c6 * c7 C2: c10 <- c8 + c9 C3: Go to C5 C4: 500 C5: c10 <- c6 * c9 C6: 3 C7: 4 C8: 12 C9: 6 C10: 18 Final! How Do Computers Work? Part II Dr. A. Sanchez

  12. Evaluation … • Who did it right? • If you did not do it right, do you know why? How Do Computers Work? Part II Dr. A. Sanchez

  13. Surprise treat for all! How Do Computers Work? Part II Dr. A. Sanchez

  14. New Rules! • “if (condition) go to CX”, which means: • If the condition is true, go to cell X. • Otherwise, proceed to the next cell. How Do Computers Work? Part II Dr. A. Sanchez

  15. New Rules! • For example, suppose that we have the following configuration … • C1: if (C3 > C2) go to C5 • C2: 20 • C3: 30 • C4: C2 <- C3 + C2 • C5: … • What would you do?? How Do Computers Work? Part II Dr. A. Sanchez

  16. New Rules! • For example, suppose that we have the following configuration … • C1: if (C3 > C2) go to C5 • C2: 20 • C3: 30 • C4: C2 <- C3 + C2 • C5: … • What would you do?? Just in case you do not remember … this means “if the value in C3 is greater than the value in C2” How Do Computers Work? Part II Dr. A. Sanchez

  17. New Rules! • For example, suppose that we have the following configuration … • C1: if (C3 > C2) go to C5 • C2: 20 • C3: 30 • C4: C2 <- C3 + C2 • C5: … • What would you do?? So … since 30 is greater than 20, we go to C5 … and continue from there … How Do Computers Work? Part II Dr. A. Sanchez

  18. New Rules! • “CX <- value”, which means: • Copy the value in question into cell X • For instance, if • C1: C3 <- 30 • C2: 20 • C3: 5 How Do Computers Work? Part II Dr. A. Sanchez

  19. C1: C3 <- 30 C2: 20 C3: 5 C1: C3 <- 30 C2: 20 C3: 5 30 New Rules! Before After How Do Computers Work? Part II Dr. A. Sanchez

  20. New Rules! • “CX <- CY”, which means: • Copy the value in cell X into cell Y • For instance, if • C1: C3 <- C2 • C2: 20 • C3: 5 How Do Computers Work? Part II Dr. A. Sanchez

  21. C1: C3 <- C2 C2: 20 C3: 5 C1: C3 <- C2 C2: 20 C3: 5 20 New Rules! Before After How Do Computers Work? Part II Dr. A. Sanchez

  22. New Rules! • “end”, which means: • End of the game! How Do Computers Work? Part II Dr. A. Sanchez

  23. Questions Before We Play? How Do Computers Work? Part II Dr. A. Sanchez

  24. Let’s Play! • C1: C8 <- 0 • C2: if (C10 = 0) go to C6 • C3: C8 <- C8 + C9 • C4: C10 <- C10 - 1 • C5: go to C2 • C6: end • C7: 0 • C8: 10 • C9: 2 • C10: 3 How Do Computers Work? Part II Dr. A. Sanchez

  25. How Do Computers Work? Part II Dr. A. Sanchez

More Related