
- Like mentioned in the previous article, it is important to know how the major components of the computer work.
- The cycle of Fetch->Decode->Execute is done step by step by the CPU and memory, and this overall cycle is called the 'Execution Cycle.'

- Specifically, the CPU (Central Processing Unit) is consisted like the image above.
- The Control Unit(CU) controls the overall operation of the CPU. It determines & fetch the next instruction to execute. Also, it interprets the instructions, and coordinates various parts of the computer for execution.
- The Arithmetic & Logic Unit(ALU) perform arithmetic & logic operations. Some examples are add, subtract, multiply, and, or, xor etc.
- The set of Registers are high speed memory in CPU. These are Fast n-bit memory in CPU identified by names.
- The Program Counter(PC) holds memory address to fetch the next instruction. It is actually part of the register. Some other special register memory are Instruction Register(IR), Status Register(SR), and Accumulator.
- All of the components mentioned above are connected by an Internal bus. These are a set of wires used to transfer electrical signals. The System bus includes the Data bus(for data transfer), the Address bus(for memory location), and Control bus(Control direction of data flow).
- This overall architecture is called SAM(Simple Architecture Machine).
- In the previous article, CPU was described as having two components, 'Control' for decoding, and 'Datapath' for execution.
- The Control is the control unit, and Datapath are ALU, Registors, and the bus.

- Memory has a full name of RAM(Random Access Memory).
- This means that it takes same access time at any memory location. The term 'Address' is used to access to a particular memory location.
- Since all the controls are based on the operations by the CPU, Read means movement of data from memory to CPU registor, and Write means movement of data from CPU registor to memory.

- Besides Registers in CPU and Main Memory(RAM), there exists Cache and Disk/SSD Storage.
- Memory is more fast accessable if its closer to the CPU.
- Meanwhile, the fast accessable it is, the low capacity it has.
- The memory hierarchy is designed for efficient memory distribuing.


- When we represent 16/32/64 bit number, we either use little endian or big endian.
- For example when we store 1234H, the high-order byte is 12 and low-order byte is 34.
- Little Endian stores number in memory by low-order byte(N)+high-order byte(N+1). Therefore we get to store 34 first, and then 12.
- Big Endian stores number in memory by high-order byte(N)+low-order byte(N+1). Therefore we get to store 12 first, and then 34.

- When dealing with register memory, the Control Unit uses a micro-order(1/0) one control signal on a wire.
- This control signal is used to control all internal/external parts.
- Memory Address Register(MAR) is a interface for the external bus.
- Memory Buffer(data) Register(MBR) is also an interface for the external bus.
- REQ is a signal name on the wire, which initiates memory request.
- WAIT is a signal name on the wire, which generates memory operation complete from the memory to CPU.
- Accessing memory means moving data from the memory to register and vice versa.
- There are four signals sent between the CPU and memory to accomplish this goal.
- First, the address to read goes to MAR, and then on to the address bus.
- Next, REQ rises to 1, and Read/Write Control is sent from the Control Unit to Control bus.
- Next, the Wait drops to 0, which means data is ready, and then data is on the data bus, sent to MBR.
- Lastly, the data on MBR moves to CPU register.
- When writing instead of reading, data is first written in MBR, and then from the second step is processed the same way.
- Specifically, we should fetch the operation which the address is stored in Program Counter(PC), and the operation is stored in memory. The operation moves to MBR, and then goes to Instruction Register(IR).
- 'move' operation moves the operand to register or between register.
- 'load' operation moves data between register and RAM memory.
- 'cmp' operation compares between two register memory, and changes the Status Register(SR) to 1 if same, and 0 if different.
- 'jne' changes Program Counter(PC) depending on certain conditions.
- 'add' operation adds the two numbers in register memory, and save the number in the first operand register memory.
'Computer System' 카테고리의 다른 글
| x86 Processor Architecture (0) | 2021.03.28 |
|---|---|
| Introduction to Assembly Language (0) | 2021.03.28 |
| System Booting Procedures & I/O Operation Control (0) | 2021.03.19 |
| More about Control Unit & Processor Architectures (0) | 2021.03.12 |
| Computer System Organization (0) | 2021.03.10 |