Professional Documents
Culture Documents
FOC Unit 1
FOC Unit 1
FOC Unit 1
1. Primary Memory:
Its includes ROM and RAM, is located close to CPU on motherboard , enable
CPU to fetch data very quickly so it does not need to wait
2. Secondary memory:-
It is located separate device like HD or SSD, which is connected directly with
the system or through N/W
Fetching of data is slower.
Computer
Memory
Primary Secondary
Memory Memory
Magnetic Flash
RAM ROM HDD SSD CD
Tape Memory
Types of RAM:-
• DRAM:- Dynamic RAM
Its most common type of RAM used in the system
Before, we had DRAM with SDR, (Single DATA Rate) but now we have DRAM with DDR
(double Data Rate), with many versions of DDR that is DDR2, DDR3,DDR4 consists of
transistors and capacitors
• SRAM:- Static RAM
It is faster than DRAM because its contain around six transistors and capacitors in
each cell to fasten data access But as it contains expensive devices its very
expensive and bulkier.
SRAM doesn't need much energy for constant refreshing its data and maintaining
data integrity but as compare to the DRAM it needs more power to maintain
integrity
2.ROM :
• ROM reads only memory cannot write on it as RAM and it can be fetch
even after power cut directly by the CPU without help of drivers
• Usually it contains “ Boot Strap Code” which is basic set of instruction
needed to start operating system and peripheral device to make it ready
to use
Types of ROM :
1. PROM- Programmable Read Only Memory, It is made in a empty state ,
Later programmed and used and once programmed cannot be
overwritten.
2. EPROM- Erasable Programmable Read only Memory, data can be erased,
used UV lights and rebounded it.
3. EEPROM:- Electrically Erasable Programmable ROM, not strictly reads
only but write process is comparatively very slow so normally only
used to updated programmed code such as BIOS code
Secondary Memory
• Computer memory that is non-volatile, persistent and not immediately
accessible by a computer or processor. It allows users to store data and
information that can be retrieved, transmitted, and used by apps and
services quickly and easily. Secondary storage is another name for
secondary memory
Uses of Secondary Memory:
1. Permanent storage: secondary memory that can keep data indefinitely
even if the power supply is turned off unlike Primary Memory.
2. Large storage – Secondary memory provides a significant amount of
storage space, allowing us to store large amounts of data such as films,
photographs, audio files, and other items permanently.
3. Portable – Some of the secondary devices can be removed. As a result,
one can store data and transfer them effortlessly from one device to
another.
Types of Secondary Memory:
Impact Printers:
Impact printers print the characters by striking them on the ribbon,
which is then pressed on the paper.
Characteristics of Impact Printers are the following −
• Very low consumable costs
• Very noisy
• Useful for bulk printing due to low cost
• There is physical contact with the paper to produce an image
Laser Projector
5. Voice response system:
Directories
Drives.
FILES
• Computer files is a computer resource for recording data in a
computer storage device , Identified by it’s file name.
• Files can be shared or transferred between computer and mobile
devices via removable media , network or internet.
• Different types of computer files are meant to store different kinds
of data . It can be a image file , video file , program files etc
Ex :
.doc , .txt , .docx :- word related files or can sat text files.
.cpp , .c , .java :- these are program files .
.jpg , . Png , .jpeg :- these are all image files
.html , .script , .xml :- these are few of the web page based files run
on the browser.
Attributes of files :-
•Name : Each file carries its own name, can’t have two file with same in a
directory
•Identifier: Each file has its own extension, which identifies the type of file
•Location: where the file is stored in the file system
•Size: we mean the no. of bytes acquired by the file in the memory
•Protection: Each file contains its own set of permissions
Operation :-
•Create a file
•Open a file
•Read data from file
•Write data to file
•Delete a file
•Close a file
•Truncate / Compress a file
DIRECTORIES
A Directory is the collection of the correlated files on the disk. In simple
words, a directory is like a container which contains related file and
folder.
Directory can contain another directory called as sub directory or child
directory.
A directory can be comprised of various files. With the help of the
directory, we can maintain the information related to the files.
Master File
Directory
Dir 1 Dir 2
Dir 3 Dir 4
F1 F2 F3 F4
Types of information which are stored in a directory :
1. Name: - Name is the name of the directory, which is visible to the
user.
2. Type: - Type of a directory means what type of directory is present
such as single-level directory, two-level directory, tree-structured
directory, and Acyclic graph directory.
3. Size: - Size means number of bytes in the file
4. Protection: - Protection means access control on the
read/write/delete/execute.
Operations on Directory :
1. Creating: - In this operation, a directory is created. The name of the
directory should be unique
2. Deleting: - If there is a file that we don’t need, then we can delete
that file from the directory. We can also remove the whole
directory only when it is empty
3. Searching: - Searching operation means, for a specific file or
another directory, we can search a directory.
4. List a directory: - In this operation, we can retrieve all the files list in
the directory. we can also retrieve the content of the directory
entry for every file present in the list
Types of Directory Structure :
There are various types of directory structure
1. Single-Level Directory: -
Single-Level Directory is the easiest directory structure. There is
only one directory in a single-level directory, and that directory is
called a root directory . the user cannot create the subdirectories.
f1 f2 f3 f4 f5
2. Two-Level Directory :
• In this, it is possible to create an individual directory for each of the
users. There is one master node in the two-level directory that include
an individual directory for every user.
• Without permission, no user can enter into the other user’s directory.
• In a two-level directory, searching is more effective because there is
only one user’s list, which is required to be traversed.
User 1 User 2 User 3
D5 D6
D1 D2 D3 D4
f3 f4 f5 f6
f1 f2
3. Tree-Structured Directory:-
A Tree-structured directory is another type of directory structure in
which the directory entry may be a sub-directory or a file.
• The tree-structured directory reduces the limitations of the two-
level directory. We can group the same type of files into one
directory.
• The system administrator only has full access to the root directory.
• In this, searching is quite effective and we use the current working
concept.
• In the tree-structure directory, the same files cannot exist in the
multiple directories, so sharing the files is the main problem in the
tree-structure directory.
User 1 User 2 User 3
D5 D6
D1 D2 D3 D4
f4 f1 f3
f2
D7 D8 D9 D10
f2 f2 f2
4. Acyclic-Graph Directory :-
• With the help of the acyclic-graph directory, we can provide the
sharing of files.
• In the acyclic-graph directory, more than one directory can
point to a similar file or subdirectory. We can share those files
among the two directory entries.
• In the acyclic-graph directory, because of different paths,
searching is easy.
User 1 User 2 User3
f1 f2
DRIVES
13 ÷ 2 6 1 (LSB)
6÷2 3 0
3÷2 1 1
1÷2 0 1 (MSB)
Binary Subtraction:
Binary subtraction is just as simple as addition subtraction of one bit
from another obey the following four basic rules.
Binary Multiplication
Binary multiplication is similar to decimal multiplication.
It is simpler than decimal multiplication because only 0s and 1s are
involved.
There are four rules of binary multiplication.
• Example for Binary addition: