0% found this document useful (0 votes)
9 views16 pages

chapter one

The document provides an introduction to fundamental programming and computer systems, covering key concepts such as the definition of computers, their characteristics, and the relationship between hardware and software. It explains how computers process data, the components of a computer system including the CPU, input and output devices, and the importance of information technology. The text emphasizes the role of computers in modern society and their capabilities in data processing and storage.

Uploaded by

Haimanot Dubale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views16 pages

chapter one

The document provides an introduction to fundamental programming and computer systems, covering key concepts such as the definition of computers, their characteristics, and the relationship between hardware and software. It explains how computers process data, the components of a computer system including the CPU, input and output devices, and the importance of information technology. The text emphasizes the role of computers in modern society and their capabilities in data processing and storage.

Uploaded by

Haimanot Dubale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

WACHEMO UNIVERSITY Introduction to Fundamental prog

ORGANIZATION OF COMPUTER SYSTEM

Department of COMPUTER SCIENCE


2017
Introduction to Fundamental programming Chapter One

Chapter one: Introduction to computer and programming interactive materials that enable the user to employ them for a wide
1.1. Introduction to various terms and terminology of ICT range of teaching - learning processes in addition to personal use."
Today‘s world is a world of computer and related technology These technologies include computers, the Internet, broadcasting
including information explosion. This information explosion is taking technologies (radio and television), and telephony. "ICT is that
place in such a fast speed that even a literate person is feeling as if he
technology which uses the information to meet human need or
or she is illiterate being not able to cope up with such an information
explosion. purposes including processing and exchanging. The term "technology"
Data is the name given for a collection of facts which concerning implies to the application of science to art.
people, objects, events or other entities. i.e., Data is raw facts which
Information technology (IT) is the acquisition, processing, storage,
can be processed or manipulated to produce information.
manipulation, management, transmission and dissemination of vocal,
Information: refers to any communication or representation of pictorial, textual and numerical information by a micro-electronics -
knowledge such as facts, data or opinions in any medium or for, based combination of computing and telecommunication. Information
including textual, numerical, graphic, cartographic, narrative or Technology is a scientific, technological and engineering discipline
audiovisual forms. Information is the meaningful, organized and useful and management technique used in handing the information, it‘s
data that is relevant, accurate, up to date, and can be used to make application and association with social, economic and cultural matters.
decisions. It can also refer to a Data which is presented in a suitable 1.2. Definition of computer
form for interpretation. The term ‘computer’ is derived from the word ‘compute’, which

“Information is backbone of any organization.” means to calculate. Computer is defined as an electronic devices,
operating under control of instruction (software) stored in its own
ICT (Information and communication technology) is defined as a memory unit, that can accept data(input), manipulate data (process),
"diverse set of technological tools and resources used to communicate, and produce information(output) from processing.
create, disseminate, store, and manage information." ICT implies the
technology which consists of electronic devices and associated human

Compiled by Selam B. Department of Software Engineering Page 2


Introduction to Fundamental programming Chapter One

A computer can also be defined as an electronic device which accepts 1.3. Characteristics of Computers
an input, process the input according the instruction provided and Man developed computers so that he could perform intricate
produce the desired output. Computer composed of hardware device, operations such as calculation and data processing or simply for
Software and electric circuit. entertainment. Today, computers are everywhere – in our offices,
homes, appliances, automobiles – the list is endless. Much of the world
Generally, Computer is a device or set of devices that work under the
runs on computers, and computers have profoundly changed our lives,
control of a stored program, automatically accepts and processes data
mostly for the better.
to provide information. It simplifies human works by automating.
 Let us discuss some of the characteristics of a computer,
How computer works?Computer first, accepts data such as raw
which make them an essential part of every emerging
facts, figures, and symbol using input devices then, Processes data into
technology and such a desirable tool in human development.
information using different internal devices. Finally, Produces output
Speed: The computers process data at an extremely fast rate, that is, to
using output devices and stores results using storage devices.
the tune of million instructions per second. In a few seconds,
computers can perform such a huge task that a normal human being
may take days or even years to complete. The speed of a computer is
calculated in MHz (Megahertz), that is, one million instructions per
second. At present, a powerful computer can perform billions of
operations in just on second.

Accuracy: -Besides the efficiency, the computers are also very


