You are on page 1of 12

11ans) The internal architectural design of

computers differs from one system model to


another. However, the basic organization remains
the same for all computer systems. The following
five units (also called “The functional units”)
correspond to the five basic operations performed
by all computer systems. Input Unit
Data and instructions must enter the computer system before any
computation can be performed on the supplied data. The input unit that
links the external environment with the computer system performs this task.
Data and instructions enter input units in forms that depend upon the
particular device used. For example, data is entered from a keyboard in a
manner similar to typing, and this differs from the way in which data is
entered through a mouse, which is another type of input device. However,
regardless of the form in which they receive their inputs, all input devices
must provide a computer with data that are transformed into the binary
codes that the primary memory of the computer is designed to accept. This
transformation is accomplished by units that called input interfaces. Input
interfaces are designed to match the unique physical or electrical
characteristics of input devices to the requirements of the computer system.
                See Also: Types of Computers by purpose
In short, an input unit performs the following functions.
1. It accepts (or reads) the list of instructions and data from the outside world.
2. It converts these instructions and data in computer acceptable format.
3. It supplies the converted instructions and data to the computer system for
further processing.

Output Unit
The job of an output unit is just the reverse of that of an input unit. It
supplied information and results of computation to the outside world. Thus
it links the computer with the external environment. As computers work with
binary code, the results produced are also in the binary form. Hence, before
supplying the results to the outside world, it must be converted to human
acceptable (readable) form. This task is accomplished by units called output
interfaces.
In short, the following functions are performed by an output unit.
1. It accepts the results produced by the computer which are in coded form and
hence cannot be easily understood by us.
2. It converts these coded results to human acceptable (readable) form.
3. It supplied the converted results to the outside world.

Storage Unit
The data and instructions that are entered into the computer system through
input units have to be stored inside the computer before the actual
processing starts. Similarly, the results produced by the computer after
processing must also be kept somewhere inside the computer system before
being passed on to the output units. Moreover, the intermediate results
produced by the computer must also be preserved for ongoing processing.
The Storage Unit or the primary / main storage of a computer system is
designed to do all these things. It provides space for storing data and
instructions, space for intermediate results and also space for the final
results.

12ans) Key Difference – Machine Language vs Assembly Language


 
Programming languages allow humans to create instructions for a computer to perform tasks.
There are three categories of programming languages such as High-level programming
languages, Assembly language, and Machine language. High-level programming languages are
easier for humans to understand. Language recognized by a computer is known as machine
language. Assembly language is the language between high-level languages and machine
language. The key difference between machine language and assembly language is that,
machine language executes directly by a computer and assembly language requires an
assembler to convert to machine code or object code to execute by the CPU.

Humans can understand High-level programming languages. It is not necessary to have a deep
understanding of the internal CPU, to program using high-level languages. They follow a syntax
similar to the English language. Java, C, C++, Python are some high-level programming
languages. A computer recognizes machine language but does not understand high-level
languages. Therefore, those programs should be converted to computer understandable machine
language. This translation is done using a compiler or an interpreter

A machine language consists of binary digits which are zeros and once. A computer is a
digital electronic device, so it uses binary for operations. One indicates the true state / on
state while zero indicates the false state / off state. The way of converting a program
from high-level language to machine language depends on the CPU.
Assembly language is the intermediate language between high-level programing languages and
machine language. It is one level above machine language. Assembly language is easier to
understand than machine language but harder than high-level programming languages. This
language is also known as a low-level language because it is close to the hardware level. In order
to write effective programs using Assembly, the programmer should have a good understanding
of the computer architecture and the register structure. A special compiler known as an assembler
is used to convert assembly language instructions to machine code or object code.

Assembly language statements have four sections. They are a label, mnemonic, operand,
comment. Label and comments are optional. Mnemonic is the instruction to execute and operands
are parameters for the command. Assembly language also supports macros. A macro can be
defined as a set of instructions with a name. It can be used elsewhere in the program.

13ans) An instruction is an order given to a computer processor by a


