Sie sind auf Seite 1von 21

Components of a Computer

Principles of operation of a Digital Computer

Receives the data and instructions Processes the data as per the instructions Output the result i.e., information
IPO-Cycle Input Process Output

Instructions
2

Functional components of a computer system


A computer system has five basic functional units which are listed below

Input Unit Output Unit Control Unit Memory Unit Arithmetic Logic Unit

Central Processing Unit

Flow diagram of a CPU


Control Unit

Input unit
E.g.. Keyboard

ALU

Output unit
E.g.. Monitor/Printer

Memory unit

Processor
4

Control Unit

Controls the overall operation of the comp sys Heart of the comp sys Directs all other units to operate in a proper way Co-ordinates various operations performed

Arithmetic and Logic Unit

Performs Arithmetic and Logic operations on data Consists of Circuits and Registers +, -, *, / <, >, <=, >= Adders

Memory Unit
Memory

Main memory/ Primary Memory

Auxiliary Memory/ Secondary Memory

Magnetic Core Memory

Semi-conductor Memory

RAM Dynamic Static PROM

ROM

EPROM

EEPROM
7

Magnetic Core Memory/Ferrite Core Memory

Consists thousands of tiny doughnut shaped ferrite cores arranged in array of 64*64. Electric current passing through the wires can magnetise the cores in 2 directions. Fairly fast, capable of transferring 2.4 million characters per second Memory access time is about nanosecond Non-Volatile Relatively large and heavy

Semi - Conductor Memory

Based on the principle of storage chips A very thin silicon chips contains a no of small storage cells that can be hold data. Faster and more expensive semi conductor chips Volatile Faster than magnetic core memory Relatively small and light

Dynamic RAM

Static RAM

Needs constant supply of electrical pulse Faster Refresh rate

Requires voltage Refreshing is not required slower

10

ROM

PROM EPROM EEPROM


Measurement of Memory
8 bits 1024 b 1024 kb 1024 mb 1024 gb 1 Byte 1 Kilo Byte 1 Mega Byte 1 Giga Byte 1 Tera Byte
11

Computer Languages
Low Level Middle Level C Binary Language Assembly Language C++ COBOL JAVA High Level

12

Language Processors

Assembler Linker and Loader Compiler Interpreter

13

compilers

A program that translates source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions. Thus, a compiler differs from an interpreter, which analyzes and executes each line of source code in succession, without looking at the entire program. The advantage of interpreters is that they can execute a program immediately. Compilers require some time before an executable program emerges. However, programs produced by compilers run much faster than the same programs executed by an 14 interpreter.

Every high-level programming language (except strictly interpretive languages) comes with a compiler. In effect, the compiler is the language, because it defines which instructions are acceptable. Because compilers translate source code into object code, which is unique for each type of computer, many compilers are available for the same language. For example, there is a FORTRAN compiler for PCs and another for Apple Macintosh computers. In addition, the compiler industry is quite competitive, so there are actually many compilers for each language on each type of computer. More than a dozen companies develop and sell C compilers for the PC.

16

Assembler

the assembly language, a computer program to translate between lowerlevel representations of computer programs; it converts basic computer instructions into a pattern of bits which can be easily understood by a computer and the processor can use it to perform its basic operations
17

Assemblers Assemblers need to translate assembly instructions and pseudoinstructions into machine instructions Convert decimal numbers, etc. specified by programmer into binary Typically, assemblers make two passes over the assembly file First pass: reads each line and records labels in a symbol table Second pass: use info in symbol table to produce actual machine code for each line
18

Linker and loaders


Linker Tool that merges the object files produced by separate compilation or assembly and creates an executable file Three tasks Searches the program to find library routines used by program, e.g. print f(), math routines, Determines the memory locations that code from each module will occupy and relocates its instructions by adjusting absolute references Resolves references among files

19

Loader

Part of the OS that brings an executable file residing on disk into memory and starts it running Steps Read executable files header to determine the size of text and data segments Create a new address space for the program Copies instructions and data into address space Copies arguments passed to the program Initializes the machine registers Jumps to a startup routine that copies the programs
20

Interpreter

An interpreter translates high-level instructions into an intermediate form, which it then executes. In contrast, a compiler translates high-level instructions directly into machine language. Compiled programs generally run faster than interpreted programs. The advantage of an interpreter, however, is that it does not need to go through the compilation stage during which machine instructions are generated. This process can be time-consuming if the program is long. The interpreter, on the other hand, can immediately execute highlevel programs. For this reason, interpreters are sometimes used during the development of a program, when a programmer wants to add small sections at a time and test them quickly. In addition, interpreters are often used in education because they allow students to program interactively.
21

Das könnte Ihnen auch gefallen