accurate. The level of accuracy depends on the instructions and the
type of machines being used. Since we know that the computer is
Figure 1.1 how computer works capable of doing only what it is instructed to do, faulty instructions for
processing the data automatically lead to faulty results. This is known

Compiled by Selam B. Department of Software Engineering Page 3


Introduction to Fundamental programming Chapter One

as GIGO, that is, Garbage In Garbage Out. Errors may occur in the MB of data while a hard disk can have a capacity of around 80 GB (1
results, but due to increased efficiency of error-detecting techniques, GB=1024 MB).
they can be minimized. Thus, the probability of errors in a computer is Storage capacity of a computer is measured by bit, bytes, kilobytes,
negligible. Computers can performing millions of instructions without megabytes, gigabytes and terabytes.
commuting any error, or they done their activities without any
Bit: is the smallest measurement unit of data either 0 or 1 (off or on).
error/mistake.
Gigabytes and Terabytes: are the largest measurement units of data. A
Reliability: Generally, reliability is the measurement of the
group of bits is called byte.
performance of a computer, which is measured against some
predetermined standard for operation without any failure. The major 8 bits = 1 byte = 1 character, 1KB = 1024 byte, 1MB = 1024 KB
reason behind the reliability of the computers is that, at hardware level, , 1GB = 1024 MB , 1TB = 1024 GB
it does not require any human intention between its processing Versatility: Computers are quite versatile in nature. They can perform
operations. Moreover, computers have the built-in diagnostic multiple tasks simultaneously with equal ease. For example, at one
capabilities, which help in continuous monitoring of the system. moment it can be used to prepare a letter, the other moment it can be
It refers to a computer is a trustfulness (acceptance) machine. used to play music and in between you can print a document as well.
All this work is possible by changing the program (sequence of
Storage Capability: Computers can store large amounts of data and it
instructions for computers). In brief, we can say that a computer can
can recall the required information almost instantaneously. Anyone
perform various tasks by reducing the task to a series of logical steps.
can store data in a computer for several years and you will find it the
same whenever you came back your data. Different computers have 1.4. Computer Systems

different memory and storage capacity. The memory of the computer Computer Systems: refers to the computer itself and all the components
is relatively small and it can hold only a certain amount of interconnected to it.

information, therefore, the data is stored on storage devices such as


CD-ROM and a hard disk. A single CD-ROM can store up the 700

Compiled by Selam B. Department of Software Engineering Page 4


Introduction to Fundamental programming Chapter One

A computer system composed of components that are classified either as 1. CENTRAL PROCESSING UNIT (CPU)
Computer hardware or Computer software. At the center of computer hardware there is the CPU, sometimes called the
 Hard ware: is the physical part of a computer that we can see and processor which executes program instructions and performs the computer
touch with our hand. processing actions.
 Software: is the internal component of the computer that used to  Is the most costly and main component of the computer system;
control, integrating, and managing the hard ware components and to  Consists of the Control Unit & the Arithmetic Logic Unit and main
accomplish specific tasks. memory;
Relationship between Software and Hardware:  The three parts work together to electronically control the function of the
• Both hardware & software are necessary for a computer to do useful computer;
job. Both are complementary to each other.  The different parts are interconnected by a cable like device called BUS,
• The same hardware can be loaded with different software to make a which is used to facilitate communications between the parts. Buses are
computer system perform different types of jobs. used to transfer data, address and control code (signal).
• Except for upgrades, hardware is normally a one-time expense,  It is part of computer hardware that executes program instructions.
whereas software is a continuing expense.  Is like the human brain and it oversee and control all of the activities of
1.4.1 COMPUTER HARDWARE the computer.
Computer hardware is the physical components of the computer system that  Manages and coordinates the entire computer including the input and
can be seen and touched. output units.
Hardware has four major parts  Is the collection of electronic circuits made up of millions of transistors
1. Processors (CPU) placed into integrated circuits (Integrated circuits are also called chips or
2. Input devices microchips).
3. Output devices  Each transistor is an electrical switch that can be in one of the two states:
4. Storage devices “on” or “off”.
 Small transistors allow more transistors to be packed in one single chip,
thus eliminate the need for separate chips.

Fig 1.2 Computer hardware

Compiled by Selam B. Department of Software Engineering Page 5


Introduction to Fundamental programming Chapter One

