ABOUT OF COMPUTER HARDWARE
Computer hardware is the collection of physical parts of a computer system. This includes the computer case, monitor, keyboard, and mouse. It also includes all the parts inside the computer case, such as the hard disk drive, motherboard, video card, and many others. Computer hardware is what you can physically touch.
Modern computers use tiny electronic components which can be etched onto the surface of a silicon chip. Note that silicon (chips, solar panels) and silicone (soft rubbery material) are different!
The most common electronic component is the "transistor" which works as a sort of amplifying valve for a flow of electrons. The transistor is a "solid state" device, meaning it has no moving parts. It is a basic building block used to construct more complex electronic components. In particular, a "bit" (below) can be built with an arrangement of 5 transistors. The transistor was invented in the early 1950's, replacing the vacuum tube. Since then, transistors have been made smaller and smaller, allowing more and more of them to be etched onto a silicon chip.
Suppose you are working on your computer and it suddenly loses power and the screen goes blank. You understand that what you were working on is gone. RAM has been wiped clean, leaving you only with what you last saved to disk (below).
Persistent storage - long term storage for bytes as files and folders. Persistent means that the bytes are stored, even when power is removed. A laptop might use a spinning hard drive (also known as "hard disk") for persistent storage of files. Or it could use a "flash drive", also known as a Solid State Disk (SSD), to store bytes on flash chips. The hard drive reads and writes magnetic patterns on a spinning metal disk to store the bytes, while flash is "solid state": no moving parts, just silicon chips with tiny groups of electrons to store the bytes. In either case, the storage is persistent, in that it maintains its state even when the power is off.
A flash drive is faster and uses less power than a hard disk. However, per byte, flash is significantly more expensive than hard drive storage. Flash has been getting cheaper, so it may take over niches at the expense of hard drives. Flash is much slower than RAM, so it is not a good replacement for RAM. Note that Adobe Flash is an unrelated concept; it is a proprietary media format.
Flash storage is what underlies USB thumb drives, SD cards for use in cameras, or the built-in storage in a tablet or phone.
The hard drive or flash drive provides persistent storage as a flat area of bytes without much structure. Typically the hard disk or flash disk is formatted with a "file system" which organizes the bytes into the familiar pattern of files and directories, where each file and directory has a somewhat useful name like "resume.txt". When you connect the drive to a computer, the computer presents the drive's file system to the user, allowing them open files, move file around, etc.
Essentially, each file in the file system refers to a block of bytes, so the "flowers.jpg" name refers to a block of 48KB of bytes which are the data of that image. The file system in effect gives the user a name (and probably an icon) for a block of data bytes, and allows the user to perform operations on that data, like move it or copy it or open it with a program. The file system also tracks information about the bytes: how many there are, the time they were last modified.
Microsoft uses the proprietary NTFS file system, and Mac OS X has its Apple proprietary HFS+ equivalent. Many devices (cameras, MP3 players) use the very old Microsoft FAT32 file system on their flash cards. FAT32 is an old and primitive file system, but it is good where wide support is important.
Here is the flat "motherboard", a little smaller than a 8.5 x 11 piece of paper, that the various components plug in to. At the center is the CPU. At the far right is the RAM memory. Just to the right of the CPU are a couple support chips. Prominently, one of the chips is covered with a copper "heatsink" .. this presses tightly against the chip, dissipating the heat from the chip into the surrounding air. The CPU also had a very large heatsink, but it was removed to make the CPU visible.
Computer hardware is the collection of physical parts of a computer system. This includes the computer case, monitor, keyboard, and mouse. It also includes all the parts inside the computer case, such as the hard disk drive, motherboard, video card, and many others. Computer hardware is what you can physically touch.
hardware |
Computer Hardware
The computer is an amazingly useful general-purpose technology, to the point that now cameras, phones, thermostats, and more 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.Chips and Transistors
Here is a silicon chip inside its plastic package. I pulled this out of the e-waste pile at the Stanford CS building, so it's probably kind of old. This is a small chip with just a few "pins" of electrical connection. Later we'll see a bigger chip with hundreds of pins.hardware part |
Modern computers use tiny electronic components which can be etched onto the surface of a silicon chip. Note that silicon (chips, solar panels) and silicone (soft rubbery material) are different!
The most common electronic component is the "transistor" which works as a sort of amplifying valve for a flow of electrons. The transistor is a "solid state" device, meaning it has no moving parts. It is a basic building block used to construct more complex electronic components. In particular, a "bit" (below) can be built with an arrangement of 5 transistors. The transistor was invented in the early 1950's, replacing the vacuum tube. Since then, transistors have been made smaller and smaller, allowing more and more of them to be etched onto a silicon chip.
Moore's Law
Moore's law (Gordon Moore, Intel co-founder) states that the density of transistors on a chip doubles about every 2 years or so (sometimes listed as every 18 months). The increase is due to improved chip making technology. It is not a scientific law, just a broad prediction that seems to keep working. More broadly, it captures the idea that per dollar, computer technology (not just transistors) gets exponentially better as time goes along. This is quite clear if you look at the cost or capability of computers/cameras etc. you have owned. Moore's Law results in more capable computers (compare what an iPhone 7 can do vs. the original iPhone) as well as cheaper computers (less capable computers show up everywhere, like in thermostats and cars).Computers in life: Control Systems
Control System / Moore's Flashlight Demo
Computer Hardware - CPU, RAM, and persistent storage
Now let's talk about the three major parts that make up a computer -- CPU, RAM, and Persistent Storage. These three are found in all computers: laptops, smartphones, and tablets.1. CPU
CPU - Central Processing Unit - inevitably referred to as the "brains" of the computers. The CPU does the active "running" of code, manipulating data, while the other components have a more passive role, such as storing data. When we say that a computer can "add two numbers, a billion times a second" .. that's the CPU. When you hit the Run button, the CPU ultimately "runs" your code. Later on, we will complete the picture of how your Javascript code is run by the CPU.Aside: CPU "Cores"
CPU Examples
CPU Variant: GPU - Graphics Processing Unit
2. RAM
RAM - Random Access Memory, or just "memory". RAM is the working scratchpad memory the computer uses to store code and data that are being actively used. RAM is effectively a storage area of bytes under the control of the CPU. RAM is relatively fast and able to retrieve the value of any particular byte in a few nanoseconds (1 nanosecond is 1 billionth of a second). The other main feature of RAM is that it only keeps its state so long as it is supplied with power -- RAM is not "persistent" storage.Suppose you are working on your computer and it suddenly loses power and the screen goes blank. You understand that what you were working on is gone. RAM has been wiped clean, leaving you only with what you last saved to disk (below).
RAM Examples
3. Persistent Storage: Hard Drive, Flash Drive
How a Hard Drive Works Video (Webm is an open standard video format, works in Firefox and Chrome). 4:30 in the video to see some reading/writing of bits.Persistent Storage, Newer Technology: Flash
Persistent storage - long term storage for bytes as files and folders. Persistent means that the bytes are stored, even when power is removed. A laptop might use a spinning hard drive (also known as "hard disk") for persistent storage of files. Or it could use a "flash drive", also known as a Solid State Disk (SSD), to store bytes on flash chips. The hard drive reads and writes magnetic patterns on a spinning metal disk to store the bytes, while flash is "solid state": no moving parts, just silicon chips with tiny groups of electrons to store the bytes. In either case, the storage is persistent, in that it maintains its state even when the power is off.
A flash drive is faster and uses less power than a hard disk. However, per byte, flash is significantly more expensive than hard drive storage. Flash has been getting cheaper, so it may take over niches at the expense of hard drives. Flash is much slower than RAM, so it is not a good replacement for RAM. Note that Adobe Flash is an unrelated concept; it is a proprietary media format.
Flash storage is what underlies USB thumb drives, SD cards for use in cameras, or the built-in storage in a tablet or phone.
File System
The hard drive or flash drive provides persistent storage as a flat area of bytes without much structure. Typically the hard disk or flash disk is formatted with a "file system" which organizes the bytes into the familiar pattern of files and directories, where each file and directory has a somewhat useful name like "resume.txt". When you connect the drive to a computer, the computer presents the drive's file system to the user, allowing them open files, move file around, etc.
Essentially, each file in the file system refers to a block of bytes, so the "flowers.jpg" name refers to a block of 48KB of bytes which are the data of that image. The file system in effect gives the user a name (and probably an icon) for a block of data bytes, and allows the user to perform operations on that data, like move it or copy it or open it with a program. The file system also tracks information about the bytes: how many there are, the time they were last modified.
Microsoft uses the proprietary NTFS file system, and Mac OS X has its Apple proprietary HFS+ equivalent. Many devices (cameras, MP3 players) use the very old Microsoft FAT32 file system on their flash cards. FAT32 is an old and primitive file system, but it is good where wide support is important.
Persistent Storage Examples
Pictures of Hardware
Below are images of a low-end Shuttle computer with a 1.8ghz CPU, 512MB of RAM, and a 160GB hard drive. It cost about $200 in around 2008. It broke, and so became a classroom example.Here is the flat "motherboard", a little smaller than a 8.5 x 11 piece of paper, that the various components plug in to. At the center is the CPU. At the far right is the RAM memory. Just to the right of the CPU are a couple support chips. Prominently, one of the chips is covered with a copper "heatsink" .. this presses tightly against the chip, dissipating the heat from the chip into the surrounding air. The CPU also had a very large heatsink, but it was removed to make the CPU visible.
Comments