Decode Execute cycle of CPU: Most modern processors work on fetch-decode-execute principle. This is also called Von Neumann Architecture.

When a set of instructions is to be executed, the instructions and data are loaded in main memory. The address of the first instruction is copied into the program counter. The execution of an instruction by a processor is divided in three parts. These parts are fetching, decode and execute.

1. Fetch instruction

In the first step, the processor fetches the instruction from the memory. The instruction is transferred from memory to instruction register.

In the following figure, the processor is ready to fetch instruction. The instruction pointer contains the address 0100 contains the instruction MOV AX, 0.

The memory places the instruction on the data bus. The processor then copies the instruction from the data bus to the instruction register.

fetch-instruction

Figure: fetch instruction

2. Decode instruction

In this step, the instruction is decoded by the processor. The processor gets any operand if required by the instruction. For example, the instruction MOV AX, 0. Stores the value 0 in Ax register. The processor will fetch the constant value 0 from the next location in memory before executing the instruction.

In the above figure, the processor transfers the instruction from instruction register to the decode unit. The instruction tells the computer to store 0 into AX register. The decode unit now has all the details of how to do this.

decode-instruction

Figure: decode instruction

3. Execute instruction

In the last phase, the processor execute the instruction, it stores 0 in register AX.

In above figure, the processor execute the instruction MOV AX, 0. Finally it adjusts the instruction pointer to point to next instruction to be executed stored at address 0102.

execute cycle, executing the instruction

Figure: execute cycle, executing the instruction

What are ports? Differentiate between serial and parallel ports.

A port is an interface or point of attachment. It is used to connect peripheral devices with computer such as printers, keyboards or mouse. Each type of port operates at a certain speed. The speed is measured in kilobits per second (kbps) or megabits per second (Mbps).

Types of ports

Different types of ports are as follows:

1. Serial ports

A type of interface that transmits one bit at a time is called serial port. It is usually used to connect devices that do not require fast data transmission like mouse and keyboard etc. Serial ports are often known as communications (COM) ports. Data travels over a serial port at 115 kilobits per second.

2. Parallel ports

A type of interface that transmits many nits at a time is called parallel port. It is used to connect devices that transfer many bits at a time and require fast data transmission like printer and scanner etc. parallel ports are often referred to as line printer (LPT) ports. The speed of parallel ports is 12Mbps.

parallel port fro printer      serial port

parallel port for printer                 serial port

 What is operating system? Name some important operating systems.

An operating system is a set of programs that manages all computer components and operations. A computer cannot do anything without operating system. Operating system must be installed on every computer. Users interact with the computer through operating system.

 When computer is turned on, he operating system runs and checks that all parts of the computer are functioning properly. It manages all operations on the computer after loading in the memory. The following figure shows that an operating system acts as an interface between the user and computer hardware.

computer-operating-system

Important operating systems

Some important operating systems are as follows:

1. Microsoft windows

2. Linux

3. Unix

4. Sun Solaris

5. Mac OS