When I think of computers, I often like to relate them to robots, when I think of robots, I think them to be electronic humans. So subsequently, I believe computers to be electronic humans. (This is my belief, if you think otherwise that’s completely cool!)
But let me tell you why, so humans beings we do a whole lot of things right? We eat, we sleep, we think, we cry, we laugh etc. so as humans we need parts of bodies that allow us to do these things. For example, our eyes for sight, our feet for walking, and spidery senses to alert us when something bad is about to happen and of course our brain to interpret every single thing we do and store up everything we learn or experience. Yes every emotion, action, is stored up in our brain (if you don’t believe me, watch INSIDE OUT).
Well same goes for computers! They have input devices to help them accept data, they have, output devices to allow us send data and of course they have a brain. How these brain differs though is that we have to tell the brain how to operate by programming it.
So this week, we want to explore the computer brain, we want to see what makes it tick, what makes it upset and what makes it happy so yes we are going INSIDE OUT our computer.
We will be looking at the various components that make up the computer’s brain and we would look at what makes the brain think fast or slow. It’s pretty cool! So let’s get started
PURPOSE OF THE CPU
The CPU is often described as the ‘brain’ of the computer (although that isn’t a technical term so don’t write it in an exam). The CPU is an electronic chip called a microprocessor). The CPU fetches instructions from main memory (RAM), it decoded them and then executed them. The instructions are provided by a computer program
The purpose of the CPU is to process data. It is where all the searching, sorting, calculating and decision-making takes place within the computer.
It also controls all the other component parts of the computer example:
• Hard disk
• DVD drive
• Sound System
• Graphics System
PARTS OF THE CPU (The central processing unit CPU consists of
THE CENTRAL PROCESSING UNIT
The diagram below shows the arrangement of these components within. Take note of the buses
There are three main buses connecting all the parts together. These are the Data bus, Address Bus and the Control buses.
FACTORS THAT AFFECT THE CPU PERFORMANCE
There are a number of things that determine the performance level of a CPU. We will only highlight a few important ones these are :
• Clock speed
• Number of Cores
• Cache (internal and external)
CPU – FETCH DECODE AND EXECUTE CYCLE
Have you ever wondered how an instruction is sent into a computer? I mean how does it get from the keyboard to the CPU and then back to the Monitor?
How does a computer know that 2 + 2 = 4? What does the data inside of the computer look like? Can the computer actually recognize the data same way we see it or is it just a bunch of electronic signals? Ok how do these signals get from one place to another? Canoe? Train? Bikes? Walking? Flying or by bus? (Actually you won’t believe this but there are buses inside your system.).
Well in Computer Science. There is something called the Fetch – Decode- Execute Cycle. This is the cycle that tells us the life cycle of an instruction. Everything that happens within the computer undergoes the FDE yes even something as simple as opening a folder on your computer.
We won’t of course use any complex examples this week. But I am excited to show you how these actually work.
Take note of all the registers and buses involved.
HERE IS A PICTURE OF A MOTHERBOARD (PRECISELY INTEL PENTIUM)
Notice that on the motherboards, all the main functional units are interconnected to enable data transport.
The unit to unit interconnections is referred to as busses. The Fetch-Decode-Execute cycle is the basic method used by the CPU to carry single instruction contained in a computer program
The diagram below shows the software to be run is located in main memory (RAM) usually the operating system loads it, ready for the CPU to use. The very first instruction in the program needs to be loaded into the CPU (fetch)
The fetch action loads an instruction into the CPU then the decode and execute stage take place inside the CPU. Once the first cycle the complete, the CPU fetches the next instruction
The Memory Registers required in the FDE are :
• Program Counter (PC)
• Current Instruction Register (CIR)
• Memory Data Register (MDR)
• Memory Address Register (MAR)
- The PC ( Program Counter) copies the address of the next instruction it contains into MAR ( Memory address register) ]
- The PC increments by one to point to the next memory location
- The content of the MAR is transferred through the address bus into memory where it is read
- After the content has been read , the data contained in the address location is transferred via the data bus into the buffer register and copy is sent to the instruction register
- At this state the fetch is complete
The Control Unit in the CPU takes over the instruction and works out ( decodes) its meaning/what has to be done
The mathematical or logical computations are carried out (depending on the instruction) and the result is stored to register
The ACCUMULATOR is used in adding a sequence of number. The numerical value in the accumulator increases as each number is added, exactly as it happens in a simple calculator (but much faster of course). Once the sum has been determined, it is written to the main memory or to another register.
Also read: How to Learn Anything Fast and Remember it