between two elements either less than, greater than or equal to the
other).
 It performs the arithmetic calculations of addition, subtraction,
multiplication and division and comparisons and it is used to keep
track of and execute instruction.
 Every CPU has built-in ability to execute a particular set of machine
instruction set or instruction set.
 Most CPU has 200 or more instruction (such as add, subtract,
compare) in their instruction set.
 As each processor has a unique instruction set machine language
program written for one computer, it will generally not run on another
computer with a different CPU.
 CPU made by different manufacturer has different instructions set.
Fig 1.3 Central Processing Unit (CPU)  When a new CPU is developed, it is ensured that its instruction set
CPU has three major units: include all the instruction set of its predecessor CPU plus some new
 Control Unit ones, thus manufacturing strategy is known as upward compatibility
 Arithmetic Logic Unit and the new CPU is said to be upward comparable with its
 Registers predecessors.
A. Control Unit
 As the name implies, it performs all the control functions of the The ALU can be divided in to arithmetic unit and logical unit.
computer.
 Arithmetic Unit: - contains the circuitry that is responsible for
 It retrieves the instruction from memory.
performing the actual computing and carrying out the arithmetic
 Translates those instructions into computer functions and sends signals
calculations, such as addition, subtraction, multiplication, and division.
to other computer hardware units to carry out those functions.
It can perform these operations at a very high speed.
 It is also responsible for determining the next instruction to be
 Logical Unit: - The importance of the logical unit is the ability it
executed by the computer.
provides to the CPU to make logical operations based on the
 In general it serves as the computer traffic cope.
instructions provided to it. Logical unit uses statements such as AND,
B. Arithmetic Logic Unit
OR, and NOT. This is useful when you have a set of instructions to
 It is the other component of CPU which contains the electronic
