Parts of a Computer
You need to have a general idea of the main parts that make up a computer.
Given the complications that exist in modern machines, we will start with what they
were like about 20 years ago. We'll catch up to some extent before the course is over.
- The Central Processing Unit (CPU for short)
- this is the main element
- it's where the action is
- it controls the other parts and uses them to perform its actions
- it has a collection of registers that contain the data that the instructions operate on
- each register has a number and a name (we will start out just using the numbers; we'll use the names later)
- another part of the CPU that we will talk about a lot is the program counter or PC
- it always contains the memory address of the next instruction to be executed
- our primary example for this course is made by a company called MIPS
- it is a reduced-instruction-set computer (RISC for short)
- instructions are very simple
- this saves time in decoding and executing them
- modern software (optimizing compilers and assemblers) is also part of the story here
- previous generations of computers are now known as complex-instruction-set machines (CISC)
- Memory
- instructions are stored here
- data are stored here
- everything is stored as groups of bits
- the two common groups are called bytes and words
- a byte is 8 bits
- the size of a word depends on the machine
- these days it's typically 64 bits
- for a long time before that it was 32 bits
- 40 years ago it was 16 bits
- notice that all these sizes are multiples of 8
- this hasn't always been the case
- we classify machines by their word size; i.e. my laptop is a 64-bit machine
- the MIPS CPU that we use for this course is a 32-bit machine
- External Devices
- these are attached to the computer and are used primarily for input and output
- disks, tapes, keyboards, displays, and networks are some examples
- Buses
- wires
- they connect the other parts together
- parallel buses have one wire for each bit (i.e. 32 wires for our MIPS machine)
- they transmit all the bits at the same time (i.e. in parallel)
- serial buses send the bits one at a time over a single wire
- perhaps you will ponder the meaning of the "SB" in "USB"
- Here's a CPU connected to Memory by Some Buses