DDCO Module 3 Chapter 1
DDCO Module 3 Chapter 1
MODULE-1
Basic Structure of Computers: Basic Operational Concepts, Bus Structures, Performance –
Processor Clock, Basic Performance Equation, Clock Rate, Performance Measurement.
Machine Instructions and Programs: Memory Location and Addresses, Memory Operations,
Instructions and Instruction Sequencing, Addressing Modes, Assembly Language, Basic Input and
Output Operations, Stacks and Queues, Subroutines, Additional Instructions, Encoding of Machine
Instructions.
Arithmetic: Numbers, Arithmetic Operations and Characters, Addition and Subtraction of Signed
Numbers, Design of Fast Adders, Multiplication of Positive Numbers, Signed Operand
Multiplication, Fast Multiplication, Integer Division.
Input device accepts the coded information as source program i.e. high level language. This is
either stored in the memory or immediately used by the processor to perform the desired operations.
The program stored in the memory determines the processing steps. Basically the computer
converts one source program to an object program. i.e. into machine language. Finally the results
are sent to the outside world through output device. All of these actions are coordinated by the
control unit.
Input unit:
Computer accepts coded information through input devices.
Keyboard is a most common type. Whenever a key is pressed, one corresponding word or
number is translated into its equivalent binary code over a cable to either memory or processor.
Microphones can be used to capture audio input which is then sampled and converted into
digital codes for storage and processing.
Joysticks, trackballs, mouse, scanners etc are other input devices.
Memory unit: -
Its function is to store programs and data. It is basically to two types:
1. Primary Storage
The fig shows how memory & the processor can be connected. In addition to the ALU & the
control circuitry, the processor contains a number of registers used for several different purposes.
The instruction register (IR): Holds the instructions that is currently being executed. Its output is
available for the control circuits which generates the timing signals that control the various
processing elements in one execution of instruction.
The program counter (PC): This is a specialized register that keeps track of execution of a
program. It contains the memory address of the next instruction to be fetched and executed.
Besides IR and PC, there are n-general purpose registers R0 through Rn-1.
The other two registers which facilitate communication with memory are:
1. Memory Address Register (MAR): It holds the address of the location to be accessed.
2. Memory Data Register (MDR): It contains the data to be written into or read out of the
addressed location.
Operating steps are
1. Programs reside in the memory & usually get these through the input unit.
2. Execution of the program starts when the PC is set to point at the first instruction of the program.
3. Contents of PC are transferred to MAR and a Read Control Signal is sent to the memory.
4. After the time required to access the memory elapses, the addressed word is read out of the
memory and loaded into the MDR.
5. Contents of MDR are transferred to the IR & now the instruction is ready to be decoded and
executed.
6. If the instruction involves an operation by the ALU, it is necessary to obtain the required
operands.
7. An operand in the memory is fetched by sending its address to MAR & Initiating a read cycle.
Since the single bus structure can be used for only one transfer at a time, only two units can
actively use the bus at any given time. Bus control lines are used to arbitrate multiple requests for
use of one bus.
Advantages of Single bus structure is
⚫ Low cost
Compiler: It is a System software program that translates high level language program into
machine language program.
Text Editor: It is used for entering and editing application programs.
Operating System(OS):
⚫ It is the interface between the user and computer hardware.
⚫ Manages all the resources of computer system.
⚫ Assigns memory and magnetic disk space to program and data files.
⚫ Issues commands for moving data between data and memory units.
⚫ Handling I/O operations.
Let us examine the flow of program instructions and data between the memory and the
processor. At the start of execution, all program instructions and the required data are stored in the
main memory. As the execution proceeds, instructions are fetched one by one over the bus into the
processor, and a copy is placed in the cache. Later if the same instruction or data item is needed a
second time, it is read directly from the cache.
The processor and relatively small cache memory can be fabricated on a single IC chip. The
internal speed of performing the basic steps of instruction processing on chip is very high and is
considerably faster than the speed at which the instruction and data can be fetched from the main
memory. A program will be executed faster if the movement of instructions and data between the
main memory and the processor is minimized, which is achieved by using the cache.
For example:- Suppose a number of instructions are executed repeatedly over a short period of
time as happens in a program loop. If these instructions are available in the cache, they can be
fetched quickly during the period of repeated use. The same applies to the data that are used
repeatedly.
1.6.6 Compiler
A compiler translates a high-level language program into a sequence of machine instructions.
An optimizing compiler takes advantage of various features of the target processor to reduce the
product N*S which is the total number of clock cycles needed to execute a program.
The number of cycles is dependant not only on the choice of instructions but also on the order
in which they appear in the program.The compiler may rearrange program instructions to achieve
better performance.
1.6.7 Performance measurements
Computer designers use performance estimates to evaluate the effectiveness of new features.
The performance of a computer is given by the execution time T, for the program of interest.
Inspite of the performance equation being so simple, the evaluation of ‘T’ is highly complex.
If the SPEC rating = 50 means that the computer under test is 50 times as fast as the ultra sparc
10. This is repeated for all the programs in the SPEC suit, and the geometric mean of the result is
computed.
Let SPECi be the rating for program ‘i’ in the suite. The overall SPEC rating for the computer
is given by
1
n n
SPEC Rating = (∏ SPECi )
i=1