computer program. At the lowest level, each instruction is a sequence of 0s
and 1s that describes a physical operation the computer is to perform (such
as "Add") and, depending on the particular instruction type, the
specification of special storage areas called registers that may contain data
to be used in carrying out the instruction, or the location in computer
memory of data.

In a computer's assembler language, each language statement generally


corresponds to a single processor instruction. In high-level languages, a
language statement generally results (after program compilation) in multiple
processor instructions.

In assembler language, a macro instruction is one that, during processing


by the assembler program, expands to become multiple instructions (based
on a previously coded macro definition).

14ans) The instruction cycle (also known as the fetch–decode–execute cycle or simply the
fetch-execute cycle) is the cycle which the central processing unit (CPU) follows from boot-up
until the computer has shut down in order to process instructions. It is composed of three main
stages: the fetch stage, the decode stage, and the execute stage.
This is a simple diagram illustrating the individual stages of the fetch-decode-execute cycle.

In simpler CPUs, the instruction cycle is executed sequentially, each instruction being processed
before the next one is started. In most modern CPUs, the instruction cycles are instead executed
concurrently, and often in parallel, through an instruction pipeline: the next instruction starts
being processed before the previous instruction has finished, which is possible because the cycle
is broken up into separate steps
The program counter (PC) is a special register that holds the memory address of the next
instruction to be executed. During the fetch stage, the address stored in the PC is copied into the
memory address register (MAR) and then the PC is incremented in order to "point" to the
memory address of the next instruction to be executed. The CPU then takes the instruction at the
memory address described by the MAR and copies it into the memory data register (MDR). The
MDR also acts as a two-way register that holds data fetched from memory or data waiting to be
stored in memory (it is also known as the memory buffer register (MBR) because of this).
Eventually, the instruction in the MDR is copied into the current instruction register (CIR) which
acts as a temporary holding ground for the instruction that has just been fetched from memory.
During the decode stage, the control unit (CU) will decode the instruction in the CIR. The CU
then sends signals to other components within the CPU, such as the arithmetic logic unit (ALU)
and the floating point unit (FPU). The ALU performs arithmetic operations such as addition and
subtraction and also multiplication via repeated addition and division via repeated subtraction. It
also performs logic operations such as AND, OR, NOT, and binary shifts as well. The FPU is
reserved for performing floating-point operations.

15ans) Register are used to quickly accept, store, and transfer data and instructions
that are being used immediately by the CPU, there are various types of Registers
those are used for various purpose. Among of the some Mostly used Registers
named as AC or Accumulator, Data Register or DR, the AR or Address Register,
program counter (PC), Memory Data Register (MDR) ,Index register,Memory
Buffer Register. These Registers are used for performing the various Operations.
While we are working on the System then these Registers are used by the CPU for
Performing the Operations. When We Gives Some Input to the System then the
Input will be Stored into the Registers and When the System will gives us the
Results after Processing then the Result will also be from the Registers. So that they
are used by the CPU for Processing the Data which is given by the User. Registers
Perform:-

1)    Fetch: The Fetch Operation is used for taking the instructions those are given
by the user and the Instructions those are stored into the Main Memory will be fetch
by using Registers.

2)    Decode: The Decode Operation is used for interpreting the Instructions means
the Instructions are decoded means the CPU will find out which Operation is to be
performed on the Instructions.

3)    Execute: The Execute Operation is performed by the CPU. And Results those
are produced by the CPU are then Stored into the Memory and after that they are
displayed on the user Screen.

Types of Registers are as Followings

MAR stand for Memory Address Register

This register holds the memory addresses of data and instructions. This register is
used to access data and instructions from memory during the execution phase of an
instruction. Suppose CPU wants to store some data in the memory or to read
the data from the memory. It places the address of the-required memory
location in the MAR.

A special, high-speed storage area within the CPU. All data must be represented in a register before it can be

processed. For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is

also placed in a register. (The register can contain the address of a memory location where data is stored rather

than the actual data itself.)

The number of registers that a CPU has and the size of each (number of bits) help determine the power and

speed of a CPU. For example a 32-bit CPU is one in which each register is 32 bits wide. Therefore, each CPU

instructioncan manipulate 32 bits of data.

Usually, the movement of data in and out of registers is completely transparent to users, and even to