execute only if certain conditions are true.
circuitry that performs the two activities which is computing
C. Register
capabilities such as Arithmetic operations (addition, subtraction,
division or multiplication) and Logical operations (comparison

Compiled by Selam B. Department of Software Engineering Page 6


Introduction to Fundamental programming Chapter One

 Are high speed storage area used to temporarily hold small units of convert from human readable in to computer can understand.
program instructions and data immediately before, during and after o Typical examples of input devices are
execution by the CPU. ‾ Keyboards,
 Registers are paths or conduits that connect the Arithmetic Logical Unit ‾ Mouse,
to the main memory. ‾ Scanners
 When an instruction loaded from main memory, it is placed first in the ‾ Microphones,
register to wait instructions from the control unit. ‾ Light Pen,
 Data are also stored in registers prior to execution in the ALU. ‾ Digital Camera etc...
 As instruction are integrated and executed by the CPU, there is a moment  The most common input devices used by the computer are the keyboard
of integration between the various units of the computer systems. and the mouse. The keyboard allows the entry of textual information
 To handle these process properly and to facilitate the speed of while the mouse allows the selection of a point on the screen by moving
information transfer, CPU uses special memory unit called registers. a screen cursor to the point and pressing a mouse button.
 Registers are used to hold information on temporary basis.
 It is part of the CPU (not part of the main memory)
 The length of a register equals the number of bits it can store. Most CPU I. Keyboard
today have 32-bit or 64-bit registers. The size of the registers which is o This is a flat board that contains a grid of buttons. Each button can be
sometime called the word size or word length indicates the amount of programmed to follow instructions. An overlay sheet is placed on the
data it store. grid with an explanation for each button.
 Other parameters being the same CPU with 32-bit processor can process o Keyboards are designed for the input of text and characters and also to
data twice as fast as one with 16-bit register. control the operation of a computer.
2. INPUT DEVICES o Pressing a key on the keyboard generates a code that represents the
character associated with the key.
o It is the unit used to enter data into the computer so that it can be
 The keys on the keyboard are often classified as follows.
processed.
 Typing Keys: these keys work just like a conventional typewriter. These
o An electromechanical device that allows the user to feed information
keys include English Alphabets A-Z, digits 0-9, the Enter key, Space, the
(data) in to the computer for analysis, storage, and to give commands to
backspace key, the Shift key, the Caps Lock key, etc.
the computer.
 Function Keys: these keys perform different tasks based on the type of
o Data and instruction are entered in to the computer’s main memory
software being used. These keys are labeled as F1, F2… and F12.
through an input device.
 Numeric Keys: these keys let you enter numerical data more easily when
o Captures information and translates it in to a form that can be processed
you are working on number intensive tasks. To use this section of the
and used by other parts of the computer. After processing the input data, keyboard make sure that the Num lock key is on.
the computer provides the result with the help of output devices.
o Accept user commands and send them to the computer for processing. It

Compiled by Selam B. Department of Software Engineering Page 7


Introduction to Fundamental programming Chapter One

 Navigation Keys: these are keys that are used to navigate through your computer Scanner is a cheap and common way of getting images into a
document. The following are navigation keys. Page Up, Page Down, computer.
Home, End, ,,,, etc. b. Text scanner change text into text while image scanner change text into
 Computer Keys: these are keys not found on typewriters. They perform image.
different tasks when used alone or in conjunction with other keys. For IV. Digital Camera is an electronic device used to capture (take pictures)
example: Esc, Alt, Ctrl, Print Screen, Scroll lock, Pause, Insert, Delete and store photographs electronically in a digital format that can be read
by a computer, instead of using photographic film like conventional
II. Mouse cameras, or recording images in an analog format to magnetic tape like
o It is a small object that can be rolled along a rough flat surface .its name many cameras. You can then transfer the images directly from your
derived from its shape ,which looks a bit a mouse; its connecting wire camera on to your computer.
that one can imagine to be the mouse’s tail. V. Microphone - A microphone is a device to input sound information and
o When a user rolls the mouse a cross a flat surface, such as on the top of can be used with a voice recognition system which processes the
the table on which the computer is placed, the graphic s cursor moves on information i.e. used to record sound. The sound is then saved as a
the screen of the video display terminal in the direction of the mouse’s sound file on the computer.
movement.
o The graphics cursor, which is used to point and draw, is placed on the 3. OUTPUT DEVICES
screen as a variety of symbols, such as arrow, a wrist with a pointing o Used to get data out of a computer so that it can be examined, analyzed
finger, etc. You can move the graphics cursor at a menu item or an icon or distributed to others.
by moving the mouse. o Convert the result of the only-machine understandable form to a form
o Mouse can have as many as three buttons whose function depends on understandable by human beings.
what program is running. o Accept results or data generated by the computer and present this
o Mouse translates movements and button clicks into bits, which are sent information to the user in a variety of different means (both audio and
into the CPU. visual).
III. Scanner: is a device that used to convert hard copy in to soft copy form. o It display in human readable form in soft copy or hard copy.
- Used to scan or read text and picture and converted them to 1. Soft copy output:-it is electronic copy &Temporary in nature.
computer usable form. 2. Hard copy output:-paper based & permanent in nature.
- Save the scanned image as a graphic file in the computer. Examples
 Scanners are of two type, text &image scanner.  The Visual Display Unit (VDU) or monitor or screen
a. Image Scanner is a device that analyzes an image (such as a photograph,  Printers
printed text, or handwriting) or converts it to a digital image or a device  Plotters
that can read text or pictures printed on paper and translate the  Projectors
information into a form the computer can use. Save them as files on the  Voice (audio) response unit

Compiled by Selam B. Department of Software Engineering Page 8


Introduction to Fundamental programming Chapter One

- It is used to draw high –resolution charts, graphs, maps, circuit diagrams.


I. Monitor or Visual Display Unit (VDU): - They are mainly used for computer aided design (CAD) and computer
 It displays information in soft copy. It translates bits sent to it into shapes aided manufacturing (CAM) applications such as printing out plans of
and colors you can see on the screen. houses or car parts.
 Visual Display Units (VDU) or monitors are used to visually interface - These are also used with programs like AUTO CAD (Computer Assisted
with the computer and are similar in appearance to a television. It takes Drafting) to give graphic out puts.
more power. IV. Projectors
 Visual Display Units display images and text which are made up of small - It is an output devices, which are used to project information from a
blocks of colored light called pixels. The resolution of the screen computer on to a large screen.
improves as the number of pixels is increased. - There are two types of projectors, LCD( Liquid crystal display) and
 Most monitors have a 4:3 width to height ratio. DLP(digital light processing).
 These are the most common monitor's device
 Desktop monitors: which are also known as Cathode Ray Tube IIV. Speaker: is an output device, which is used to magnify sound
(CRT)
 Liquid Crystal Displays (LCD) or flat panel: which are also 4. STORAGE DEVICES
known as Thin Film Transistors (TFT), used in portable computer
like laptop Devices used to store data or program files. There are two types of storage
 Characteristics of CRT monitors devices.
1. Size: 14, 17, 21…inch, cost depend on size of the monitor.  Primary storage devices
2. Resolution: - it depends on the number of bit, number of pixels  Secondary storage devices.
(dpi). Pixel =picture element.
1. Primary Storages/Internal storages
3. Refresh rate: measured by hertz, from 60 to 75 hertz.
Primary storage (memory) holds the immediate instructions that are to be
4. Color: monochrome (white &black) and color: - Red, Green, Blue
performed by the CPU. IT is therefore very important that the primary
(RGB).
storage can be accessed quickly so that the CPU is not waiting for the next
II. Printers set of instructions. And they are measured in Megabytes (MB).
 Prints out information that is in the computer onto paper (hard copy).
There are different kinds of printers which vary in their speed and print A. Random Access Memory (RAM)
quality. o RAM is a temporary storage device which directly provides the required
 The two main types of printer are impact and non-impact. information to the processor.
III. Plotters o RAM can be defined as a block of sequential memory locations, each of
- Used to produce high quality, accurate, A3 size or bigger drawings which has a unique address determining the location and those locations
- It is a pen based output device that is attached to a computer for making contain a data element.
vector graphics. o It stores programs and data that are in active use.

Compiled by Selam B. Department of Software Engineering Page 9


Introduction to Fundamental programming Chapter One

o It is volatile in nature, which means the information stored in it remains ROM is cheaper than RAM RAM is very expensive
as long as the power is switched ON. As soon as the power is switched The contents of ROM are always
The contents are not known
OFF, the information contained in it vanishes (lost). known and can be verified
o In RAM we can write data on it and read data from it. ROM cannot be updated or
RAM can be updated and corrected
corrected
Features of RAM ROM serves as permanent data RAM can serve as temporary data
 We can write data on it and read data from it. storage storage
 It is volatile in nature, means the information stored in it lost, if a
power suddenly failure.
 It stores data and instruction temporarily. 2. Secondary Storages/External storages
B. Read Only memory (ROM)
o This type of primary memory can only be read, not written. In other Secondary storage devices are a permanent storage area for your data. They
words, CPU can only read from any location in the ROM but cannot allow a large amount of data to be stored, although the time taken to access it
write. is longer than that taken to access primary storage (although the time
o One use of ROM is to store the startup instructions for the computer difference is not usually noticeable)
when it is turned on. Whenever a computer is turned on it needs to
follow a programmed sequence of events such as checking that all the i. Hard Disk Drive (HDD)
hardware is working and then loading the files of the operating system o Most computers have one hard disk drive (HDD) installed within the
into RAM (the operating system is stored on the hard disk drive). This systems case. They are used to store the operating system, applications
process is known as booting the system. (Word, Excel, Turbo C etc) and files written by the user.
o The HDD is usually a stack of rigid magnetic disks contained within a
Features of ROM sealed unit so that dust and dirt will not damage the disks.
o Data is transferred to or from the disk using read/write heads close to the
 The contents of ROM are not losing even in case of a sudden power
surface of each disk (top and bottom) that detect magnetic variations on
failure, making it non-volatile in nature.
the disk surfaces as they rotate.
 It reads only, but cannot write.
o The operating system uses letters to identify the different types of
 It contains permanent recorded instruction.
secondary storage installed in the computer. The HDD is allocated the
letter C and is known as the root drive. It is possible to separate the HDD
 Difference between ROM and RAM
to include virtual drives D, E etc according to the users’ wishes.
o HDD’s come with varying storage capacities, measured in gigabytes
ROM RAM
(GB).
ROM is nonvolatile RAM is volatile
ii. Floppy Disk Drive

Compiled by Selam B. Department of Software Engineering Page 10


Introduction to Fundamental programming Chapter One

o Floppy disks (floppy or diskettes) contain a single small magnetic disk  Software is set of instructions that used to control, integrating, and
housed within a protective plastic case. managing the hard ware components and to accomplish specific tasks.
o They are used to transfer data between computers or to provide back-up  It is sequence of instructions, written language, which can be understood
copies of data stored on the HDD. by a computer.
o Data is transferred from or to a floppy by using read/write heads in the  A term refers to the set of computer programs procedures, and associated
floppy disk drive (FDD) that detect magnetic variations on the disk documents, which describe the programs, and how they Software is set
surface. of instructions that used to control, integrating, and managing the hard
o The standard 3 ½ inch floppy has a storage capacity of 1.44 MB. ware components and to accomplish specific tasks.
o The FDD is always allocated the letter A and so is known as the A drive.  It is sequence of instructions, written language, which can be understood
If another FDD is installed (rarely) then it is allocated the letter B. by a computer.
 A term refers to the set of computer programs procedures, and associated
iii. Compact Disk Drive (CD) documents, which describe the programs, and how they are to be used.
Compact disk (CD) drives allow data to be read from compact disks. A CD is Major types of software:
usually about 12 inches in diameter and data is transferred to or from a CD
by using a laser. A typical CD has a storage capacity of 650 MB. 1. Application Software
o It allows end users to accomplish one or more specific (non-computer
 There are 3 types of compact disk.
related) tasks.
 CD-ROM - Compact Disk – Read Only Memory. They are mainly used o Typical applications include industrial automation, business software,
by manufacturers to distribute their software. Therefore, Microsoft educational software, medical software, databases, and computer games.
Windows (operating system) and Office (applications) are supplied to the o Businesses are probably the biggest users of application software, but
user on CD-ROM with the programs then being installed onto the HDD almost every field of human activity now uses some form of application
of the computer. software.
 CD-R – Compact Disk Recordable. Allows the computer user to write  Some the most commonly known applications software are:
data to a CD. Each area of the CD can only be written to once and once a. Word-processing software- it enables us to make use of computer
data is written to the CD it cannot be removed. The CD can be written to system for creating, editing, viewing, formatting, storing, retrieving,
as many times as the user likes until the CD is full. and printing documents.
 CD-RW – Compact Disk – Re-Writeable. Allows the user to perform b. Spread sheet software- it is a numerical data analysis tools which
multiple read/write operations on the same CD until it is full. Data can be allows to create a kind of computerized ledger
later removed from the CD-RW and other data placed on it. c. Database software- it is a collection of related data stored and
treated as a unit for information retrieval purpose. It is a set of one or
1.4.2 COMPUTER SOFTWARE more programs, which enable us to create a database.
d. Graphic software

Compiled by Selam B. Department of Software Engineering Page 11


Introduction to Fundamental programming Chapter One

e. Personal Assistance software  Generally, it is the operating system that loads the application software
f. Educational software themselves to the RAM. It helps to store and retrieve data from the
g. Entertainment software storage media.
2. System Software –  The data might be processed by a given application software but the
o Is a set of one or more program, designed to control the operation and storing of it onto or the retrieving of it from the disc is all carried out by
extend the processing capability of a computer system. the operating system.
a. Supports the development of other application program  Operating system offers lots of services for the application software and
b. Support the execution of other application software. the user. From mobile phones and handheld computers to the
c. Monitors the effective use of various hardware resources, such as supercomputers almost all computers have an operating system
CPU, memory, peripherals, etc.  Common contemporary operating systems include Microsoft Windows,
d. Communicates with and controls the operation of peripheral Mac OS X, Linux and Solaris. Microsoft Windows is a widely used
devices, such as printer, disk, etc. operating system in the microcomputer. Linux is run on PC. Linux and
o System software helps run the computer hardware and computer system. UNIX are all free software. It is also a multitasking as well as a multi-
It includes operating systems, device drivers, diagnostic tools, servers, user operating system.
windowing systems, utilities, assemblers, compilers and interpreters, ii. Programming language software
communications software, and more.  Programming language software usually provides tools to assist a
o The purpose of systems software is to insulate the applications programmer in writing computer programs and software using different
programmer as much as possible from the details of the particular programming languages in a more convenient way.
computer complex being used, especially memory and other hardware  The tools include text editors, compilers, interpreters, linkers,
features, and such as accessory devices as communications, printers, debuggers, and so on. An Integrated development environment (IDE)
readers, displays, keyboards, etc. merges those tools into a software bundle, and a programmer may not
need to type multiple commands for compiling, interpreter, debugging,
Types of System Software: tracing, and etc., because the IDE usually has an advanced graphical user
interface, or GUI.
i. Operating system
Types of Programming language:
 Operating system is the most important component of the computer’s
software system that manages and coordinates the overall operations of 1. Machine language
the computer. There is the only language that the computer understands directly zero. A
 Operating system acts as a host for application software. By handling the machine language is a set of machine instructions which consists of zeros
details of the computer’s hardware operations, it eases the burden of the and ones. A machine instruction contains two parts an operation code (op
application software. code) and an address. The OP code tells the microprocessor system what op-

Compiled by Selam B. Department of Software Engineering Page 12


Introduction to Fundamental programming Chapter One

eration it should perform, add, transfer, compare, or move data to output de-  BASIC - ( Beginners All-purpose symbolic Instruction code) sim-
vice, etc. plest language developed for solving numerical problem
The address identifies the location (memory, register) holding the required  PASCAL, L, ADA, and MODULA-2 - Used in teaching programming
operands that is, the data to be operated upon. The address part may contain language.
one, two or more addresses that is, there may be one (or single address, two  There are also other languages which are still simplest and easier then
(double) address, and three (or triple) address instructions. high-level languages which we called then fourth generation languages.
These languages are application oriented languages.
2. Low-level Languages
Ex: Visual basic,
In machine language we have seen that the OP code and the address are rep-
resented as a binary sequence but it is difficult for the programmer to write a  Translation and Execution
big program using binary sequence and it is difficult to debug an error from
The only language that the computer understands is the machine language.
such program so instead of representing the OP code and the adders as a bi -
Therefore any program that is written in either low-level or high level
nary sequence we can represent them in mnemonics (terms). A low-level
language must be translated to machine code so that the computer could
language is a programming language which uses mnemonics to write in pro-
process it.
gram Low-level languages are machine dependent.
Ex: Assembly language A program written in high-level or low-level language is called source code
program and, the translated machine code is called the object code program.
3. High-level language
Programs that translate a program written in high level language and low-
We have seen that writing a program in low-level languages is easier and
level language to machine code program are called translators.
simple compare to machine languages. But still low-level languages have
their own draw bakes that is they are machine dependent. So we need an- The translators not only translate the instructions into machine code but also
other type of languages which are not machine dependent and more flexible it detects whether the program fulfills the syntax of the programming
there languages are called high-level languages third generation languages. language. A program passes through different stages before it carries out its
Advantages of high-level languages: function. First the program will be translate to object code (compilation
time), then it will be loaded to the memory and finally it will be executed
 Easier to learn and understand (Look like English)
(run time) or carries out its function.
 Require less time to write and easier to debugged errors.
 Can be used on different machines with little modifications.  Language Translation and Utility Software
Ex:- Fortran, COBL, ALGOG 80, Basic, Scientific & engineering
Source code: high-level language instructions
applications.
Compiler: translates high-level code into machine language
 FORTRAN - Formula in Business data processing application Object code: translated instructions ready for computer
 COBL -Common business Oriented Language For every modern language, there is a program that takes the source
 ALGOL 80 - (Algorithmic Oriented Language) code and produces object code in machine language

Compiled by Selam B. Department of Software Engineering Page 13


Introduction to Fundamental programming Chapter One

 There are three types of translators; assembler, interpreter, and so is every professional field of endeavor. To succeed in life, as well
compiler. as in our professions, we should develop the ability to solve problems
A. Compiler - A set of programs that translate the source code of higher-
level software languages into machine language, or object code Problem Solving

Translates source code once and produces a complete machine Problem solving is the process of transforming the description of a
language program problem into the solution of that problem by using our knowledge of
Advantages - fast the problem domain and by relying on our ability to select and use
appropriate problem-solving strategies, techniques, and tools.
Disadvantages - harder to write and debug
Examples - Pascal, C, FORTRAN, and open script Problems can be solved using different techniques as well as different
B. Assembler - An assembler is a software tool for translating assembly tools. We will consider those problems that can be solved by using
language into machine language computers as a tool in this course. Computers can be programmed to
C. Interpreter - An interpreter translates source code instructions, one do many complicated tasks at very high speeds. Also they can store
instruction at a time, from a higher level language such as BASIC into large quantities of information. Therefore we can use computers as a
machine language tool in problem solving if one or more of the following conditions for
a problem hold true:
The interpreter Translates a line of source code into one or more
lines of object code and then instructs the computer to perform those
instructions until another line has to be translated 1. It has extensive input
Advantages - fairly easy to write, and easy to debug 2. It has extensive output
Disadvantage - SLOW
3. If a method of solution is too complicated to implement
manually
Examples - basic, lisp
4. If done manually, it takes an excessively long time to solve
5. We expect to use the same method of solution often in the
future to solve the same problem with different inputs
Problem-solving strategies
Fig 1.4 Language Translation process
Algorithm
An algorithm is a sequence of a finite number of steps arranged in a
1.5 Problem Solving Techniques specific logical order, which when executed produces the solution for
What is a Problem? a problem. We can consider it as a procedure that takes a set of values
as input and transforms them into a set of values as output. An
A problem is a question or situation that presents uncertainty, algorithm is used to design a program. Obviously, not any arbitrary
perplexity, or difficulty. Real life is full of easy and difficult problems;
Compiled by Selam B. Department of Software Engineering Page 14
Introduction to Fundamental programming Chapter One

constructed series of steps can be regarded as an algorithm. An An algorithm can be represented by using a pseudocode or flowchart.
algorithm must satisfy some requirements: Pseudocode is a semiformal, English-like language with a limited
vocabulary that can be used to design and describe algorithms. The
1. Unambiguousness: The algorithm must not be ambiguous. algorithm that was used to solve the problem in the example of
In most cases we develop an algorithm so that it can be software development process was represented by using pseudocode.
translated into a program to be executed by computers.
Computers cannot cope with ambiguities. Therefore, every Example: 1) Algorithm(pseudo code) to add two number. and print
step in an algorithm must be clear as to what it’s supposed the sum of the number
to do and how many times it’s expected to be executed.
2. Generality: All possible circumstances are handled. Step 1: start
3. Correctness: It must be correct and solve the problem for
which it is designed. Step 2: Read two numbers n1 and n2.
4. Finiteness: It must execute its step and terminate in finite
time. An algorithm that never terminates is unacceptable. Step 3: sum  n1 + n2

Step 4: Print sum

Step 5: Stop
Algorithm: flowcharts and pseudo codes
An algorithm is a finite set of instruction that specify a sequence of operations
to be carried out in order to solve a specific problem or class of problems. It Example: 2) Algorithm to find largest number from two numbers.
is just a tool for solving a problem.
Step 1: start
All the tasks that can be carried out by a computer can be stated as algorithms.
Once an algorithm is designed, it is coded in a programming language and Step 2: Read two numbers n1 and n2.
computer executes the program. Step 3: If n1> n2 then
Algorithms may be presented on several levels of detail. It is difficult to use Big  n1
terms of machine code instructions or high level language because the details
would obscure the essence of the procedure and due to difficulty to present else
long programs in simple form. Therefore algorithm designers must start with
Big  n2
a much more concise representation
Step 4: Print Big
Pseudo code
Step 5: Stop

