Home Chemistry Physics HTML
Night More

Revise Now

GCE Subjects

Physics Chemistry CS Accounting

Coding Lessons

Learn HTML Learn SEO

More

What do you want
to do?

Contact us Support




more topic chapters

Processor, Interrupts & Register Notations


Von Neumann architecture

You will need to remember some characteristics of the von neumann architecture.

1. A single processor is used.

2. The processor has direct acces to the memory

3. The model contains a single memory unit which stores both intructions and data - this are called stored programs

4. The instructions are executed one after another in sequence


The CPU

There are many components of the cpu which you have to remember

These include registers, the system buses, the internal clocks and more

The CPU has an internal clock which is also known as the CPU clock. This clock tells us the frequency which the processor operates at. It tells us the number of activities performed by the CPU per second - Ex 1.7GHz means that the system performs 1.7 billion calculations per second

An internal clock is a clock which controls the cycles of activity (clock frequency) of the processor per second

There is also a thing called system clock which controls the cycles or clock frequency of the components out of the processor, this includes the input and out devices.

The system clock controls the number of activities processed per second outside the proccesor.

Usually the system clock is less than the CPU clock.


Registers

A component of the processor which is an area of memory that stores data temporarily in order for fast access of data

There are many registers in the proccesor and you will need to know some of these registers

