Search This Blog

Monday, June 19, 2017

TRB materials for CSE

Computer Organization and Architecture
The basic functional units of computer are made of electronics circuit and it works with electrical signal. We provide input to the computer in form of electrical signal and get the output in form of electrical signal.
There are two basic types of electrical signals, namely, analog and digital. The analog signals are continuous in nature and digital signals are discrete in nature.
Computer is a digital device, which works on two levels of signal. We say these two levels of signal as High and Low. The High-level signal basically corresponds to some high-level signal (say 5 Volt or 12 Volt) and Low-level signal basically corresponds to Low-level signal (say 0 Volt). This is one convention, which is known as positive logic. There are others convention also like negative logic.
we use 0 to represent LOW and 1 to represent HIGH.
0      means  LOW
                  1      means  HIGH
 (binary number system)
·   The smallest unit of information that is represented in computer is known as Bit ( Binary Digit ), which is either 0 or 1.
·   Four bits together is known as Nibble, and
·   Eight bits together is known as Byte.
Architectural attributes:
 Instruction set, the number of bits used to represent different data types, I/O mechanisms, and techniques for addressing memory.
Computer organization:
                  Operational units and their interconnections that realize the architectural specifications.
Basic Computer Model and different units of Computer
Basic units:
  • ·         Central Processor Unit
  • ·         Input Unit
  • ·         Output Unit
  • ·         Memory Unit

A. Central Processor Unit [CPU] :
Central processor unit consists of two basic blocks :
     ❍  The program control unit has a set of registers and control circuit to generate control signals.

 The execution unit or data processing unit contains a set of registers for storing data and an Arithmatic and Logic Unit (ALU) for execution of arithmatic and logical operations.

In addition, CPU may have some additional registers for temporary storage of data.

B. Input Unit :
With the help of input unit data from outside can be supplied to the computer. Program or data is read into main storage from input device or secondary storage under the control of CPU input instruction.
Example of input devices: Keyboard, Mouse, Hard disk, Floppy disk, CD-ROM drive etc.

C. Output Unit :
With the help of output unit computer results can be provided to the user or it can be stored in stograge device permanently for future use. Output data from main storage go to output device under the control of CPU output instructions. Example of output devices: Printer, Monitor, Plotter, Hard Disk, Floppy Disk etc.
D. Memory Unit :
Memory unit is used to store the data and program. CPU can work with the information stored in memory unit. This memory unit is termed as primary memory or main memory module. These are basically semi conductor memories.
There are two types of semiconductor memories -
Volatile Memory
RAM (Random Access Memory).
Non-Volatile Memory : ROM (Read only Memory), PROM (Programmable ROM)
EPROM (Erasable PROM), EEPROM (Electrically Erasable PROM).
Secondary Memory :
There is another kind of storage device, apart from primary or main memory, which is known as secondary memory. Secondary memories are non volatile memory and it is used for permanent storage of data and program.
Example of secondary memories:
Hard Disk, Floppy Disk, Magenetic Tape   ------    These are magnetic devices,
CD-ROM                                                               ------    is optical device
           Thumb drive (or pen drive)                            ------      is semiconductor memory
ALU:








Arithmatic


Logical

000
ADD


100
OR

001
SUB


101
AND

010
MULT


110
NAND

011
DIV


111
ADD
Instruction decoder: 
(to generate the appropriate signal at right moment)
Three input lines to the decoder and correspondingly it generates eight output lines
Three storage units in CPU,
 Two -- for storing the operand and
One -- for storing the results.
These storage units are known as register.
To access the data from memory, we need two special registers one is known as Memory Data Register (MDR) and the second one is Memory Address Register (MAR)
A memory module of capacity 16 X 4 indicates that, there are 16 location in the memory module and in each location, we can store 4 bit of information.
READ Operation: This operation is to retrive the data from memory and bring it to CPU register
WRITE Operation: This operation is to store the data to a memory location from CPU register
0, we say that we will do a READ operation; and if it is
1,    then it is a WRITE operation.
To transfer the data from CPU to memory module and vice-versa, we need some connection. This is termed as DATA BUS.
The size of the data bus indicate how many bit we can transfer at a time.
Each location can be specified with the help of a binary address.
If we use 4 signal lines, we have 16 different combinations in these four lines, provided we use two signal values only (say 0 and 1).
To distingush 16 location, we need four signal lines. These signal lines use to identify a memory location is termed as ADDRESS BUS. Size of address bus depends on the memory size. For a memory module of capacity of 2n location, we need n address lines, that is, an address bus of size n.
Address decoder to decode the address that is present in address bus
Consider a memory module of 16 locations and each location can store 4 bit of information
·         The size of address bus is 4 bit and the size of the data bus is 4 bit.
·         The size of address decoder is  4 X 16.
There is a control signal named R/W.
If R/W = 0,
we perform a READ operation and
If R/W = 1,
we perform a WRITE operation
If the contents of address bus is 0101 and contents of data bus is 1100 and R/W = 1, then 1100 will be written in location 5.
If the contents of address bus is 1011 and R/W=0, then the contents of location 1011 will be placed in data bus.
Memory Instruction
Instruction
Code
Meaning
1000
LDAI imm
Load register A with data that is given in the program
1001
LDAA addr
Load register A with data from memory location addr
1010
LDBI imm
Load register B with data
1011
LDBA addr
Load register B with data from memory location addr
1100
STC addr
Store the value of register C in memory location addr
1101
HALT
Stop the execution
1110
NOP
No operation
1111
NOP
No operation










When the signal of this new line is 0, it will indicate the ALU operation. For signal value equal to 1, it will indicate 8 new instructions. So, we can design 8 new memory access instructions.
The control unit is responsible to generate the appropriate signal.
We have seen that number of instructions that can be provided in a computer depends on the signal lines that are used to provide the instruction, which is basically the size of the storage devices of the computer.
For uniformity, we use same size for all storage space, which are known as register. If we work with a 16-bit machine, total instructions that can be implemented is 216.The model that we have described here is known as Von Neumann Stored Program Concept. First we have to store all the instruction of a program in main memory, and CPU can work with the contents that are stored in main memory. Instructions are executed one after another

No comments:

Post a Comment