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 536005 3600. Specific manufacturing and model details for high-performance processors like the AMD Ryzen often include identifiers such as 100000000031100-000000031, BF1922SUTBF 1922SUT, and 9HM6198R901289HM6198R90128. These units may be diffused in locations such as the USA and Taiwan, and manufactured in China, as seen in the 20192019 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 19711971 to 20162016. Early processors like the Intel 40044004 (introduced in 19711971) had fewer than 5,0005,000 transistors. This grew through models like the Intel 80088008, 80808080, the Motorola 68006800, and the MOS Technology 65026502. By the mid-1980s1980s, chips like the Intel 8028680286 and Motorola 6802068020 surpassed 100,000100,000 transistors. The 1990s1990s saw the rise of the PowerPC series (601601, 603e603e, 604604) and the Pentium series (PentiumProPentium Pro, PentiumMMXPentium MMX, PentiumIIIPentium III), moving into the millions. By the late 2000s2000s and early 2010s2010s, counts reached the billions, with examples such as the 61-core Xeon Phi61\text{-core Xeon Phi}, the 12-core POWER812\text{-core POWER8}, the 22-core Xeon Broadwell-E522\text{-core Xeon Broadwell-E5}, 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 (StandardStandard -), multiplication (×\times), 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 55) and place it into a register. Second, it must get the other value to be added from memory (for example, the value 22) 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 77, as 5+2=75 + 2 = 7). Finally, the CPU stores the resulting value (77) 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 0000100000000000000010 00000 00000, while the operand might be the address 10241024, represented by the bit pattern 000001000000000000000 10000 000000. 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: 001001 for LOAD (Load the value of the operand into the accumulator), 010010 for STORE (Store the value of the accumulator at the address specified by the operand), 011011 for ADD (Add the value in the address given by the operand to the accumulator), and 100100 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 00, the machine code 0010010001 0010 corresponds to the assembly code "LOAD 2", which loads the value 22 into the Accumulator (ACC). In step 11, the machine code 0101101010 1101 corresponds to "STORE 13", which stores the current ACC value into memory location 1313. In step 22, the code 0010101001 0101 translates to "LOAD 5", loading the value 55 into the ACC. In step 33, the machine code 0011101001 1101 corresponds to "ADD 13", which adds the value previously stored in memory location 1313 (which is 22) to the current ACC (55), resulting in 77. In step 44, the code 0101111010 1111 is "STORE 15", which saves the result (77) into memory location 1515. Finally, in step 55, the machine code 1000000100 0000 or "HALT" stops the execution of the program.