First of all we need to know that there are two types of registers and they are:


  • General purpose register
  • A register used for general purposes and to store any type of data. An example is the Accumalator(ACC)

    We will also need to know the definition of the accumalator register

    This will be covered below

    You need to know that this register is located in the ALU and it stores the data or value which is currently being executed and after it is executed - Example is when we add a value to the ACC

    Also the accumalator can store one value only at a time


  • Special purpose register
  • These are register which are used for special purposes and they store specific types of data

    There are many special purpose registers you have to know

    Special registers
    Name Abbreviation Definiton
    Memory address register MAR This register holds the address in which data is to be written to or read from the main memory or I/O devices
    Memory data register MDR This register holds the address in which data is read from or to be written to the main memory or I/O devices
    Index register IX Register which is used for indexed addressing - used for vector additions and more
    Program counter PC The register(in the control unit) which holds the address in which instructions or data is to be fetched from
    Current instruction register CIR The register(in the control unit) which stores the instructions and decodes it to opcode and operand. See more below
    Status register SR Contains independant bits which flags a certain condition
    The points related to CIR and SR is important

    SR and CIR

    Most questions asks you to define these two registers - so we will define them in depth:


    • SR
    • The status register contains bits which are independant of each other and they flag a certain event such as an overflow, carry or negative flag


    • CIR
    • The CIR has many functions such as decoding the instructions to operand and opcode. Then the opcode of the instruction is sent to the control unit and the control unit then sends control signals to perform the action and execute the intructions

      The definitions of opcode and operand will be covered in the next lesson


    Control unit

    Is a component of the CPU which sends and receives control signals from other system components. This make sure that data is synchronised and executed in a sequential manner

    The control unit is the same as CU and contains two registers - the CIR and PC


    Arithmetical logic unit

    A component of the CPU which performs arithmetical calculations and comparisons

    It is the same as ALU and contains one general purpose register - the ACC


    System bus

    A set of wires which transmits bits simultaneously (parallel transmission) which allows components in a system to communicate.

    There are 3 types of system buses:


    • Address Bus
    • This bus only carries addresses, usually from the MAR to the memory or I/O

      The bus is unidirectional bus so it can transfer addresses in one direction only

      Usually the bus width of the address bus tell us the maximum number of memory locations in the memory - Ex A 64 bit bus width means 264 memory locations


    • Data Bus
    • This Bus can carry data - which includes instructions and addresses, usually form the memory to the MDR and also from the MDR to the memory.

      This is because the bus is a bidirectional bus which can transfer data both directions


    • Control Bus
    • This bus is used to send control signals to carry out the opcode and also timing signals to make sure the components are synchronised and operating at the same clock freqency.

      This is a bi-directional bus so it can send signals and also receive signals - Example receive signals from I/O

      More on System buses

      There are more things about system buses such as the bus width and the word. We will discus that next.

      But before that we need to know where address buses and control buses and data buses are used

      Address bus - Used to transfer addresses from the CPU to memory or the I/O. Remember this is unidirectional

      Data bus - Used to transfer data back and forth from the I/O or memory to the CPU.

      Control bus - Send signals back and forth from any system component such as the I/O or the memory or other components to the CPU.


      Factors affecting the system performance

      There are few factors which you need to know:

      • Clock frequency and the number of cores
      • Higher clock frequency means that more activities can be done per second and so the execution of programs are faster.

        A core means an independant processor which can perform calculations independantly. So when there are more cores it means more calculations could be performed simultaneously.

      • Word length
      • A defined number of bytes which the system handles as one unit

        The word length is usually same as the bus width

        So the word means how many bits are sent or processed at a time. So usually you computer has an architecture of 32 or 64 bits and this means for each cycle of the clock the CPU processes 32 bits or 64 bits.

        Usually the size of the register is equal to the word length

      • Cache memory
      • Cache memory are not registers but are an area of memory which can store data temporarily for fast access of data. We have discussed this in the hardware chapter.

      • Address bus width
      • This is sometimes given in mark shemes so write this last.

        The bus width of the address bus determines the maximum number of memory locations.

        This is why some computers has a maximum memory of 8 or 4 Gb RAM sticks


        I/O ports

        Input and output devices are very important as they let the user communicate with the applications. However for it to communicate there must be an interface - in order words a translator for the I/O devices to communicate with the CPU

        So that's why we use an I/O controller which is connected between the CPU and the I/O ports

        The I/O ports are used to connect peripheral devices to the system.


        USB

        This stands for universal serial bus

        We call it a bus because it it parallel transmission however this is a bit confusing as it uses both serial and parallel transmission. Serialised and then deserialised

        Usb is used to connect peripheral devices through the USB ports such as your keyboard

        There are some points or advantages you need to know.

        1. The USB is plug and play which means the device could be used and controlled as soon as it is plugged in.

        2. It is now an standard for industrial use

        3. It is supported by many OS

        4. It can only be fitted one way and the newest version is 3.2


        Special multimedia ports

        Usually USB cable would not have a high bandwith and so we need to use other ports such as a VGA ( visual graphics array - blue wire head ) or HDMI (High definition multimedia interface).

        However the HDMI cable has a higher bandwith than VGA and so can transmit higher graphics and also sound/audio whereas VGA can only transmit graphics


        Fetch execute cycle

        The process of instructions stored in the memory being fetched , decoded and executed in sequence is known as the fetch execute cycle

        You need to remember these steps

        1. First there is a check whether there is anymore instructions to be executed

        2. If instructions are required to be executed then the address will be loaded to the PC

        3. The address in the PC will be copied to the MAR and then the PC will increment by 1 and the next address will be loaded

        4. The MAR points to the memory address ( through the address bus ) and the instruction will be fetched and loaded to the MDR

        5. The MDR then sends it to the CIR where it is decoded to the operand and opcode.

        6. The CU will send control signals and excute the instructions - example load a value to the ACC

        7. After one cycle is complete the CPU then looks for any interrupt to be handled - we will discuss this next.


        The above one shows one cycle and sometimes you need to do 2 or more cycles to do a simple calculation.

        Also remember the time taken for the cycle depends on the clock frequency


        Register notations

        The above steps could be written in register notation but there are some rules you need to know.

        MAR ← [PC]MDR ← [[MAR]]; PC ← [PC]+1CIR ← [MDR]

        This is very important to remember . You need to know that the registers which data is stored to is always recorded on the left.

        Also we use [] brackets to show that the contents of that register is transfered

        Sometimes we use double brackets [[]] This is used for [[MAR]] because to highlight that the MAR contains the address which contains the contents or data.


        The next register notation is a bit advanced and this is usually known as the decoding stage where part of the instruction(opcode) is taken and sent to the CU. We will discuss this in the next chapter.

        CU ← [CIR[x:y]]

        Interrupt handling

        Usually interrupt can be caused by several reasons but, we first need to know what an interrupt is.

        An interrupt is a signal generated by the software or hardware which requests the CPU's attention to service it.

        Interrupts are usually caused by:

        1. Hardware faults - example no paper in the printer

        2. Software error

        3. Timing signals - Inorder for programs run simultaneously.

        4. I/O signals - Try holding the shift key for 10 seconds

        5. User interactions


        The CPU must be able to identify the priority of the interrupt and so there is an interrupt register which flags the interrupt type.

        Usually the interrupt service is done at the end of the fetch execute cycle.


        1. Firstly the contents of the execution is stored safe in memory so it can be accessed later.

        2. The CPU then loads and executes the start address of the ISR ( interrupt service routine ) which handles and services the interrupt.

        3. The CPU checks for anymore interrupts (using the interrupt register) and then repeats the execution of the ISR

        4. If no more interrupts are found then the contents are retrieved to the registers and the process continues normally.




        Recommended

        These are things you might like. Clicking these ads can help us improve our free services in the future...


        End of Chapter Questions
        Collection of Topic Questions to understand the topic more.

        Try out


        End of Chapter Videos
        Collection of Videos to Support Your Understanding.

        Remember these videos are handpicked by me and I feel these are one of the best ones out there. But I constantly update this list for each chapter.The Youtubers are more than welcome to contact me.

        Also, don't forget to Subscribe to our Youtube channel - Wiscus


        Watch