Comprehensive Study Guide to Machine Organization and Computer Architecture
Objectives and Fundamental Foundations of Machine Organization
The primary objectives of this study on machine organization are twofold: first, to provide a comprehensive description of computer architecture, and second, to explain the precise mechanisms by which a computer handles machine instructions. Contemporary examples of central processing units include the Intel Core i9 X-series and the AMD Ryzen . Specific manufacturing and model details for high-performance processors like the AMD Ryzen often include identifiers such as , , and . These units may be diffused in locations such as the USA and Taiwan, and manufactured in China, as seen in the AMD processor models.
The Central Processing Unit (CPU) and Logic Circuitry
The Central Processing Unit, or CPU, is fundamentally defined as the heart of the computer. It consists of the circuitry responsible for controlling the manipulation of data and the execution of instructions. These complex circuits are constructed from basic components known as gates. The primary types of logic gates include NOT, AND, NAND, OR, NOR, and XOR. Each gate performs a specific logical operation based on inputs (labeled A and B) to produce an output (Out). These gates are, in turn, composed of transistors. A modern CPU architecture is incredibly dense, containing millions of transistors within its circuitry. Internal diagrams of processors reveal a complex arrangement of components including multiple cores, the Queue, Uncore, and I/O segments, a shared L3 Cache, the Memory Controller, and System Agents including DMI, Display, and miscellaneous I/O. Processor graphics may also be integrated into this shared architecture.
Moore’s Law and the Evolution of Transistor Count
Moore’s Law is an empirical regularity observing that the transistor count of integrated circuits doubles approximately every two years. This advancement is critical because other dimensions of technological progress, such as processing speed and the price of electronic products, are strongly linked to this doubling effect. Historically, the transistor count has increased exponentially from the year to . Early processors like the Intel (introduced in ) had fewer than transistors. This grew through models like the Intel , , the Motorola , and the MOS Technology . By the mid-, chips like the Intel and Motorola surpassed transistors. The saw the rise of the PowerPC series (, , ) and the Pentium series (, , ), moving into the millions. By the late and early , counts reached the billions, with examples such as the , the , the , and the IBM Z13 Storage Controller. High-end mobile SoCs, such as the Apple A8X and A7, also follow this trend, with counts reaching several billion transistors on a single chip.
CPU Internal Components: ALU, CU, Registers, and Buses
The CPU is comprised of two main functional parts: the Arithmetic Logic Unit (ALU) and the Control Unit (CU). The ALU contains the specific circuitry that performs mathematical and logical operations on data, including addition (), subtraction (), multiplication (), and division (). The Control Unit serves as the coordinator of the computer's activities, including the fetching of instructional code for the program. Within the CPU, there are Registers, which serve as temporary storage locations. Components are physically linked via a Bus, which is the physical arrangement connecting the CPU and the Main Memory. In a full system layout, the ALU, CU, and Registers are interconnected and communicate with the Main Memory through this Bus.
Procedural Example: The Process of Adding Two Numbers
The execution of a simple task, such as adding two numbers, involves a specific four-step sequence within the CPU. First, the system must get one of the values to be added from memory (for example, the value ) and place it into a register. Second, it must get the other value to be added from memory (for example, the value ) and place it into another register. Third, the Control Unit activates the addition circuitry in the ALU, using the two registers as inputs. A third register is typically used to hold the result (in this case, the value , as ). Finally, the CPU stores the resulting value () back into the Main Memory via the bus.
Special Purpose Registers and the Machine Cycle
Inside the CPU, there are two specialized registers essential for operation. The Instruction Register (IR) is used to hold the specific instruction currently being executed. The Program Counter (PC) contains the memory address of the next instruction waiting to be executed. These components facilitate the Machine Cycle, which consists of three distinct phases: Fetch, Decode, and Execute. During the Fetch phase, the CPU retrieves the next instruction from memory and increments the PC to point to the subsequent address. In the Decode phase, the system interprets the bit pattern stored in the Instruction Register. Finally, in the Execute phase, the CPU performs the operation specified by the instruction in the IR.
Machine Instructions and Assembly Language
Each machine instruction consists of two vital parts: the op-code and the operand. The op-code (operation code) indicates which specific operation is being requested by the instruction. The operand provides the necessary information or data required for that operation (such as a memory address or a constant). For example, a jump (jmp) instruction may have an op-code represented by the bit pattern , while the operand might be the address , represented by the bit pattern . Because binary bit patterns are difficult for humans to read, op-codes are assigned mnemonics to simplify programming. Collectively, these mnemonics form an Assembly Language. Basic op-codes include: for LOAD (Load the value of the operand into the accumulator), for STORE (Store the value of the accumulator at the address specified by the operand), for ADD (Add the value in the address given by the operand to the accumulator), and for HALT (Stops execution).
Practical Assembly Language Programming Example
A simple program demonstrates how machine code and assembly code correlate to describe logic. In step , the machine code corresponds to the assembly code "LOAD 2", which loads the value into the Accumulator (ACC). In step , the machine code corresponds to "STORE 13", which stores the current ACC value into memory location . In step , the code translates to "LOAD 5", loading the value into the ACC. In step , the machine code corresponds to "ADD 13", which adds the value previously stored in memory location (which is ) to the current ACC (), resulting in . In step , the code is "STORE 15", which saves the result () into memory location . Finally, in step , the machine code or "HALT" stops the execution of the program.