Week 1 Note
Week 1 Note
REGISTERS:
Registers are used to quickly accept, store and transfer data and instructions that are being used
immediately by the CPU. There are different types of registers, accumulator, program counter,
memory data register, memory buffer register. Registers are temporary storage
area for instructions or data. They are not a part of memory; rather they are special additional
storage locations that offer the advantage of speed. It works under the direction of the control unit
to accept, hold, and transfer instructions or data and perform arithmetic or
logical comparisons at high speed. Most operations are done on the register; the processor can't
directly perform arithmetic in memory. For example, if you want to add 1 to a memory address, the
processor will normally do this by loading the initial value from memory into a register, adding 1 to
the register, and then saving the value back to
memory.
TYPES OF REGISTER
(a) MDR (Memory Data Register): This is the register of a computer's control unit that contains the
data to be
stored in the computer storage (e.g. RAM) or the data after a fetch from the computer storage. It
acts as a buffer and holds anything that is copied from the memory ready for
the processor to use it.
(b) CIR (Current Interrupt Register): It captures the
value that is winning the interrupt arbitration. The CIR is
updated at the beginning of an interrupt acknowledge bus
cycle or in response to an update CIR command. The
contents remain in the CIR until another interrupt
acknowledge cycle or update CIR Command occurs.
(c) User - Accessible Register: The most common
division of user-accessible registers is into data registers
and address registers.
(d Data Registers: They are used to hold numeric values such as integer and floating-point values.
(e) GPRs (General Purpose Registers): They can store both data and addresses.
(f) FPRs (Floating Point Registers): They store floating-point numbers in many architectures.
(g) Constant Registers holds read-only values such as
one, or pi.
(h) Special Purpose Registers: They hold program state
(i) Instruction Registers store the instruction currently
(j) being executed.
(k) (j) Model - Specific Register (also known as machine -
(l) specific register) store data and settings related to the
(m) processor itself.
ADDRESS:
Address Is the code that identifies where a piece of
information is stored. A memory address is an identifier for
a memory location, at which a computer program or a hardware device can store data and later
retrieve it. In modern byte-addressable computers, each address identifies a single byte of storage;
data too large to be
stored in a single byte may reside in multiple bytes occupying a sequence of consecutive addresses.
Some microprocessors were designed to be word-addressable
so that the addressable storage unit was larger than a
byte. The efficiency of addressing of memory depends on the size of the address bus.
Diagram…………….
BUS: Is a collection of wires through which data is transmitted from one part of a computer to
another. A bus, in computing, is a set of physical connections (cables, printed circuits etc.) which
can be shared by multiple
hardware components in order to communicate with one
another. The purpose of a system bus is to reduce the
number of pathways needed for communication between
the components, by carrying out all communications over a single data channel.
CHARACTERISTICS OF BUS
1. A bus is characterized by the amount of information that can be transmitted at once.
2. Width is used to refer to the number of bits that a bus can transmit at once.
3. Frequency is the speed of the bus, which is the number of data packets sent or received per
second. It is expressed in Hertz (Hz).
4. A cycle is each time that data is sent or received.
5. Transfer speed is the amount of data which it can transport per unit of time. It is the product of
width and frequency.
TYPES OF BUS
1. Control Bus
2. Address Bus
3. Data Bus
BUS SUB-ASSEMBLY
Each bus is generally constituted of 50 to 100 physical lines, divided into three sub-assemblies
which are:
) Address bus (sometimes called memory bus)
transports memory addresses which the processor wants
to access in order to read or write data.
(ii) Data bus transfers instructions coming from or going to the processor. It is a bidirectional bus.
(iii) Control bus (or command bus) transports orders and
synchronization signals coming from the control unit and travelling to all other hardware
components. It is a
bidirectional bus, as it also transmits response signals from the hardware.
2. Addressing - A bus has address lines, which match those of the processor. This allows data to be
sent to or from specific memory locations.
3. Power- A bus supplies power to various peripherals
that are connected to it.
4. Timing- The bus provides a system clock signal to
synchronize the peripherals attached to it with the rest of
the system.
COMPUTER FILES
A computer file is a resource for storing information which
is available to a computer program and is usually based on
some kind of durable storage. A computer file can be considered as the modern counterpart of
paper
documents which are traditionally kept in offices and
libraries. A file is "durable" in the sense that it remains available for other programs to use after the
program that created it has finished executing.
Files are a collection of data in a permanent storage media such as hard drive, CD or DVD ROM,
floppy disk, memory card, flash drive etc.
A record is a valve that contains other values typically in
fixed numbers and typically indexed by names. The
elements of records are usually called fields or members.
A data item is an atomic state of a particular object
concerning a specific property at a certain time.
FUNCTIONS OF FILE
(i) It provides machine-executable code which is used to
run application programs and the operating system.
(in) It stores application programs or operating system
configuration information.
(iii) It stores data used by the user such as Ms Word.
Files: As we know that Computers are used for storing the information for a Permanent Time or the
Files are used
for storing the Data of the users for a Long time Period.
And the files can contain any type of information means
they can Store the text, any Images or Pictures or any data in any Format. So that there must be
Some Mechanism those are used for Storing the information, Accessing the information and also
Performing Some Operations on the
files.
1. Creating a file: Two steps are necessary to create a
file.
• Space in the file system must be found for the
file.
• An entry for the new file must be made in the
directory.
2. Writing a file: To write a file, we make a system call specifying both the name of the file and the
information to be written in the file. The system must
keep a write pointer to the location in the file where
the next write is to take place.
3. Deleting a file: To delete a file, we search the directory for the named file. Having found the
associated directory entry, we release all file spaces so that it can be re-used by other files and erase
the
directory entry.
File Operations
The basic file operations are:
• Create - making a new file
• Delete - removal of a file
• Retrieve - to find and bring back a file
• Cop - to reproduce and original piece of work
• View - to see a file in a folder
• Update - to make changes to a document or design
• Open - to open an already created file for the
purpose of editing
• Close - to close a file when done with it.
10 CLS
40 CLOSE 1
50 END
CODE
The combination of all these records forms a file. Thus, a file is a group of related records.
To facilitate the retrieval of specific records from a file, at least one field in each record is chosen as
the record key.
Usually, the key is unique to every record to avoid duplication of records in a file.