0% found this document useful (0 votes)
11 views26 pages

Unit-1 1

A computer is an electronic calculating machine that accepts input, processes it according to stored instructions, and produces output. Its functional units include the input unit, memory, arithmetic and logic unit (ALU), and output unit, all coordinated by a control unit. Data is represented in binary form, and the computer's operation involves communication between these units through a bus structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views26 pages

Unit-1 1

A computer is an electronic calculating machine that accepts input, processes it according to stored instructions, and produces output. Its functional units include the input unit, memory, arithmetic and logic unit (ALU), and output unit, all coordinated by a control unit. Data is represented in binary form, and the computer's operation involves communication between these units through a bus structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

What is a computer?

 a computer is a sophisticated electronic calculating


machine that:
 Accepts input information,
 Processes the information according to a sequence
of internally stored instructions and
 Produces the resulting output information.
 Functions performed by a computer are:
 Accepting information to be processed as input.
 Storing a sequence of instructions to process the
information.
 Processing the information according to the
sequence of instructions.
 Providing the results of the processing as output.
 What are the functional units of a computer?
1
Functional units of a computer
Input unit accepts Arithmetic and logic unit(ALU):
information: •Performs the desired
•Human operators, operations on the input
•Electromechanical devices (keyboard) information as determined
•Other computers by instructions in the memory

Memory
Arithmetic
Input
Instr1 & Logic
Instr2
Instr3
Data1
Output Data2 Control

I/O Processor
Stores
information: Control unit coordinates
Output unit sends various actions
•Instructions,
results of processing: •Input,
•To a monitor display, •Data
•Output
•To a printer •Processing

2
Information in a computer --
Instructions
 Instructions specify commands to:
 Transfer information within a computer (e.g., from memory
to ALU)
 Transfer of information between the computer and I/O
devices (e.g., from keyboard to computer, or computer to
printer)
 Perform arithmetic and logic operations (e.g., Add two
numbers, Perform a logical AND).
 A sequence of instructions to perform a task is called a
program, which is stored in the memory.
 Processor fetches instructions that make up a program
from the memory and performs the operations stated in
those instructions.
 What do the instructions operate upon?

3
Information in a computer -- Data
 Data are the “operands” upon which instructions
operate.
 Data could be:
 Numbers,
 Encoded characters.
 Data, in a broad sense means any digital information.
 Computers use data that is encoded as a string of
binary digits called bits.

4
Input unit
Binary information must be presented to a computer in a specific format. This
task is performed by the input unit:
- Interfaces with input devices.
- Accepts binary information from the input devices.
- Presents this binary information in a format expected by the computer.
- Transfers this information to the memory or processor.
Real world Computer

Memory

Keyboard
Audio input
Input Unit
……

Processor

5
Memory unit
 Memory unit stores instructions and data.
 Recall, data is represented as a series of bits.
 To store data, memory unit thus stores bits.
 Processor reads instructions and reads/writes data
from/to the memory during the execution of a program.
 In theory, instructions and data could be fetched one bit at
a time.
 In practice, a group of bits is fetched at a time.
 Group of bits stored or retrieved at a time is termed as
“word”
 Number of bits in a word is termed as the “word length” of
a computer.
 In order to read/write to and from memory, a processor
should know where to look:
 “Address” is associated with each word location.

6
Memory unit (contd..)
 Processor reads/writes to/from memory based on the
memory address:
 Access any word location in a short and fixed amount of
time based on the address.
 Random Access Memory (RAM) provides fixed access time
independent of the location of the word.
 Access time is known as “Memory Access Time”.

 Memory and processor have to “communicate” with


each other in order to read/write information.
 In order to reduce “communication time”, a small amount
of RAM (known as Cache) is tightly coupled with the
processor.
 Modern computers have three to four levels of RAM units with
different speeds and sizes:
 Fastest, smallest known as Cache
 Slowest, largest known as Main memory.

7
Memory unit (contd..)
 Primary storage of the computer consists of RAM units.
 Fastest, smallest unit is Cache.
 Slowest, largest unit is Main Memory.

 Primary storage is insufficient to store large amounts of


data and programs.
 Primary storage can be added, but it is expensive.
 Store large amounts of data on secondary storage
devices:
 Magnetic disks and tapes,
 Optical disks (CD-ROMS).
 Access to the data stored in secondary storage in slower,
but take advantage of the fact that some information may
be accessed infrequently.
 Cost of a memory unit depends on its access time,
