Comupet Science Assisnment
Comupet Science Assisnment
Input unit :
Input devices are used to feed data into the computer. There are different kinds of input devices are
Keyboard
Optical input devices
o Paper Tape Reader
o Card reader
o Bar code reader
o Digitizer
o Optical Mark Reader
Magnetic Input Devices
o Magnetic Stripe Reader
Screen Input Devices
o Touch Screen
o Light Pen
o Mouse
Analog Input Devices
Input/output interface :
I/O Interface is required whenever the I/O device is driven by the processor. The interface must
have necessary logic to interpret the device address generated by the processor. Handshaking should be
implemented by the interface using appropriate commands like (BUSY,READY,WAIT), and the processor
can communicate with I/O device through the interface. If different data formats are being exchanged, the
interface must be able to convert serial data to parallel form and vice-versa. There must be provision for
generating interrupts and the corresponding type numbers for further processing by the processor if
required
Keyboard mouse
Output device
Any peripheral that receives or displays output from a computer. To the right is a picture of an inkjet printer
and a good example of an output device. Below is a listing of all the different types of computer output devices
found on a computer.
Monitor
Printer
Projector
Speakers
Monitor printer
projector
Early CPUs were custom-designed as a part of a larger, sometimes one-of-a-kind, computer. However, this
costly method of designing custom CPUs for a particular application has largely given way to the development of
mass-produced processors that are made for one or many purposes. This standardization trend generally began in
the era of discrete transistor mainframes and minicomputers and has rapidly accelerated with the popularization of
the integrated circuit (IC). The IC has allowed increasingly complex CPUs to be designed and manufactured to
tolerances on the order of nanometers. Both the miniaturization and standardization of CPUs have increased the
presence of these digital devices in modern life far beyond the limited application of dedicated computing
machines. Modern microprocessors appear in everything from automobiles to cell phones and children's toys.
Storage unit
Computer data storage, often called storage or memory, refers to computer components and recording
media that retain digital data used for computing for some interval of time. Computer data storage provides one of
the core functions of the modern computer, that of information retention. It is one of the fundamental components
of all modern computers, and coupled with a central processing unit (CPU, a processor), implements the basic
computer model used since the 1940s.
In contemporary usage, memory usually refers to a form of semiconductor storage known as random-access
memory (RAM) and sometimes other forms of fast but temporary storage. Similarly, storage today more
commonly refers to mass storage — optical discs, forms of magnetic storage like hard disk drives, and other types
slower than RAM, but of a more permanent nature. Historically, memory and storage were respectively called
main memory and secondary storage (or auxiliary storage). Auxiliary storage (or auxiliary memory units) was
also used to represent memory which was not directly accessible by the CPU (secondary or tertiary storage). The
terms internal memory and external memory are also used
RAM
Control unit
The control unit is the circuitry that controls the flow of information through the processor, and
coordinates the activities of the other units within it. In a way, it is the "brain within the brain", as it controls what
happens inside the processor, which in turn controls the rest of the PC.
The functions performed by the control unit vary greatly by the internal architecture of the CPU, since
the control unit really implements this architecture. On a regular processor that executes x86 instructions natively,
the control unit performs the tasks of fetching, decoding, managing execution and then storing results. On a
processor with a RISC core the control unit has significantly more work to do. It manages the translation of x86
instructions to RISC micro-instructions, manages scheduling the micro-instructions between the various
execution units, and juggles the output from these units to make sure they end up where they are supposed to go.
On one of these processors the control unit may be broken into other units (such as a scheduling unit to handle
scheduling and a retirement unit to deal with results coming from the pipeline) due to the complexity of the job it
must perform
ARITHMETIC-LOGIC UNIT
The arithmetic-logic unit (ALU) performs all arithmetic operations (addition, subtraction,
multiplication, and division) and logic operations. Logic operations test various conditions encountered
during processing and allow for different actions to be taken based on the results. The data required to perform
the arithmetic and logical functions are inputs from the designated CPU registers and operands. The ALU relies
on basic items to perform its operations. These include number systems, data routing
circuits (adders/subtracters), timing, instructions, operands, and registers.
In general, the ALU includes storage places for input operands, operands that are being added, the
accumulated result (stored in an accumulator), and shifted results. The flow of bits and the operations performed
on them in the subunits of the ALU is controlled by gated circuits. The gates in these circuits are controlled by a
sequence logic unit that uses a particular algorithm or sequence for each operation code. In the arithmetic unit,
multiplication and division are done by a series of adding or subtracting and shifting operations. There are several
ways to represent negative numbers. In the logic unit, one of 16 possible logic operations can be performed - such
as comparing two operands and identifying where bits don't match.
The design of the ALU is obviously a critical part of the processor and new approaches to speeding up
instruction handling are continually being developed
Register
In computer architecture, a processor register (or general purpose register) is a small amount of storage
available on the CPU whose contents can be accessed more quickly than storage available elsewhere. Typically,
this specialized storage is not considered part of the normal memory range for the machine. Most, but not all,
modern computers adopt the so-called load-store architecture. Under this paradigm, data is loaded from some
larger memory — be it cache or RAM — into registers, manipulated or tested in some way (using machine
instructions for arithmetic/logic/comparison) and then stored back into memory, possibly at some different
location. A common property of computer programs is locality of reference: the same values are often accessed
repeatedly; and holding these frequently used values in registers improves program execution performance.
Processor registers are at the top of the memory hierarchy, and provide the fastest way for a CPU to access
data. The term is often used to refer only to the group of registers that are directly encoded as part of an
instruction, as defined by the instruction set. More properly, these are called the "architectural registers". For
instance, the IA-32 instruction set defines a set of 32-bit registers, but a CPU that implements the x86 instruction
set will often contain many more registers than just these registers.
Allocating frequently used variables to registers can be critical to a program's performance. This action
(register allocation) is performed by a compiler in the code generation phase..
Categories of registers
Registers are normally measured by the number of bits they can hold, for example, an "8-bit register" or a
"32-bit register". Registers are now usually implemented as a register file, but they have also been implemented
using individual flip-flops, high speed core memory, thin film memory, and other ways in various machines.
A processor often contains several kinds of registers, that can be classified accordingly to their content or
instructions that operate on them:
User-accessible Registers - The most common division of user-accessible registers is into data registers
and address registers.
Data registers are used to hold numeric values such as integer and floating-point values. In some older
and low end CPUs, a special data register, known as the accumulator, is used implicitly for many
operations.
Address registers hold addresses and are used by instructions that indirectly access memory.
o Some processors contain registers that may only be used to hold an address or only to hold
numeric values (in some cases used as an index register whose value is added as an offset from
some address); others allow registers to hold either kind of quantity. A wide variety of possible
addressing modes, used to specify the effective address of an operand, exist.
o A stack pointer, sometimes called a stack register, is the name given to a register that can be used
by some instructions to maintain a stack.
Conditional registers hold truth values often used to determine whether some instruction should or
should not be executed.
General purpose registers (GPRs) can store both data and addresses, i.e., they are combined
Data/Address registers.
Floating point registers (FPRs) store floating point numbers in many architectures.
Constant registers hold read-only values such as zero, one, or pi.
Vector registers hold data for vector processing done by SIMD instructions (Single Instruction, Multiple
Data).
Special purpose registers ( SPR ) hold program state; they usually include the program counter (aka
instruction pointer), stack pointer, and status register (aka processor status word). In embedded
microprocessors, they can also correspond to specialized hardware elements.
o Instruction registers store the instruction currently being executed.
In some architectures, model-specific registers (also called machine-specific registers) store data and
settings related to the processor itself. Because their meanings are attached to the design of a specific
processor, they cannot be expected to remain standard between processor generations.
Control and status registers - It has three types. Program counter, instruction registers, Program status
word (PSW).
Registers related to fetching information from RAM, a collection of storage registers located on separate
chips from the CPU (unlike most of the above, these are generally not architectural registers):
o Memory buffer register
o Memory data register
o Memory address register
o Memory Type Range Registers (MTRR)
Some examples
Integer Double FP
Architecture
registers registers
x86 8 8
x86-64 16 16
IBM/360 16 4
Z/Architecture 16 16
UltraSPARC 32 32
POWER 32 32
Alpha 32 32
6502 3 0
PIC microcontroller 1 0
AVR microcontroller 32 0
ARM 16 16
The table shows the number of registers of several mainstream architectures. Note that the stack pointer
(ESP) is counted as an integer register on x86-compatible processors, even though there are a limited number of
instructions that may be used to operate on its contents. Similar caveats apply to most architectures.
Register usage
The number of registers available on a processor and the operations that can be performed using those
registers has a significant impact on the efficiency of code generated by optimizing compilers. The minimum
number of registers required to evaluate an expression tree is known as the Strahler number.