Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
(b) Arithmetic and Logic Unit: The function of an Arithmetic logic unit (ALU)
is to perform arithmetic and logical operations such as addition, subtraction,
multiplication, division,AND, OR, NOT, Exclusive OR etc. It also performs increment,
decrements, shift and clear operations. It is the place where the actual execution of
instructions takes place during processing operation. To be precise, all calculations and
comparisons are made in the Arithmetic and Logical Unit (ALU).
(c) Registers: It is a special temporary storage location within the CPU.
Registers quickly, accept, store and transfer data and instructions that are being used
immediately (main memory hold data that will be used shortly, secondary storage
holds data that will be used later). To execute an instruction, the control unit of the
CPU retrieves it from main memory and places it onto a register.
(d) Bus: The term Bus refers to an electrical pathway through which bits are
transmitted between the various computer components. Depending on the design of
the system, several types of buses may be present. The most important one is the data
bus, which carries the data through out the central processing unit. Types of buses:
• Address Bus- The address bus is used to specify memory locations for the data
being transferred.
• Data Bus- The data bus, which is a bidirectional path, carries the actual data
between the processor, the memory and the peripherals.
• Control Bus- The control bus carries the control, timing and coordination
signals to manage the various functions across the system.
(e) Output Unit: An output unit performs the reverse operation of that of an input unit. As
computers, work with binary code the results produced are also in binary form. So before
applying results to the outside world it must be converted to human acceptable (readable)
form. So, it supplies information obtained from processing to outside world. Units called
output interfaces accomplish this task.
------------------------------------------------------------------------------------------------------------------
System Buses: A bus is a common pathway through which information flows from
one computer component to another. This pathway is used for communication
purpose and it is established between two or more computer components. A typical
example is the communication bus between a processing unit and memory unit. A
bus structure implies multiple communication lines or pathways and in a physical
representation, it will be constructed from multiple wires or signal lines. Each line
carries a single bit of information; the more lines the bus is made of, the more
information it can address. This is called the width or size of a bus and it determines
how much data can be transmitted at one time. An 8 bit bus will be able to transmit 8
bits of data.
Depending on the bus type, the information can be transmitted either serial, which
means a sequence of bits will be transmitted using a single line, or parallel, which
means several lines will be used to transmit bits simultaneously.
Types of Buses:
o Address Bus- The address bus is used to specify memory locations for the data
being transferred.
o Data Bus- The data bus, which is a bidirectional path, carries the actual data
between the processor, the memory and the peripherals.
o Control Bus- The control bus carries the control, timing and coordination
signals to manage the various functions across the system.
• Address Bus: Address bus carries address information. It is a set of wires which
connects to CPU and memory. Whenever the processor needs data from the memory,
it places the address of the data on the address bus. The address is carried to the
memory where the data from the requested address is fetched and placed on the data
bus. The data bus then carries the data to the CPU. It is unidirectional between the
main memory and processor and bidirectional between the processor and I/O system.
Address bus is also known as memory bus. It transfers the memory addresses for read
and write operations. CPU reads/writes data from the memory by addressing a unique
location; outputs the location of the data (i.e. address) on the address bus; memory
uses this address to access the proper data. Each I/O device (such as monitor, keypad,
etc) has a unique address as well (or a range of addresses); when accessing a I/O
device, CPU places its address on the address bus. Each device will detect if it is its
own address and act accordingly.
• Data Bus: This is the most common bus which carries the data. It is a an electrical
path that connects the CPU, Memory, Input/output devices. This bus contains group
of parallel lines and these number of lines affect the speed at which the data travels
between the different components of the system. When the CPU fetches data from
memory, it first outputs the address on the address bus, then the memory outputs the
data onto the data bus; the CPU reads the data from data bus. When writing data onto
the memory, the CPU outputs first the address on the address bus, then outputs the
data onto the output bus; memory then reads and stores the data at the proper location.
The data bus is bi-directional which allows the transfer of data in both directions.
• Control Bus: The control bus carries control information(i.e. commands,
instructions) from the control unit to the other units such as I/O devices, secondary
storage etc. It is used to direct the activities of all units. Address and data buses
consist of n lines, which combine to transmit one n bit value; control bus is a
collection of individual control signals. These signals indicate whether the data is to
be read into or written out the CPU, whether the CPU is accessing memory or an IO
device, and whether the I/O device or memory is ready for the data transfer.
---------------------------------------------------------------------------------------------------
TOPIC 5: Computer hardware components: REGISTERS
A. Registers : A register is a very small amount of very fast memory that is built into the
CPU (central processing unit) in order to speed up its operations by providing quick
access to commonly used values. Registers refers to semiconductor devices whose
contents can be accessed (i.e., read and written to) at extremely high speeds but which
are held there only temporarily (i.e., while in use or only as long as the power supply
remains on).
Registers are the top of the memory hierarchy and are the fastest way for the system
to manipulate data. Registers are normally measured by the number of bits they can
hold, for example, an 8-bit register means it can store 8 bits of data or a 32-bit register
means it can store 32 bit of data. Registers are used to store data temporarily during
the execution of a program. Some of the registers are accessible to the user through
instructions. Data and instructions must be put into the system. So we need registers
for this.
Data Register (DR): A register used in computers to temporarily store data
being transmitted to or from a peripheral. Data registers can be assigned to a
variety of functions by the programmer. In some cases, they are general purpose in
nature and can be used with any machine instruction that performs operations on data.
Often, however, there are restrictions. For example, there may be dedicated registers
for floating-point operations.
Address Register (AR): AR contains main memory addresses of data and
instructions, or they contain a portion of the address that is used in the calculation of
the complete address. The number of bits in the register determines the amount of
memory that can be addressed. For example, a 32 bit AR can address 4GB. Address
registers may be somewhat general purpose, or they may be devoted to a particular
addressing mode. Examples include the following:
Accumulator (AC): The accumulator is the special register of the computer. A
register is a special memory location that allows very fast access. Here, the
accumulator is a temporary memory location that stores values of all arithmetic and
logical calculations that are being carried out by the CPU. The increments of values
occur in the accumulator for programming calculations.
Instruction Register (IR): it is the part of a CPU's control unit that holds the
instruction currently being executed or decoded. In simple processors each instruction
to be executed is loaded into the instruction register which holds it while it is decoded,
prepared and ultimately executed, which can take several steps.
Program Counter (PC): A program counter is a register in a computer processor that
contains the address (location) of the instruction being executed at the current time.
As each instruction gets fetched, the program counter increases its stored value by 1.
Program counter (PC) , also called instruction pointer . A branch provides that the
next instruction is fetched from somewhere else in memory. A subroutine call not
only branches but saves the preceding contents of the PC somewhere. A return
retrieves the saved contents of the PC and places it back in the PC, resuming
sequential execution with the instruction following the subroutine call. A program
counter is also known as an instruction counter, instruction pointer, instruction
address register or sequence control register. It is a digital counter needed for faster
execution of tasks as well as for tracking the current execution point.
Temporary Register (TR): It is 16 bit non programmable resister used to hold data
during an arithmetic and logic operation (temporary resister is used to hold
intermediate result). The result is stored in the accumulator, and the flags( flip-flops)
are set or reset according to the result of the operation.
Input Register (INPR): It is an 8-bit register that holds the input character received
from an input device and delivered it to the Accumulator.
Output Register (OUTR): It is an 8-bit register that holds the output character
received from Accumulator and deliver it to the output device.
Memory Buffer Register (MBR): This register holds the contents of data or
instruction read from, or written in memory. The contents of instruction placed in this
register are transferred to the Instruction Register, while the contents of data are
transferred to the accumulator or I/O register. In other words you can say that this
register is used to store data/instruction coming from the memory or going to the
memory. A Memory Buffer Register (MBR) is the register in a computers processor,
or in CPU, that stores the data being transferred to and from the immediate access
store. It acts as a buffer allowing the processor and memory units to act independently
without being affected by minor differences in operation. The basic use of memory
buffer register is to store the data that would be used in next clock cycle. The basic
idea is that the memory units and processors have different speed so to remove this
difference a buffer is used which can produce a continuous supply.
Memory Address Register (MAR): This register holds the address of memory
where CPU wants to read or write data. When CPU wants to store some data in the
memory or reads the data from the memory, it places the address of the required
memory location in the MAR.
Memory Data Register (MDR): The Memory Data Register (MDR) contains the
data value being fetched or stored. The MDR is a two-way register. When data is
fetched from memory and placed into the MDR, it is written to go in one direction.
When there is a write instruction, the data to be written is placed into the MDR from
another CPU register, which then puts the data into memory.
----------------------------------------------------------------------------------------------------------------
• Primary memory: Primary memory holds only those data and instructions on which
the computer is currently working. Like cache memory, main memory is also
semiconductor memory. But the main memory is relatively slower memory. We have
to first bring the information (whether it is data or program), to main memory. CPU
can work with the information available in main memory only.
o Characteristics:
1. It has a limited capacity and data is lost when power is switched off.These
memories are not as fast as registers.
2. The data and instruction required to be processed resides in the main
memory.
3. These are volatile memory means data is lost in case power is switched
off.
4. These are faster than secondary memories.
o Types :
1. Internal memories are semiconductor memory. Semiconductor
memories are categorized as volatile memory and non-volatile
memory.
2. RAM: Random Access Memories are volatile in nature. As soon as
the computer is switched off, the contents of memory are also lost.
Types:
a. DRAM (Dynamic Random Access Memory) – The term dynamic
indicates that the memory must be constantly refreshed or it will
lose its contents. DRAM is typically used for the main memory in
computing devices.
b. SRAM (Static Random Access Memory) – While DRAM is
typically used for main memory, today SRAM is more often used
for system cache. SRAM is said to be static because it doesn't need
to be refreshed, unlike dynamic RAM, which needs to be refreshed
thousands of times per second. As a result, SRAM is faster than
DRAM. However, both types of RAM are volatile, meaning that
they lose their contents when the power is turned off.
3. ROM: Read only memories are non volatile in nature. The storage
is permanent, but it is read only memory. We can not store new
information in ROM. The permanent information are kept in ROM
and the user space is basically in RAM. Several types of ROM are
available:
a. PROM: Programmable Read Only Memory; it can be programmed
once as per user requirements.
b. EPROM: Erasable Programmable Read Only Memory; the
contents of the memory can be erased and store new data into the
memory. In this case, we have to erase whole information.
c. EEPROM: Electrically Erasable Programmable Read Only
Memory; in this type of memory the contents of a particular
location can be changed without effecting the contents of other
location.
• Secondary memory: This type of memory is also known as external memory or non-
volatile. It is slower than the main memory. These are used for storing
data/information permanently. CPU directly does not access these memories, instead
they are accessed via input-output routines. The contents of secondary memories are
first transferred to the main memory, and then the CPU can access it. For example,
disk, CD-ROM, DVD, etc. These are used for storing data/information permanently.
o Characteristics:
1. These are magnetic and optical memories.
2. It is known as the backup memory.
3. It is a non-volatile memory.
4. Data is permanently stored even if power is switched off.
5. It is used for storage of data in a computer.
6. Slower than primary memories.
----------------------------------------------------------------------------------------------------------------
o
------------------------------------------------------------------------------------------------