Beruflich Dokumente
Kultur Dokumente
Types of memories
Main memory Secondary (Auxiliary) memory
ROM Memory
Static
Memory
Memory
RAM Memory
Primary (Main) Memory
Masked ROM
Auxiliary (Secondary) Memory
Dynamic
Memory
PROM EROM EEROM
Memory
The semiconductor memory is employed as main memory or
primary memory of the computer.
RAM ROM IC are used as the main memory of computer.
The magnetic and optical memory are used as secondary memory.
Secondary memory is employed for bilk storage or mass storage
of programs data and other information.
Backup memory is used to store the copy of the important
programs such as OS, compliers etc. floppy disk CDs and
magnetic disks are used as back up memory.
The cache memory is placed in between CPU and the main
memory. It is semiconductor memory, and is faster than main
memory. Write through and write back cache schemes are used in
computers.
The diagrams shown below represents the memory hierarchies as
per the speed of operation.
Computing & Informatics L-10
C
P
Primary
Memory
Secondary
Memory
7
U
Cache
MEM
Primary
Memory
Secondary
Memory
C
P
U
Semiconductor Memory
Semiconductor are of two types: Random access Memory RAM
and Read only memory ROM.
The read write memory is commonly called RAM.
RAMs
RAM is volatile memory, the information exist in the memory till
Computing & Informatics L-10
8
the power is on.
Two types of RAM are: Static RAM and Dynamic RAM.
Static RAM stores information as long as power is on.
In case of Dynamic RAM the the information stored is lost in
very short time (few milliseconds). Hence these are to be
refreshed periodically.
For this purpose RAM controller are used.
Semiconductor Memory
Static RAM uses Flip flops whereas Dynamic RAM uses gates
with capacitor so it requires less transistors per memory.
Extended Data Output RAM (EDO-RAM): any memory access
stores bytes of data into latches. Latches holds next 256 bytes of
information.
SDRAM (Synchronous DRAM): these RAM chips uses the same
Computing & Informatics L-10
9
clock rate as the CPU, so it remains ready to transfer data when
needed by the CPU.
DRAM (Dual-Ported RAM: allows to access two memory
locations simultaneously, also called video RAM (VRAM or
WRAM windows RAM)
SIMM & DIMM: single inline & double inline modules are small
printed ckt cards on which several DRAM chips are placed.
Semiconductor Memory
ROMs
ROM is non-volatile memory, the information exist in the
memory even if the the power goes off. Used fro permanent
storage of data. They are cheaper as compared to RAM.
PROM: programmable ROM. Its content can be decided by the
user. The user can store permanent programs using PROM
Computing & Informatics L-10
10
programmer.
EPROM: in erasable PROM stored data can be erased by
exposing it it to high intensive SW ultraviolet light.
EEPROM: electrically erasable PROM can be erased and
reprogrammed on board easily on a byte by byte basis.
Flash memory: it is EEPROM but uses one transistor per cell.
Nonvolatile RAM: high speed RAM & EEPROM are packed in
one chip to form non volatile RAM.
Memory Controller
it.
Read write head and disks are kept in sealed, air filtered enclosure
Computing & Informatics L-10
14
To increase capacity several hard disks are mounted on common
drive to constitute disk pack.
RAID Systems:
Redundant Arrays of Inexpensive Disks (RAID) system disks
operate in parallel and stores the same information.
Improves the storage reliability by eliminating the risk of data lost.
Large files is stored in many disks by breaking the file into groups.
Optical Memory
Information is written in the disks using the laser beam.
Provides the larger capacity. And has longer life.
Slow access time of the drive.
No chance of head crash, since head does not touch disk.
Computing & Informatics L-10
15
Three types CD ROM (prerecorded data can be read out)
WROM ( write once and read many times)
Erasable optical Disk (write many and read many times)
Now DVD (Digital Versatile Disks) are also coming which has
more capacity to store data than a CD.
It contains more layers.
PCMCIA Cards and Slots
PCMIA stands for Personal Computer Memory Card International
Association. These are smart cards becoming standard feature for
desktop and portable machines.
PCMCIA slots (socket) are designed to fit into floppy drive
mounting bays.
These slots can be used for exchanging data using PCMCIA
Computing & Informatics L-10
16
cards.
Type-I type has 34 pin connector 3.3 mm thick, whereas type-II
cards are 5 m thick and have 68 pins and type-III cards are 10.5
mm thick and have 68 pin connector. Type-IV has 166mm thick.
These cards and slots supports hot insertion.
Computing & Informatics L-11
Input Output Devices
Keyboard
Mouse
Monitor
17
Printer
Other I/O devices
Software
Input and Output Devices
The input/ output devices (I/O) and secondary storage units of
Terminal
Drivers
Foreground
Background
Editors
Compiler
Unix to Unix
copy UCP
Device Driver
Memory manager
USER
WINDOWS
It is designed for home use.
It is a graphical user interface of Microsoft Corporation. The GUI
provides picture oriented interface.
Windows presents programs, procedure, files, commands etc. as
graphical symbols.
The different versions of Windows are Windows-3, Windows-3.1,
Computing & Informatics L-12
49
Windows-3.11, Windows-95, Windows-98, Windows-2000 or
Windows-Millennium, Windows-NT and Windows-XP.
Windows 95 is a mixed 16 bit and 32 bit multitasking OS.
Windows 98 is a faster and easy to use OS.it si a 32 bit operating
system.
The internet online environment is more closely associated with
Windows 98 desktop computers.
WINDOWS
Windows 98 provides plug and play facility. It is also a
multitasking operating system.
Windows-NT is 32 bit multi user OS. It provides multitasking
features. It can run on microprocessors of other companies other
than Intels.
Windows supports TCP/IP/IPX/SPX data link control for
Computing & Informatics L-12
50
mainframes.
Windows-NT provides Client server working mode, which is used
in networking of computing systems.
The Windows XP embedded OS is used in devices such as hand
held computers, TV set-top-boxes and automated industrial
machines.
Utility Programs
The utility programs are software tools to help programmers in
developing, writing, debugging and documenting programs.
They cane either file management or program development
utilities.
File management utilities are part of OS. The program
development utilities help user in writing and testing programs.
72
Reserved words name can not be used for variable name.
ANSI restrict variable to be of 32 character.
Variables are created to store the value of data object in the
program. Result of an computational statement may be assigned
to a variable.
Data Types
Relational Operator: it is used to compare the value of two
variable for various such as greater than, les than etc.
> is greater than, >= is greater than equal to, < is less than, <= is less
than equal to, = = equal to, != not equal to.
Logical Operator: an expression, which combines two or more
relation operator is called logical expression. These expression
Computing & Informatics L-14
73
results ion true or false.
&& is logical AND, !! Logical OR, ! is logical NOT.
Conditional Operator: it is used in place of if-then-else
construct.
Exp1 ? Exp2 : Exp3, here Exp1is evaluated first if its found true then
Exp2 is evaluated otherwise Exp3 is evaluated.
Val = (l>k) ? L : k here if L>k then Val will be = to l else Val = K.
Data Types
Library Functions: the library functions are the well defined
functions for performing the specific task in a program.
The compiler evaluates these functions.
In C some mathematical functions are also allowed, these
functions are called mathematical functions.
In order to use these library functions it is necessary to use header
Computing & Informatics L-14
74
files. The header files are logical collection of various functions.
If the header files are not included the functions can not be used.
Some of the common header files are stdio.h, math.h, conio.h etc.
The library functions are not the part of the language but these are
supplied with the compiler.
Input and Output statement
Input instruction is provided for getting necessary input from the
user of the program.
Scanf: this function is used to input a set of values.
scanf(FS, list of arguments)
Here FS is known as format string and list of argument contains the
variable in to which the value or data from the standard input will
Computing & Informatics L-14
75
be stored.
Example: scanf(%d %s %f, &integer1, string1,&integer2);
This statement will store a decimal type integer data to integer1 (a
variable defined in the program), string to variable String1 and
ESS
TPS- Transaction processing system MIS- Management information system
KWS- Knowledge work station DSS- Decision support system
ESS- Executive support system
Information system for decision making
A decision support system is system that provides tools to mangers
to assist them in solving semi structured and unstructured problems.
A DSS is not intended to make decision but rather than to assist for
decision making.
Characteristics of DDS are they support semi structured or
unstructured decision making. They are flexible enough to respond
to the changing needs of decision maker and they are easy to use.
The component of a DSS are hardware, software and data is
necessary to provide interactive decision support.
Computing & Informatics L-15
82
Decision
maker
Management
work station
Interactive
decision
support
Database
Management
Dialogue generation
and management
DSS generator
Model Management
database
Model
base
Data management
Data management is the most important aspect for an organization
since it provides the ability to complete most business activities.
Data management is a way of keeping the raw facts in special
manner suitable to use it in efficient manner.
Data is generally organized in a hierarchy that begins with
smallest data used by computer (bit).
Computing & Informatics L-15
83
Character data is basic building block of information.
Characters are put together to form a field. A collection of related
fields is record.
A collection of related records is a file.
At the highest level of this data hierarchy is data base, a collection
of integrated and related files.
Data management
An entity is a generalized class of people, places or things for
direction at time.
Computing & Informatics L-15
92
Network topology Design:
The topology means the form. Network may have any one of the
following forms.
Star topology each device is connected to a central device called
hub the communication between to DTE is by using Hub only not
directly.
In tree topology the equipment are connected in a hierarchical
manner.
Office automation system-LAN, WAN
Network topology Design:
In Bus topology the equipment are connected with each other using
a common bus.
Ring topology a ring of connected equipment is formed.
In mesh topology the each equipment is connected to each
equipment using a dedicated link.
Categories of network.
Computing & Informatics L-15
93
Computer networks that are confined to a localized are I.e. an office
are known as local area network LAN.
Computer network based on DQDB (distributed queue dual bus)
mechanism designed to extend over an entire city is Metropolitan
Area Network (MAN).
Computer networks that covers large geographical areas that may
comprise a country a continent or even whole world is wide area
Network (WAN).
Computing & Informatics L-16
C language
Control Structure
94
Array
Control Structure
Decision making and looping is one of the basic construct of any
programming language.
In C language the IFTHEN..ELSE, WHILE, DO..WHILE,
FOR, BREAK and SWITCH are control structures statements.
If Then Else statement: is provided for decision making. If the
out come of expression in If is true then the group of statement
Computing & Informatics L-16
95
mentioned in Then clause is executed otherwise Else is executed.
If (condition expression)
{ Statement set1; }
Else
{ statement set2; }
Control Structure
}
}
else
{
if (c>b)
{
printf("largest number is %d\n",c);
}
else
{
printf("largest number is %d\n",b);
}
}
getch();
}
Control Structure
While statement: is provided for repeated execution of
statements. The statements are executed until the condition is
fulfilled.
While (condition expression)
{
Statement set;
}
Computing & Informatics L-16
98
/* this is a program to calculate m to the
power n*/
#include
#include
main()
{
int m,n,count;
Float pow;
clrscr();
Control Structure
/*body of program*/
printf("This program gives the M to power
N\n");
printf("Please give value of M and N\n");
scanf("%d %d",&m,&n);
count=1;
pow = m;
while(count
Computing & Informatics L-16
99
{
pow=pow*m;
count++;
}
}
Control Structure
switch statement: this statement in C provides the multiple
branch selection. It checks for value of an expression against a list
of integer or character. If the match is successful, the group of
statement is executed
Switch (expression)
{
caseconstant 1:
Statement set2;
break;
Computing & Informatics L-16
103
caseconstant 2:
Statement set2;
break;
case constant 3:
Statement set3;
break;
.
.
Default:
Statement set3;
}
Control Structure
Break and Goto statement: these statements are used in C to
change the flow of execution. The break is used in conjunction
with switch case however this statement can be used to
discontinue the loop.
Main()
{
int I=1;
While (I<100)
{
Computing & Informatics L-16
104
printf( the number = %d\n,I);
I++
If (I==20) break;
}
}
Use of go to
Goto LABLE;
Statement set1;
.
.
LABLE: statement set 3;
Arrays
An array is a collection of variables of same type that are
}
/* now the multiplication*/
for(i=0;i
{
for(j=0;j
Arrays
/* now the multiplication*/
for(i=0;i
{
for(j=0;j
{
c[i][j]=0;
for(x=0;x
{
c[i][j]=c[i][j]+a[i][x]*b[x][j];
}
}
}
Computing & Informatics L-16
110
/* To Show the OUTPUT MATRIX*/
printf("The Multiplied or Output Matrix is \n\n");
for(i=0;i
{
for(j=0;j
{
printf("%8d",c[i][j]);
}
printf("\n");
}
}
printf("\n THANK YOU\n");
getch();
}
Arrays
The output of the program is as follows:
program for multiplication of two matrix
The coloumn of FIRST Matrix should be equal to row of SECOND Matrix
Give the no of rows in the First Matrix
2
Give the no of coloumn in the First Matrix
2
Give the no of rows in the Second Matrix
2
Give the no of coloumn in the Second Matrix
Computing & Informatics L-16
111
3
Give the give the elements of first Matrix
Give the 1 row & 1 coloumn elementof first Matrix
1
Give the 1 row & 2 coloumn elementof first Matrix
3
Give the 2 row & 1 coloumn elementof first Matrix
2
Give the 2 row & 2 coloumn elementof first Matrix
4
Arrays
Give the give the elements of Second Matrix
Give the 1 row & 1 coloumn elementof Second Matrix
1
Give the 1 row & 2 coloumn elementof Second Matrix
3
Give the 1 row & 3 coloumn elementof Second Matrix
5
Give the 2 row & 1 coloumn elementof Second Matrix
2
Give the 2 row & 2 coloumn elementof Second Matrix
4
Give the 2 row & 3 coloumn elementof Second Matrix
Computing & Informatics L-16
112
6
The First Matrix is
13
24
The Second Matrix is
135
246
The Multiplied or Output