Beruflich Dokumente
Kultur Dokumente
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
Input Unit Output Unit Control Unit Memory Unit Arithmetic Logic 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
Performs Arithmetic and Logic operations on data Consists of Circuits and Registers +, -, *, / <, >, <=, >= Adders
Memory Unit
Memory
Semi-conductor Memory
ROM
EPROM
EEPROM
7
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
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
10
ROM
Computer Languages
Low Level Middle Level C Binary Language Assembly Language C++ COBOL JAVA High Level
12
Language Processors
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
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