programmers. Only assembly language programs can manipulate registers. In high-level languages, the compiler

is responsible for translating high-level operations into low-level operations that accessregisters.

(v) To notify a manufacturer that you have purchased its product. Registering a product is often a prerequisite to

receiving customer support, and it is one of the ways that software producers control software piracy.

Section-c
Memory Organization in
19ans)

Computer Architecture
A memory unit is the collection of storage units or devices together. The memory unit
stores the binary information in the form of bits. Generally, memory/storage is
classified into 2 categories:

 Volatile Memory: This loses its data, when power is switched off.

 Non-Volatile Memory: This is a permanent storage and does not lose any data

when power is switched off.

Memory Hierarchy

The total memory capacity of a computer can be visualized by hierarchy of


components. The memory hierarchy system consists of all storage devices
contained in a computer system from the slow Auxiliary Memory to fast Main
Memory and to smaller Cache memory.
Auxillary memory access time is generally 1000 times that of the main memory,
hence it is at the bottom of the hierarchy.
The main memory occupies the central position because it is equipped to
communicate directly with the CPU and with auxiliary memory devices through
Input/output processor (I/O).
When the program not residing in main memory is needed by the CPU, they are
brought in from auxiliary memory. Programs not currently needed in main memory
are transferred into auxiliary memory to provide space in main memory for other
programs that are currently in use.
The cache memory is used to store program data which is currently being executed
in the CPU. Approximate access time ratio between cache memory and main
memory is about 1 to 7~10

Memory Access Methods


Each memory type, is a collection of numerous memory locations. To access data
from any memory, first it must be located and then the data is read from the memory
location. Following are the methods to access information from memory locations:

1. Random Access: Main memories are random access memories, in which each

memory location has a unique address. Using this unique address any memory

location can be reached in the same amount of time in any order.

2. Sequential Access: This methods allows memory access in a sequence or in order.

3. Direct Access: In this mode, information is stored in tracks, with each track having a

separate read/write head.

Main Memory
The memory unit that communicates directly within the CPU, Auxillary memory and
Cache memory, is called main memory. It is the central storage unit of the computer
system. It is a large and fast memory used to store data during computer operations.
Main memory is made up of RAM and ROM, with RAM integrated circuit chips holing
the major share.
 RAM: Random Access Memory
o DRAM: Dynamic RAM, is made of capacitors and transistors, and must be

refreshed every 10~100 ms. It is slower and cheaper than SRAM.


o SRAM: Static RAM, has a six transistor circuit in each cell and retains data,

until powered off.


o NVRAM: Non-Volatile RAM, retains its data, even when turned off. Example:

Flash memory.

 ROM: Read Only Memory, is non-volatile and is more like a permanent storage for

information. It also stores the bootstrap loader program, to load and start the

operating system when computer is turned on. PROM(Programmable ROM),

EPROM(Erasable PROM) and EEPROM(Electrically Erasable PROM) are some

commonly used ROMs.

Auxiliary Memory
Devices that provide backup storage are called auxiliary memory. For example:
Magnetic disks and tapes are commonly used auxiliary devices. Other devices used
as auxiliary memory are magnetic drums, magnetic bubble memory and optical
disks.
It is not directly accessible to the CPU, and is accessed using the Input/Output
channels.

Cache Memory
The data or contents of the main memory that are used again and again by CPU, are
stored in the cache memory so that we can easily access that data in shorter time.
Whenever the CPU needs to access memory, it first checks the cache memory. If
the data is not found in cache memory then the CPU moves onto the main memory.
It also transfers block of recent data into the cache and keeps on deleting the old
data in cache to accomodate the new one.

