1. Basic Computer Architecture
1. Basic Computer Architecture
ULS IC.
Artificial intelligence: Functions & logic predicates.
Modern high-level languages like Python, R, C#, Java etc.
The memory in a computer can be divided into four hierarchies based on the
speed as well as use. The processor can move from one level to another based
on its requirements. The four hierarchies in the memory are registers, cache,
main memory and Secondary Memory.
1) Capacity
It is the global volume of information the memory can store. As we move
from top to bottom in the Hierarchy, the capacity increases.
2) Access time
It is the time interval between the read/write request and the availability of
the data. As we move from top to bottom in the Hierarchy, the access time
increases.
4) Performance
Earlier when the computer system was designed without Memory Hierarchy
design, the speed gap increases between the CPU registers and Main
Memory due to large difference in access time. This results in lower
performance of the system and thus, enhancement was required. This
enhancement was made in the form of Memory Hierarchy Design because
of which the performance of the system increases. One of the most
significant ways to increase system performance is minimizing how far down
the memory hierarchy one has to go to manipulate data.
Cache Memory:
Cache memory, also called cache, supplementary memory system that
temporarily stores frequently used instructions and data for quicker
processing by the central processing unit (CPU) of a computer.
Register Memory:
Register memory is the smallest and fastest memory in a computer. It is not
a part of the main memory and is located in the CPU in the form of registers,
which are the smallest data holding elements. A register temporarily holds
frequently used data, instructions, and memory address that are to be used
by CPU.
External Memory
1) Magnetic Disk
2) RAID
Striping: In this, data will be split between more than one disk.
Mirroring: In this, data will mirror between more than one disk.
Parity: It can also be called checksum. It can be described as a
calculated value, which is used to mathematically rebuild the data.
Commonly RAID has 7 levels. In which levels 0, 1, and 3 are used for
high transfer rates. Levels 4, 5, and 6 are used for high transaction
rates.
3) Optical Memory
Optical memories perform their operations with the help of light beams, and
it also needs option drive for the operations. We can use optical memory to
store backup, audio, video, and also for caring data. The speed of a flash
drive and the hard drive is faster as compared to the read/write speed. There
are various examples of optical memory that are Compact disk (CD) and
Digital Versatile Disk (DVD).
4) Magnetic tape
Reading and writing techniques in the tape system is the same as the disk
system. In this, the medium is flexible polyester tape coated with
a magnetizable material. The tape's data can be structured as a number of
parallel tracks that will be run lengthwise. In this form, the recording of data
can be called a parallel recording. Instead of the parallel recording, most of
the modern system uses serial recording. The serial recording uses the
sequence of bits along with each track to lay of the data. It is done with the
help of a magnetic disk. In the serial recoding, the disk contains the physical
record on the tape, which can be described as the data which are read and
write in the contiguous blocks.
Organization of Hard Disk
Hard disk drives are magnetic media that store and retrieve digital data. Its
architecture is rigid rapidly rotating disks, or platters, held in place by spindles.
The platters are not magnetic but are coated with magnetic material.
The entire disk is divided into platters and each platter consists of
concentric circles called as tracks.
These tracks are further divided into sectors which are the smallest
divisions in the disk.
There exists a mechanical arm called as Read / Write head and it is used
to read from and write to the disk.
Head has to reach at a particular track and then wait for the rotation of the
platter and the rotation causes the required sector of the track to come
under the head.
Each platter has 2 surfaces- top and bottom and both the surfaces are used
to store the data and each surface has its own Read/write data.
Registers are a type of computer memory used to quickly accept, store, and
transfer data and instructions that are being used immediately by the CPU. The
registers used by the CPU are often termed as Processor registers.
Accumulator: This is the most common register, used to store data taken
out from the memory.
General Purpose Registers: This is used to store data intermediate results
during program execution. It can be accessed via assembly programming.
Special Purpose Registers: Users do not access these registers. These
registers are for Computer system,
o MAR: Memory Address Register are those registers that holds the
address for memory unit.
o MBR: Memory Buffer Register stores instruction and data
received from the memory and sent from the memory.
o PC: Program Counter points to the next instruction to be executed.
o IR: Instruction Register holds the instruction to be executed.
A basic computer has 8 registers, memory unit and a control unit. The
diagram of the common bus system is as shown below.
Connection: The outputs of all the registers except the OUTR (output
register) are connected to the common bus. The output selected depends
upon the binary value of variables S2, S1 and S0. The lines from common
bus are connected to the inputs of the registers and memory. A register
receives the information from the bus when its LD (load) input is
activated while in case of memory the Write input must be enabled to
receive the information. The contents of memory are placed onto the bus
when its Read input is activated.
Computer Instruction
1. Memory-Reference instruction
Example:
IR register contains = 0001XXXXXXXXXXXX, i.e. ADD after fetching
and decoding of instruction we find out that it is a memory reference
instruction for ADD operation.
Hence, DR ← M[AR]
AC ← AC + DR, SC ← 0
2. Register-Reference instruction
Example:
Hence, AC ← ~AC
3. Input-Output instruction
Instruction Set
Examples:
ADD - Add two numbers together.
IN - Input information from a device, e.g., keyboard.
JUMP - Jump to designated RAM address.
JUMP IF - Conditional statement that jumps to a designated RAM
address.
LOAD - Load information from RAM to the CPU.
OUT - Output information to device, e.g., monitor.
STORE - Store information to RAM.
The timing for all registers in the basic computer is controlled by a master clock
generator. The clock pulses are applied to all flip-flops and registers in the system,
including the flip-flops and registers in the control unit. The clock pulses do not change
the state of a register unless the register is enabled by a control signal. The control
signals are generated in the control unit and provide control inputs for the multiplexers
in the common bus, control inputs in processor registers, and micro operations for the
accumulator.
There are two major types of Control Organization.
Hardwired Control
The control logic is implemented with gates, flip-flops, decoders, and other
digital circuits. It has the advantage that it can be optimized to produce a fast
mode of operation. In the microprogrammed organization, the control
information is stored in a control memory. The control memory is programmed
to initiate the required sequence of micro operations. A hardwired control, as
the name implies, requires changes in the wiring among the various components
if the design has to be modified or changed.
Microprogrammed Control
Fetch
The Control Unit sends a signal to the RAM in order to fetch the program and
data, which is then stored in one of the CPU’s register. To do so, the CPU makes
use of a vital hardware path called the ‘address bus’ along which the program
and data travels.
The Control Unit then increments the Program Counter (PC). The PC is an
important register that keeps track of the running order of the instructions and
shows which instruction in the program is due to be executed next .
The CPU then places the address of the next item to be fetched on to the address
bus. Data from this address then moves from main memory into the CPU by
travelling along another hardware path called the ‘data bus’.
Decode
There are different types of instruction in Computer architecture some of them were
discussed above remaining is
Interrupt Instruction