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 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?"
"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"
What makes computers go? One answer: Sun Plankton Coal Electricity Transistors/memory
What makes computers go? 𝑄, 𝑄 ⇒ 𝑅 𝑅 Mathematics Algorithms Programs Transistors/memory
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
Implementation
Your homework 1. Requirement – Project 2. Specification – Provided 3. Design – Provided 4. Implementation – Your job 5. Testing – Some provided 6. Maintenance – Ignore
Python to Physics Processor “Short term” Memory CPU RAM Long-term Memory Disk
Python to Physics • Requirements -> specification -> design - > “. py ” My Program Another Program My program’s Meaning Compile .py python .pyc “Do stuff” x86-64 Long-term Memory Processor “Short term” Memory CPU Disk RAM
How the CPU works 5V Represents 1 4V 3V 2V Represents 0 1V 0V 0s and 1s represent voltages, which are manipulated by transistors
Transistors NMOS transistor Current in Current in 𝑦 𝑦 𝑧 Current out Current out Current flows if 𝑦 has voltage Current flows if both of 𝑦 and 𝑧 have voltage 16
Want to learn more about these steps? Not Mentioned: • Software Development Lifecycle: CS3102 (theory of computation) – 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)
Python vs Pycharm • Python – Language • Pycharm – “tool” for writing python
How to use Pycharm 1. Open Pycharm 2. Open project 3. Create a python file 4. Name the file 5. Code 6. Run
Recommend
More recommend