For example, when the current instruction has been decoded, the next one is fetched and placed in the instruction register. As soon as this occurs, the instruction pointer is updated with the memory address of the next instruction. The use of overlapping instruction cycles is shown in Figure 4.
- What Is A CPU and What Does It Do?
- What Is A CPU?
- CPU overview
- What does the CPU do?
- How the CPU works
- Arithmetic logic unit
- Instruction register and pointer
- How it works
- Cores, clocks, and costs
- How important is the CPU?
- Computer Basics: Inside a Computer
- Lesson 5: Inside a Computer
- RAM (random access memory)
- Expansion cards
- Video card
- Sound card
- Network card
- Bluetooth card (or adapter)
- 1’s and 0’s
What Is A CPU and What Does It Do?
Computer acronyms are confusing. What exactly is a processor? Do I need a quad-core or a dual-core processor? What about AMD or Intel? We’re here to help explain the difference!
Acronyms are a favorite way to make exciting technology sound incredibly confusing. When hunting for a new desktop or laptop, the specs will keep track of the type of processor you’d expect in a shiny new device. Frustratingly, they almost always don’t tell you why it’s so important.
When faced with decisions between AMD and Intel, dual or quad core processors, and an i3 or i7, it can be hard to tell the difference and why it matters. Knowing what’s best for you can be difficult, but we’re here to help.
What Is A CPU?
The Core Processing Unit (CPU) is often referred to as the brain of a computer. This is one of the few processing units, but probably the most important. The processor performs calculations, actions, and runs programs.
In older computers, these functions were split across multiple processors. However, manufacturing and design improvements mean an entire processor can fit into a single chip. That’s why you sometimes hear processors called microprocessors as well.
These smaller sizes mean we can reduce the size of computers to all-in-one devices and have thinner, lighter laptops. These powerful processors are also critical to your smartphone’s performance.
When combined, they make our computers, laptops, tablets, smartphones, and connected hardware more efficient and ultimately more valuable. However, there are many improvements you can make to your current PC to upgrade it and improve performance.
The image below is an example of what the bottom and top of the AMD RYZEN CPU might look like. The processor is housed and secured in a compatible processor socket on the motherboard. Processors generate heat, so they are covered with a heat sink to keep them cool and run smoothly. To facilitate heat transfer between the CPU and the heat sink
As you can see in the image above, the CPU layout is usually square with one corner cut out to make sure it is properly seated in the CPU socket. There are hundreds of connector pins on the bottom of the chip that correspond to the holes in the socket. Currently, most processors are similar to the picture shown above. However, Intel and AMD have also experimented with slot processors. They were much larger and slid into a slot on the motherboard. In addition, several types of sockets have appeared on motherboards over the years. Each socket only supports specific types of CPUs, and each has its own pin layout.
What does the CPU do?
The main function of a processor is to take input from a peripheral device (keyboard, mouse, printer, etc.) or a computer program and interpret what it needs. The processor then either sends the information to the monitor or performs the requested task of the peripheral.
The processor was first invented and developed by Intel with the help of Ted Hoff and others in the early 1970’s. The first processor released by Intel was the 4004 processor shown in the photo.
RAM is your system’s short-term memory. Each time your computer performs a calculation, it temporarily stores data in RAM until it is needed.
How the CPU works
Let’s look at the processor in more detail. Figure 2 is a conceptual diagram of a hypothetical processor that allows for easier visualization of components. RAM and system clock are shaded as they are not part of the CPU and are shown for clarity only. Nor are there any connections between the processor clock and the control unit and the processor components. Suffice it to say that the signals from the clock and the control unit are an integral part of every other component.
Figure 2: Simplified conceptual diagram of a typical processor.
This design doesn’t look particularly simple, but the reality is even more complicated. This number is sufficient for our purposes, but not too complicated.
Arithmetic logic unit
Arithmetic and logic unit (ALU) performs arithmetic and logic functions that are computer work. The A and B registers hold the input data, and the accumulator receives the result of the operation. The instruction register contains the instruction to be executed by the ALU.
For example, when adding two numbers, one number is placed in register A and the other number in register B. The ALU does the addition and places the result in the accumulator. If the operation is logical, the data to be compared are placed in input registers. The comparison result, 1 or 0, is placed in the accumulator. Whether it is a logical or arithmetic operation, the contents of the accumulator are then cached in the cache reserved by the program for the result.
There is another type of operation performed by ALU. The result is an address in memory that is used to compute a new location in memory to begin loading an instruction. The result is placed in the instruction pointer register.
Instruction register and pointer
The instruction pointer specifies a location in memory that contains the next instruction to be executed by the CPU. When the CPU has finished executing the current instruction, the next instruction is loaded into the instruction register from the memory location pointed to by the instruction pointer.
When an instruction is loaded into an instruction register, the instruction register pointer is incremented by one instruction address. Incrementing allows it to be ready to transfer the next instruction to the instruction register.
The processor never accesses the RAM directly. Modern processors have one or more cache layers. The ability of the processor to perform calculations is much faster than the ability of the RAM to transfer data to the processor. The reasons for this are beyond the scope of this article, but I will discuss it further in the next article.
The cache is faster than the system RAM and is closer to the CPU because it is in the CPU chip. The cache provides data storage and instructions that prevent the processor from waiting for the data to be retrieved from RAM. When the processor needs data – and program instructions are also considered data – the cache determines whether the data is already written and delivers it to the processor.
If the requested data is not in the cache, it is retrieved from RAM and uses predictive algorithms to move more data from RAM to the cache. The cache controller analyzes the data requested and tries to predict what additional RAM data will be needed. Loads predicted data into the cache. By keeping some data closer to the CPU in a cache that is faster than RAM, the CPU can stay busy and not waste data waiting cycles.
How it works
The processors operate in a cycle managed by the control unit and synchronized by the processor clock. This cycle is called the processor instruction cycle and consists of a series of get / decode / execute elements. An instruction, which can contain static data or pointers to given variables, is fetched and placed in the instruction register. The instruction is decoded and all data is placed in data registers A and B. The command is executed from registers A and B, and the result goes to the accumulator. The processor then increments the instruction pointer value by the length of the previous instruction and starts over.
The basic instruction cycle of a processor looks like this.
Figure 3: The basic cycle of processor instructions.
To this day, we keep the term CPU, but now it refers to the CPU package on a typical motherboard. Figure 1 shows the standard Intel processor package.
Cores, clocks, and costs
Originally, processors had one processing core. Today’s modern processor consists of multiple cores that allow multiple instructions to be executed simultaneously, effectively cramming several processors onto a single chip. Most processors sold today have two or four cores. Six cores are considered mainstream, while the more expensive chips have eight to a massive 64 cores.
Many processors also use a technology called multithreading. Imagine a single physical processor core that can execute two execution lines (threads) simultaneously and thus appear as two “logical” cores on the operating system side. These virtual cores are not as efficient as physical cores because they share the same resources, but overall they can help improve the processor’s multitasking performance when running compatible software.
Clock speed is clearly advertised when you look at the processors. It’s a “gigahertz” (GHz) number, which effectively represents how many instructions a processor can handle per second, but that’s not the complete picture of performance. When comparing processors from the same product family or generation, clock speed is most often taken into account. When everything else is the same, faster clock speed means faster processor. However, the 2010 3GHz processor will provide less work than the 2020 2GHz processor.
So how much should you pay for the processor? We have some guides where you will find some suggestions for the best processors you can buy. However, for the general outline, unless you’re an avid gamer or someone looking to edit videos, you don’t need to spend more than $ 250. You can help keep costs down by avoiding the latest hardware and sticking to the latest generation CPU instead.
In the case of Intel processors, this means 8th, 9th or 10th generation chips. You can define their generation by the product name. For example, the Core i7-6820HK is the older 6th generation chip, while the Core i5-10210U is the newer 10th generation chip.
AMD does something similar with its Ryzen processors: the Ryzen 5 2500X is the second generation chip based on the new “Zen +” core, while the Ryzen 9 3950X is the third generation processor. The Ryzen 4000 was released as a line of laptop chips and as an APU with very limited availability on desktops by system builders. With that in mind, it may be argued whether the Ryzen 5000 is the fourth or fifth generation of AMD Ryzen processors, but this is the latest, and more recently, AMD has unified its laptop, APU, and desktop platforms under the Ryzen 5000 banner.
How important is the CPU?
Nowadays, the CPU is not as important to the overall system performance as it used to be, but it still plays an important role in the responsiveness and speed of a computing device. Gamers will typically benefit from higher clock rates, while more serious work such as CAD and video editing will benefit from more CPU cores.
Keep in mind that the CPU is part of the system, so you want to make sure you have enough RAM as well as fast storage that can transfer data to the CPU. Perhaps the biggest question mark will be hanging over your graphics card as you usually need a balance in your PC, both in terms of performance and cost.
Now that you understand the role of the processor, you are in a better position to make an informed choice of computer hardware. Use this guide to learn more about the best AMD and Intel chipsets.
Once the instruction is fetched and written to the IR, the CPU passes it on to a circuit called an instruction decoder. This converts the instruction into signals to be passed to other parts of the processor to perform the action.
Computer Basics: Inside a Computer
Lesson 5: Inside a Computer
Have you ever looked inside a computer case or seen pictures of its inside? The small parts may look complicated, but the inside of the computer case isn’t all that mysterious. This lesson will help you master some basic terminology and understand a little more about what is happening inside your computer.
Watch the video below to find out what’s inside your desktop computer.
Are you looking for an old version of this movie? You can still see it here:
The motherboard is the main circuit board of the computer. It is a thin board that contains a processor, memory, hard drive and optical drive connectors, expansion cards for video and sound control, and connections to computer ports (e.g. USB ports). The motherboard connects directly or indirectly to every part of the computer.
The central processing unit (CPU), also known as the processor, is located inside the computer case on the motherboard. Sometimes it is called the brain of a computer and its job is to execute commands. Every time you press a key, click the mouse, or run an application, it sends instructions to the processor.
The processor is typically a two-inch ceramic square with a silicon chip inside. The chip is usually the size of a thumbnail. The processor fits into the processor socket on the motherboard, which is covered by a heat sink, an object that absorbs heat from the processor.
Processor speed is measured in megahertz (MHz) or millions of instructions per second; and gigahertz (GHz) or billions of instructions per second. A faster processor can execute instructions faster. However, the actual speed of your computer depends on the speed of many different components – not just the CPU.
RAM (random access memory)
RAM is your system’s short-term memory. Each time your computer performs a calculation, it temporarily stores data in RAM until it is needed.
This short-term memory disappears when you turn off your computer. If you are working on a document, spreadsheet, or other type of file, you must save it to avoid losing it. When you save a file, the data is saved to your hard drive which acts as a long-term storage.
RAM is measured in either megabytes (MB) or gigabytes (GB). The more RAM you have, the more things your computer can do at the same time. If you don’t have enough RAM, you may find your computer runs slowly when you have multiple programs open. For this reason, many people add extra RAM to their computers to improve performance.
Most computers have expansion slots on the motherboard that allow you to add different kinds of expansion cards. These are sometimes called peripheral component interconnect (PCI) cards. You may never need to add any PCI cards as most motherboards have video, audio, network and more features built in.
However, if you want to increase the performance of your computer or upgrade the capabilities of an older computer, you can always add one or more cards. Below are some of the most popular types of expansion cards.
The graphics card is responsible for what you see on the monitor. Most computers have a graphics processor (graphics processor) built into the motherboard instead of a separate graphics card. If you like playing graphics intensive games, you can add a faster video card to one of the expansion slots for better performance.
A sound card – also known as a sound card – is responsible for what you hear through your speakers or headphones. Most motherboards have integrated audio, but you can switch to a dedicated sound card for higher-quality audio.
The network card allows the computer to communicate over the network and access the Internet. It can connect via an Ethernet cable or over a wireless connection (often referred to as Wi-Fi). Many motherboards have built-in network connections, and you can also add a network card to the expansion slot.
Bluetooth card (or adapter)
Bluetooth is a short-range wireless communication technology. It is often used in computers to communicate with wireless keyboards, mice, and printers. It is usually built into the motherboard or attached to a wireless network adapter. For computers that don’t come with Bluetooth, you can purchase a USB adapter, often referred to as a dongle.
A memory management unit (MMU) manages the flow of data between the main memory (RAM) and the processor. It also provides the memory protection required in multitasking environments and the conversion between virtual memory addresses and physical addresses.