20ans)  DMA stands for "Direct Memory Access" and is a method of transferring data
from the computer's RAM to another part of the computer without processing it using
the CPU. While most data that is input or output from your computer is processed by
the CPU, some data does not require processing, or can be processed by another
device.
In these situations, DMA can save processing time and is a more efficient way to
move data from the computer's memory to other devices. In order for devices to use
direct memory access, they must be assigned to a DMA channel. Each type of port
on a computer has a set of DMA channels that can be assigned to each connected
device. For example, a PCI controller and a hard drive controller each have their own
set of DMA channels. 

 
For example, a sound card may need to access data stored in the computer's RAM,
but since it can process the data itself, it may use DMA to bypass the CPU. Video
cards that support DMA can also access the system memory and process graphics
without needing the CPU. Ultra DMA hard drives use DMA to transfer data faster
than previous hard drives that required the data to first be run through the CPU.
An alternative to DMA is the Programmed Input/Output (PIO) interface in which all
data transmitted between devices goes through the processor. A newer protocol for
the ATAIIDE interface is Ultra DMA, which provides a burst data transfer rate up to
33 mbps. Hard drives that come with Ultra DMAl33 also support PIO modes 1, 3,
and 4, and multiword DMA mode 2 at 16.6 mbps.

DMA Transfer Types


Memory To Memory Transfer  
In this mode block of data from one memory address is moved to another memory
address. In this mode current address register of channel 0 is used to point the
source address and the current address register of channel is used to point the
destination address in the first transfer cycle, data byte from the source address is
loaded in the temporary register of the DMA controller and in the next transfer cycle
the data from the temporary register is stored in the memory pointed by destination
address. After each data transfer current address registers are decremented or
incremented according to current settings. The channel 1 current word count register
is also decremented by 1 after each data transfer. When the word count of channel 1
goes to FFFFH, a TC is generated which activates EOP output terminating the DMA
service.
Auto initialize
In this mode, during the initialization the base address and word count registers are
loaded simultaneously with the current address and word count registers by the
microprocessor. The address and the count in the base registers remain unchanged
throughout the DMA service.
After the first block transfer i.e. after the activation of the EOP signal, the original
values of the current address and current word count registers are automatically
restored from the base address and base word count register of that channel. After
auto initialization the channel is ready to perform another DMA service, without CPU
intervention.
DMA Controller
The controller is integrated into the processor board and manages all DMA data
transfers. Transferring data between system memory and an 110 device requires
two steps. Data goes from the sending device to the DMA controller and then to the
receiving device. The microprocessor gives the DMA controller the location,
destination, and amount of data that is to be transferred. Then the DMA controller
transfers the data, allowing the microprocessor to continue with other processing
tasks. When a device needs to use the Micro Channel bus to send or receive data, it
competes with all the other devices that are trying to gain control of the bus. This
process is known as arbitration. The DMA controller does not arbitrate for control of
the BUS instead; the I/O device that is sending or receiving data (the DMA slave)
participates in arbitration. It is the DMA controller, however, that takes control of the
bus when the central arbitration control point grants the DMA slave's request.

Computer Architecture:
21ans)

Input/Output Processor
An input-output processor (IOP) is a processor with direct memory access capability.
In this, the computer system is divided into a memory unit and number of
processors.
Each IOP controls and manage the input-output tasks. The IOP is similar to CPU
except that it handles only the details of I/O processing. The IOP can fetch and
execute its own instructions. These IOP instructions are designed to manage I/O
transfers only.
Block Diagram Of I/O Processor
Below is a block diagram of a computer along with various I/O Processors. The
memory unit occupies the central position and can communicate with each
processor.
The CPU processes the data required for solving the computational tasks. The IOP
provides a path for transfer of data between peripherals and memory. The CPU
assigns the task of initiating the I/O program.
The IOP operates independent from CPU and transfer data between peripherals and
memory.
The IOP operates independent from CPU and transfer data between peripherals and
memory.

The communication between the IOP and the devices is similar to the program
control method of transfer. And the communication with the memory is similar to the
direct memory access method.
In large scale computers, each processor is independent of other processors and
any processor can initiate the operation.
The CPU can act as master and the IOP act as slave processor. The CPU assigns
the task of initiating operations but it is the IOP, who executes the instructions, and
not the CPU. CPU instructions provide operations to start an I/O transfer. The IOP
asks for CPU through interrupt.
Instructions that are read from memory by an IOP are also called commands to
distinguish them from instructions that are read by CPU. Commands are prepared by
programmers and are stored in memory. Command words make the program for IOP. CPU
informs the IOP where to find the commands in memory.

You might also like