The Central Processing Unit (CPU) is the main component of a computer responsible for carrying out instructions. It performs calculations and makes decisions that allow software to run, which is why it's often called the "brain" of the computer.
The CPU executes programs using the fetch-decode-execute cycle, also known as the instruction cycle. In this cycle, the CPU fetches an instruction from memory, decodes it to understand what action is required, and then executes it. This cycle repeats continuously from the moment the computer is powered on until it is shut down.
The clock speed, also known as the clock rate, is measured in hertz (Hz) and indicates how many instruction cycles a CPU can perform per second. Most modern CPUs operate between 2 and 6 gigahertz (GHz), meaning they can execute billions of cycles each second.
Every CPU understands its own machine language, which defines how binary code translates into specific operations. These operations make up the CPU's Instruction Set Architecture (ISA), the set of basic commands the processor can execute directly.
These operations are categorized into data transfer, arithmetic/logic, control flow, and input/output.
MOV, PUSH/POP, IN/OUT). ADD, SUB, AND/OR). JMP, JNE, RET). The main components of a CPU include the:
Together, these components allow the CPU to process data and execute instructions efficiently, making it one of the most essential parts of any computer system.
Random Access Memory (RAM) is a type of temporary, high-speed storage that holds program instructions and data so the CPU can access them quickly. Each piece of data in RAM has a specific memory address, allowing the CPU to read or write information efficiently. RAM is volatile, meaning it only retains data while the computer is powered on - if power is lost, so is the data. When a computer begins its startup process, the operating system along with any other programs are loaded in from secondary storage into RAM to allow fast execution.
The amount and speed of RAM in a system directly impact performance: more RAM allows multiple programs to run simultaneously, and faster RAM reduces delays when the CPU accesses data.
RAM is an essential part of the computer's memory hierarchy, sitting between the ultra-fast CPU caches and slower long-term storage. While standard RAM is volatile, some specialized types, like non-volatile RAM (NVRAM), can retain data even without power, through these are less common in typical PCs.
Overall, RAM plays a critical role in ensuring smooth operation, whether it's for running applications, buffering video, or performing complex calculations.
Read-Only Memory (ROM) is a type of non-volatile computer memory that stores essential instructions permanently, meaning it retains data even when the power is off. It is primarily used to store firmware (BIOS or UEFI) in a computer, which are necessary for the device to start up and boot the operating system. ROM is primarily read-only, meaning it's difficult or near impossible to change during normal operation. However, modern variations like EEPROM and Flash memory allow for data to be rewritten, though they are still used for persistent storage and critical functions. ROM also has a smaller capacity than RAM and is usually only in MBs in size.
The motherboard is the main printed circuit board for a computer. It connects all the internal components, provides power, and allows them to communicate with each other. It acts like the central hub or backbone of the system.
There are two primary types of storage devices that store data long-term in a computer: hard disk drives and solid state drives.
The Hard Disk Drive (HDD) is a long-term data storage device that uses rotating magnetic platters to store data persistently. HDDs are significantly slower at reading and writing than SSDs, but are also less expensive.
The Solid State Drive (SSD) is a long-term data storage device that uses integrated circuits, or flash memory, to store data persistently. SSDs are significantly faster at reading and writing than HDDs, but are also more expensive.
The Power Supply Unit (PSU) provides power to the internal electrical components inside a computer. The power supply converts alternating current (AC) electrical power from a wall socket to low-voltage regulated direct current (DC) electric power for the internal components of a computer.
Inside a computer, there are millions and millions of microscopic switches called transistors. Transistors are little devices used to control electrical signals and can be either be off (no current flow) or on (current current flow). They are one of the basic building blocks of modern electronics because they can be used to represent binary data.
Transistors are semi-conductors that are made using a semi-conductive material called silicon. Semi-conductors live between a conductor, where current flows freely, and an insulator, where current doesn't flow freely, meaning they allow current to flow freely some of the time. A voltage or current can be applied to a transistor to change its state.
Transistors have three terminals - the collector, the base or gate, and the emitter.
Both RAM and data storages devices are measured in terms of their total byte capacity.
Common Amounts of Storage in Bytes:
Note: When something is being stored on a data storage device, all that is being stored is binary (1s and 0s).