Introduction to Computing Principles - - PowerPoint PPT Presentation
Introduction to Computing Principles - - PowerPoint PPT Presentation
Introduction to Computing Principles Computer = hardware + software The computer is an amazingly useful general-purpose technology, to the point that now cameras,
Introduction to computing principles Computer Hardware
Computer = hardware + software
- The computer is an amazingly useful
general-purpose technology, to the point that now cameras, phones, thermostats .. these are all now little computers.
- This section will introduce major parts
and themes of how computer hardware works.
- "Hardware" refers the physical parts of the
computer, and "software" refers to the code that runs on the computer.
Introduction to computing principles Computer Hardware
Chips and Transistors (芯片与晶体管)
- Transistor - vital electronic building block
- Transistors are "solid state" - no moving parts
- One of the most important inventions in history
- Silicon chip - fingernail sized piece of silicon
- Chip can contain billions of transistors
e.g. CPU chips, memory chips, flash chips
- Silicon ≠ Silicone (硅元素 ≠ 硅胶)
Computer Hardware Chips and Transistors
Introduction to computing principles Computer Hardware
Silicon chip -- linking to Wikimedia image by Ioan Sameli, CC licensed Computer Hardware Chips and Transistors
Introduction to computing principles Computer Hardware
Moore’s Law(摩尔定律,Gordon Moore, 1965 )
- Transistors get smaller about every 18-24 months
- Can fit twice as many per chip
- Observation vs. "law"
Gordon Moore, Intel co-founder Moore’ Law Computer Hardware Moore’s Law
Introduction to computing principles Computer Hardware
- In effect, transistors/computers get cheaper (powerful)
- Why computers are now in cars, thermostats
- $50 MP3 player bigger every couple years: 2GB, 4GB, 8GB
- Informal Moore’s law: computers cheap, everywhere
Computer Hardware Moore’s Law
Introduction to computing principles Computer Hardware
Computer Hardware Computer architecture
- ENIAC (1946)
- Electronic Numerical Integrator and
Computer
- The first electronic computer
- Cannot store program
- Calculator ≠ Computer
- Rethink about the computer architecture
Introduction to computing principles Computer Hardware
Computer Hardware Computer architecture
- Input/output function Input/output devices
- Memory function Memory Unit
- Calculation function Arithmetic/Logic Unit
- Judgement Function Control Unit
- Self-Control Function
Von Neumann Architecture, 1950
外星人冯诺依曼
Introduction to computing principles Computer Hardware
Computer Hardware Computer architecture
- CPU (Central Processing Unit)
- Brain
- Control Unit
- Arithmetic/Logic Unit
- Memory Unit
- RAM (Random-Access Memory)
- Disk or Flash
Introduction to computing principles Computer Hardware
Computer Hardware CPU
- CPU (Central Processing Unit)
- CPU is the electronic circuitry within a computer that carries
- ut the instructions of a computer program by performing the
basic arithmetic, logical, control and input/output (I/O)
- perations specified by the instructions.
- Brain of the Computer
- CPU= Control Unit + Arithmetic/Logic Unit
My computer performs 2 billion operations per second
Introduction to computing principles Computer Hardware
Computer Hardware RAM
- RAM (Random Access Memory/Memory)
- RAM stores both code and data (temporarily)
- Temporary, working storage bytes
- e.g. new SimpleImage("flowers.jpg")
- -bytes of image loaded into RAM
- e.g. pixel.setRed(0) ... manipulating bytes in RAM
- RAM is "volatile", not "persistent", gone when power goes out
- e.g. You're working on a doc, then power goes out (vs. "Save")
Introduction to computing principles Computer Hardware
Computer Hardware Persistent Storage
- Persistent Storage: Hard Drive, Flash Drive
- Persistent storage
- "Non volatile" .. preserved when not powered
- Hard drive - stores bytes as a magnetic pattern on a spinning disk
- aka "hard disk"
- High pitch spinning sound you may have heard
- Flash drive - stores bytes as electrons in a chip
- aka “Flash memory”, or "SSD" (Solid State Disk)
- "Solid state", no moving parts approach
Introduction to computing principles Computer Hardware
Computer Hardware Persistent Storage
- Persistent Storage: Hard Drive, Flash Drive
- Flash storage forms: USB key, SD card in camera, flash chips
built into a phone or tablet or computer
- Flash used to be very expensive, so most computers used hard
disks
- However flash is getting cheaper (Moore's law)
- Not to be confused with "Adobe Flash", a proprietary media format
- Floppy Drive/Disk
Introduction to computing principles Computer Hardware
Computer Hardware File System
- File System
- Question
- When you take a digital picture, where does it go?
- File system -- organize the bytes of persistent storage
- "File" - a name, a handle to a block of bytes
- e.g. "flowers.jpg" refers to 48KB of image data bytes
Introduction to computing principles Computer Hardware
Computer Hardware What’s Inside My Computer?
Introduction to computing principles Computer Hardware
Computer Hardware
- Below images of a low-end Shuttle computer with a
1.8ghz CPU, 512MB of RAM and a 160GB hard drive.
- Motherboard
- CPU metal package, held by lever
- Copper heatsink
Introduction to computing principles Computer Hardware
Computer Hardware
- CPU chip in metal package
- Heatsink has been removed
- Bottom of package .. many connections (little wires)
Introduction to computing principles Computer Hardware
Computer Hardware
- RAM memory card
- Plugs in to motherboard, 512 MB card (4 chips)
Introduction to computing principles Computer Hardware
Computer Hardware
- 160 GB hard drive (persistent storage)
- Connects to motherboard with standard SATA cable
Introduction to computing principles Computer Hardware
Computer Hardware
- USB thumb drive
- Contains a flash chip, solid state
- SD Card, similar idea
Introduction to computing principles Computer Hardware
Computer Hardware
- Microcontroller - Cheap Computer Chip
- Microcontroller
- Complete computer on a chip
- Small CPU, RAM, storage (Moore's law)
- Chip can cost under $1
- Car, microwave, thermostat
Introduction to computing principles Computer Hardware
Computer Hardware
- This is an “arduino” board, microcontroller chip
(www.arduino.cc)
- As low as $20
- Open source, free, not Windows only, tinkering
- Art project -- switches, sensors, lights