CS1110 Nate Brunelle Today: How do computers? Questions? Last - - PowerPoint PPT Presentation

cs1110
SMART_READER_LITE
LIVE PREVIEW

CS1110 Nate Brunelle Today: How do computers? Questions? Last - - PowerPoint PPT Presentation

CS1110 Nate Brunelle Today: How do computers? Questions? Last Time Paper airplanes Programming Languages How do we solve problems? In ancient times: Today: there was a book that started out with four pictures: first there


slide-1
SLIDE 1

CS1110

Nate Brunelle Today: How do computers?

slide-2
SLIDE 2

Questions?

slide-3
SLIDE 3

Last Time

  • Paper airplanes
  • Programming Languages
slide-4
SLIDE 4

How do we solve problems?

  • In ancient times:
  • Today:
slide-5
SLIDE 5
slide-6
SLIDE 6

…there was a book that started out with four pictures: first there was a wind-up toy; then there was an automobile; then there was a boy riding a bicycle; then there was something else. And underneath each picture, it said "What makes it go?"

slide-7
SLIDE 7

"What makes it go? Everything goes because the sun is shining." “The toy goes because the spring is wound up” "How did the spring get would up“ "I wound it up" "And how did you get moving?" "From eating" "And food grows only because the sun is shining. So it's because the sun is shining that all these things are moving"

slide-8
SLIDE 8

What makes computers go?

One answer:

Sun Plankton Coal Electricity Transistors/memory

slide-9
SLIDE 9

What makes computers go?

Transistors/memory Programs Algorithms

𝑄, 𝑄 ⇒ 𝑅 𝑅

Mathematics

slide-10
SLIDE 10

Software “lifecycle”

1. Requirement

– Generally very Broad

2. Specification

– More precise description of something which fulfills the above requirement – Does not tell exactly what to create, only includes the pieces

3. Design

– How are the pieces arranged?

4. Implementation

– Create something as dictated by the design

5. Testing

– Verify that the implementation satisfies the original requirement

6. Maintenance

– Fix, improve, refine your implementation

slide-11
SLIDE 11

Implementation

slide-12
SLIDE 12

Your homework

1. Requirement

– Project

2. Specification

– Provided

3. Design

– Provided

4. Implementation

– Your job

5. Testing

– Some provided

6. Maintenance

– Ignore

slide-13
SLIDE 13

Python to Physics

CPU Processor RAM “Short term” Memory Disk Long-term Memory

slide-14
SLIDE 14

Python to Physics

  • Requirements -> specification -> design -> “.py”

CPU Processor RAM “Short term” Memory Disk Long-term Memory

.py

My Program

python

Another Program

.pyc

My program’s Meaning Compile “Do stuff” x86-64

slide-15
SLIDE 15

How the CPU works

Represents 1 Represents 0

0V 1V 2V 3V 4V 5V

0s and 1s represent voltages, which are manipulated by transistors

slide-16
SLIDE 16

16

Current in Current out 𝑦 𝑧 Current in Current out Current flows if 𝑦 has voltage NMOS transistor 𝑦

Transistors

Current flows if both of 𝑦 and 𝑧 have voltage

slide-17
SLIDE 17

Want to learn more about these steps?

  • Software Development Lifecycle:

– CS2110, CS3240 (adv. Software)

  • Implementation

– Most CS Classes (notably CS2150, CS4102)

  • Compiling

– CS4610 (PL), CS4620 (compilers), CS4414 (OS)

  • Machine Code

– CS2150, CS3330 (architecture)

  • Math with Transistors

– CS2102 (discrete math), ECE2330 (digital logic design)

  • Transistors to CPUs

– CS3330 (architecture)

Not Mentioned: CS3102 (theory of computation)

slide-18
SLIDE 18

Python vs Pycharm

  • Python

– Language

  • Pycharm

– “tool” for writing python

slide-19
SLIDE 19

How to use Pycharm

  • 1. Open Pycharm
  • 2. Open project
  • 3. Create a python file
  • 4. Name the file
  • 5. Code
  • 6. Run