lesser access time implies higher cost.
8
Arithmetic and logic unit (ALU)
 Operations are executed in the Arithmetic and Logic
Unit (ALU).
 Arithmetic operations such as addition, subtraction.
 Logic operations such as comparison of numbers.
 In order to execute an instruction, operands need to be
brought into the ALU from the memory.
 Operands are stored in general purpose registers available
in the ALU.
 Access times of general purpose registers are faster than
the cache.
 Results of the operations are stored back in the memory
or retained in the processor for immediate use.

9
Output unit
•Computers represent information in a specific binary form. Output units:
- Interface with output devices.
- Accept processed results provided by the computer in specific binary form.
- Convert the information in binary form to a form understood by an
output device.

Computer Real world

Memory Printer
Graphics display
Speakers
……
Output Unit

Processor

10
Control unit
 Operation of a computer can be summarized as:
 Accepts information from the input units (Input unit).
 Stores the information (Memory).
 Processes the information (ALU).
 Provides processed results through the output units
(Output unit).
 Operations of Input unit, Memory, ALU and Output unit
are coordinated by Control unit.
 Instructions control “what” operations take place (e.g.
data transfer, processing).
 Control unit generates timing signals which determines
“when” a particular operation takes place.

11
How are the functional units
connected?
•For a computer to achieve its operation, the functional units need to
communicate with each other.
•In order to communicate, they need to be connected.

Input Output Memory Processor

Bus

•Functional units may be connected by a group of parallel wires.


•The group of parallel wires is called a bus.
•Each wire in a bus can transfer one bit of information.
•The number of parallel wires in a bus is equal to the word length of
a computer

12
Organization of cache and main memory

Main Cache
memory memory Processor

Bus

13
Computer Components: Top-Level
View
Bus Structures

 A group of lines that serves a connecting path for


several devices is called a bus
 In addition to the lines that carry the data, the bus must
have lines for address and control purposes
 The simplest way to interconnect functional units is to
use a single bus, as shown below
Drawbacks of the Single Bus
Structure
 The devices connected to a bus vary widely in their speed
of operation
 Some devices are relatively slow, such as printer and
keyboard
 Some devices are considerably fast, such as optical
disks
 Memory and processor units operate are the fastest
parts of a computer
 Efficient transfer mechanism thus is needed to cope with
this problem
 A common approach is to include buffer registers with
the devices to hold the information during transfers
 An another approach is to use two-bus structure and an
additional transfer mechanism
• A high-performance bus, a low-performance, and a
bridge for transferring the data between the two
buses. ARMA Bus belongs to this structure
Software
 In order for a user to enter and run an application
program, the computer must already contain some
system software in its memory

 System software is a collection of programs that are


executed as needed to perform functions such as
 Receiving and interpreting user commands
 Running standard application programs such as
word processors, etc, or games
 Managing the storage and retrieval of files in
secondary storage devices
 Controlling I/O units to receive input information
and produce output results
Software

 Translating programs from source form prepared


by the user into object form consisting of machine
instructions

 Linking and running user-written application


programs with existing standard library routines,
such as numerical computation packages

 System software is thus responsible for the


coordination of all activities in a computing system
Operating System
 Operating system (OS)
 This is a large program, or actually a collection of
routines, that is used to control the sharing of and
interaction among various computer units as they
perform application programs
 The OS routines perform the tasks required to assign
computer resource to individual application programs
 These tasks include assigning memory and magnetic
disk space to program and data files, moving data
between memory and disk units, and handling I/O
operations
 In the following, a system with one processor, one disk, and
one printer is given to explain the basics of OS
 Assume that part of the program’s task involves reading
a data file from the disk into the memory, performing
some computation on the data, and printing the results
User Program and OS Routine
Sharing
Multiprogramming or Multitasking
Interrupt
 Normal execution of programs may be interrupted if some
device requires urgent servicing
 To deal with the situation immediately, the normal execution
of the current program must be interrupted

 Procedure of interrupt operation


 The device raises an interrupt signal
 The processor provides the requested service by executing an
appropriate interrupt-service routine
 The state of the processor is first saved before servicing the
interrupt
• Normally, the contents of the PC, the general registers, and
some control information are stored in memory
 When the interrupt-service routine is completed, the state of
the processor is restored so that the interrupted program may
continue
Error-Detection: Parity Bit

27
28
Odd Parity

29
30

You might also like