Functional components of a computer Main memory CPU

  • Slides: 16
Download presentation
Functional components of a computer

Functional components of a computer

Main memory CPU Arithmetic/Logic Unit ( ALU ) Control Unit Register(s)

Main memory CPU Arithmetic/Logic Unit ( ALU ) Control Unit Register(s)

Registers • The special storage devices in the CPU that CPU uses over and

Registers • The special storage devices in the CPU that CPU uses over and over again for execution of stored-program instructions. • There are two types of registers : – General purpose registers – Special purpose registers

Registers Examples of special purpose registers : – PC ( Program Counter ) –

Registers Examples of special purpose registers : – PC ( Program Counter ) – IR ( Instruction Register ) – MAR ( Memory Address Register ) – MDR or MBR ( Memory Data Register or Memory Buffer Register ) – PSW ( Program Status Word ) – etc.

Main Memory CPU MDR R 0 R 1 IR PC MAR RN Control unit

Main Memory CPU MDR R 0 R 1 IR PC MAR RN Control unit ALU Data bus Control bus Address bus

Main Memory Operations Memory read operation – Transfers the content of a specific main

Main Memory Operations Memory read operation – Transfers the content of a specific main memory location to the CPU. – The content of the main memory location remains (unchanged).

Main Memory Operations Memory write operation – Transfers a word of information from the

Main Memory Operations Memory write operation – Transfers a word of information from the CPU to a specific main memory location. – Destroys the former content of the main memory location. Memory access time – The time it takes to perform a memory read or a memory write operation.

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU Registers 300 PC 1940 AC IR Step 1 16 bits • PC (Program Counter) ���������� (=30016) • Processor ����� (194016) �������� 30016 �������� IR • PC ������ 1 �������

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU Registers 3 0 1 PC 0003 1940 AC IR 00012 = 116 16 bits Step 2 • Processor ������� (194016) �� IR Ø 4 bits �������� load ������������ 94016

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU Registers 3 0 1 PC 0003 5941 16 bits AC IR Step 3 • ������ (594116) ������������� 30116 ����������� IR • PC ������ 1 �������

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 16

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 16 bits • ������ (594116 ) CPU Registers 3 0 2 PC 0005 5941 AC IR 3+2 = 5 01012 = 516 Step 4 Ø 516 = 01012 ������������� 94116������� AC

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0002 CPU Registers 3 0 2 PC 0005 2941 AC IR Step 5 16 bits • ������ (294116) ������������� 30216 ����������� IR • PC ������ 1 �������

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0005 16

Memory 300 301 302 940 941 1940 5941 2941 : : 0003 0005 16 bits • ������ (294116 ) CPU Registers 3 0 3 PC 0005 2941 00102 = 216 AC IR Step 6 Ø 216 = 00102 ������������� AC ������������� 94116