Elementary Computing CSC 100 2014-07-14 M. Cheng, Computer Science 1
CPU and Memory Inside of a computer CPU and RAM Clock Speed & Multi-core Microprocessor How a CPU works Secondary Storage 2014-07-14 M. Cheng, Computer Science 2
Outcomes The brain of a computer is the CPU. The motherboard is populated with CPU, memory and I/O devices. A program must be loaded inside the RAM before it is executed. The CPU fetches, decodes and executes instructions one after another. Secondary memory is non-volatile for storing larger amount of program or data. 2014-07-14 M. Cheng, Computer Science 3
Study Guide What is inside a computer? What is a CPU? What is RAM, ROM, Flash memory? What is a system bus? What is a motherboard? 2014-07-14 M. Cheng, Computer Science 4
Study Guide What is a CPU clock? What is the fetch-decode-execute cycle? What is volatile vs non-volatile memory? What is a multi-core processor? 2014-07-14 M. Cheng, Computer Science 5
Inside a Computer 2014-07-14 M. Cheng, Computer Science 6
Central Processing Unit (CPU) Primary Memory (RAM) 2014-07-14 M. Cheng, Computer Science 7
Typically, a computer uses a motherboard to populate the CPU, Memory, and I/O Devices. 2014-07-14 M. Cheng, Computer Science 8
The system bus is the set of wires connecting CPU, Memory and I/O devices. 2014-07-14 M. Cheng, Computer Science 9
A Desktop PC Motherboard Memory goes here CPU I/O Devices go here 2014-07-14 M. Cheng, Computer Science 10
A Macbook Laptop Motherboard CPU I/O Devices go here Memory goes here 2014-07-14 M. Cheng, Computer Science 11
RAM Memory Modules (for Desktop Computer) (for Laptop) 2014-07-14 M. Cheng, Computer Science 12
Input / Output Devices Mouse Keyboard Printer Monitor Scanner Hard drives CD ROM 2014-07-14 M. Cheng, Computer Science 13
A Brief History of Microprocessors (CPU) 2014-07-14 M. Cheng, Computer Science 14
A microprocessor is a CPU built into an Integrated Circuit (IC). 2014-07-14 M. Cheng, Computer Science 15
In 1972, Intel created the first microprocessor 4004. 2014-07-14 M. Cheng, Computer Science 16
Inside an Early Microprocessor 2014-07-14 M. Cheng, Computer Science 17
Modern Microprocessors 2014-07-14 M. Cheng, Computer Science 18
Inside a Modern Microprocessor 2014-07-14 M. Cheng, Computer Science 19
Central Processing Unit (CPU) 2014-07-14 M. Cheng, Computer Science 20
The Brain of a Computer A CPU defines a set of instructions that a computer can understand. A program is a sequence of CPU instructions. When a program is executing, the CPU follows the instructions prescribed in the program. 2014-07-14 M. Cheng, Computer Science 21
The Heart of a CPU A CPU executes one instruction after another. The CPU clock (i.e., its heart ) regulates all activities going on inside; it is measured in Hz, times per second. The faster the clock, the faster the CPU; 3 GHz is about 3 times faster than a 1 GHz CPU. 2014-07-14 M. Cheng, Computer Science 22
CPU Cores Modern microprocessors often have more than one CPU per chip. A dual-core microprocessor means 2 CPUs inside; a quad-core means 4 CPUs inside. Generally, the more the cores, the faster the microprocessor. 2014-07-14 M. Cheng, Computer Science 23
2014-07-14 M. Cheng, Computer Science 24
Nvidia ARM Microprocessor 2014-07-14 M. Cheng, Computer Science 25
Primary Memory (RAM) 2014-07-14 M. Cheng, Computer Science 26
Random Access Memory (RAM) A computer has both primary memory (RAM) and secondary memory (e.g., hard drives). A program must be stored inside the RAM before a CPU can execute it. RAM is volatile; it loses its content if not powered. 2014-07-14 M. Cheng, Computer Science 27
RAM ranges from 1 GB to 4GB, and costs around $10 per GB. 2014-07-14 M. Cheng, Computer Science 28
What is a Program? 2014-07-14 M. Cheng, Computer Science 29
Joseph Marie Jacquard 2014-07-14 M. Cheng, Computer Science 30
Joseph M. Jacquard designed a machine, called the loom, in 1801 for knitting. 2014-07-14 M. Cheng, Computer Science 31
Jacquard Loom 2014-07-14 M. Cheng, Computer Science 32
Features of a Jacquard Loom Weaving patterns are described by a sequence of punch cards. Each punch card specifies which needle is up (no hole) or down (a hole) There is a mechanism to read the punch cards one-by-one. 2014-07-14 M. Cheng, Computer Science 33
The Punch Cards 2014-07-14 M. Cheng, Computer Science 34
Jacquard Loom Punch Cards 2014-07-14 M. Cheng, Computer Science 35
Jacquard Loom Close Up 2014-07-14 M. Cheng, Computer Science 36
The Loom & The CPU A program (or a weaving pattern ) is a sequence of instructions (or punch cards ). The CPU (card reader) reads an instruction (a punch card) and then executes it. Each punch card is a binary instruction (e.g., a hole means down, no hole means up.) 2014-07-14 M. Cheng, Computer Science 37
How a CPU works (Fetch) A CPU reads one instruction at a time from the memory, typically RAM. (Decode) For each instruction read, it determines what the instruction is about. (Execute) It does what the instruction says. It repeats Fetch-Decode-Execute forever. 2014-07-14 M. Cheng, Computer Science 38
Punch Cards & RAM The Loom uses a fixed sequence of punch cards to store a predefined weaving pattern. In a computer, a program must be loaded into RAM before the CPU can execute it. By loading different programs into RAM, a computer can perform different tasks at different times. 2014-07-14 M. Cheng, Computer Science 39
Secondary Memory 2014-07-14 M. Cheng, Computer Science 40
A Hard Drive 2014-07-14 M. Cheng, Computer Science 41
Inside a Hard Drive 2014-07-14 M. Cheng, Computer Science 42
A hard drive is between 512 GB to 4 TB. It costs about $0.1 per GB. 2014-07-14 M. Cheng, Computer Science 43
RAM is about 1,000,000 times faster than a hard drive. 2014-07-14 M. Cheng, Computer Science 44
A hard drive is about 100 times cheaper than RAM per GB. 2014-07-14 M. Cheng, Computer Science 45
The more RAM a computer has, the faster it can run. 2014-07-14 M. Cheng, Computer Science 46
Magnetic Floppy Disks 2014-07-14 M. Cheng, Computer Science 47
Floppy Drives 2014-07-14 M. Cheng, Computer Science 48
Before hard drives became affordable, most personal computers only use floppy drives. 2014-07-14 M. Cheng, Computer Science 49
Flash memory is a special kind of non-volatile secondary memory, which has no moving part. 2014-07-14 M. Cheng, Computer Science 50
Solid-State Drive (or SSD) 2014-07-14 M. Cheng, Computer Science 51
Flash memory is about 10 times faster than a hard drive; but it costs about 10 times more. 2014-07-14 M. Cheng, Computer Science 52
All secondary memory are nonvolatile; they are used primarily for archiving and backup. 2014-07-14 M. Cheng, Computer Science 53
The End. 2014-07-14 M. Cheng, Computer Science 54