Compiled by Selam B. Department of Software Engineering Page 15


Introduction to Fundamental programming Chapter One

Flowchart is an expression that when evaluated

As an alternative to pseudocode we can also use flowcharts. A computes to either yes or no.
flowchart is a diagram that uses graphic symbols to depict the nature Flow line It is an arrow that flows from one step to the
and flow of steps in a process. The geometrical shapes in a flowchart
represent the types of statements in an algorithm. The details of next step.
statements are written inside the shapes. The flow lines show the order Input/output It is a special process that is used to get
in which the statements of an algorithm are executed.
input or to display output.

The following symbols are used in a flowchart


Example 1: - Draw flow chart of an algorithm to add two numbers

Symbol Meaning Explanation and display their result.

Start Process It is used as the first symbol that indicatesAlgorithm description


Start an algorithm has started.
 Read the rules of the two numbers (A and B)
End Process It is used as the last symbol that indicates an
 Add A and B
Stop
algorithm has ended.  Assign the sum of A and B to C
Process Step It represents processes such as  Display the result ( c)
computations, assignments and The flow chart is:
initializations.
Decision It defines two courses of action depending
Start
YES
Co on the outcome of a condition. A condition
NO
Read A, B
Compiled by Selam B. Department of Software Engineering Page 16

C= A+B

You might also like