Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Since civilizations began, many of the advances made by science and technology
have depended upon the ability to process large amounts of data and perform
complex mathematical calculations. For thousands of years, mathematicians,
scientists and businessmen have searched for computing machines that could
perform calculations and analyze data quickly and efficiently. One such device was
the abacus invented around 500 BC.
The abacus was an important counting machine in ancient Babylon, China, and
throughout Europe where it was used until the late middle ages.
In 1833, Prof. Charles Babbage, the father of the computer, developed a machine
called analytical engine which was the vase for the modern digital computer.
It was followed by a series of improvements in mechanical counting machines that
led up to the development of accurate mechanical adding machines in the 1930’s.
These machines used a complicated assortment of gears and levers to perform the
calculations but they were far to slow to be of much use to scientists. Also, a
machine capable of making simple decisions such as which number is larger was
needed. A machine capable of making decisions is called a computer.
The first computer like machine was the Mark I developed by a team from IBM and
Harvard University. It used mechanical telephone relays to store information and it
processed data entered on punch cards. This machine was not a true computer
since it could not make decisions.
In June 1943, work began on the world's first electronic computer. It was built at
the University of Pennsylvania as a secret military project during World War II and
was to be used to calculate the trajectory of artillery shells. It covered 1500 square
feet and weighed 30 tons. The project was not completed until 1946 but the effort
Page 1
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
was not wasted. In one of its first demonstrations, the computer solved a problem
in 20 seconds that took a team of mathematicians three days. This machine was a
vast improvement over the mechanical calculating machines of the past because it
used vacuum tubes instead of relay switches. It contained over 17,000 of these
tubes, which were the same type tubes used in radios at that time.
The invention of the transistor made smaller and less expensive computers
possible. Although computers shrank in size, they were still huge by today’s
standards. Another innovation to computers in the 60’s was storing data on tape
instead of punch cards. This gave computers the ability to store and retrieve data
quickly and reliably.
The electronic digital computers, which were introduced in 1950's, were using
vacuum tubes. Following this, the development in the electronic components
helped in the development of digital computers also. The second-generation
computers used transistors.
The introduction of Integrated Circuits (ICs), also known as chips opened the
door for the development of third generation computers. A very large number of
circuit elements (transistors, diodes, resistors, etc.,) could be integrated into a very
small (less than 5 mm square) surface of silicon and hence the name IC. The third
generation computers used Small-Scale Integrated Circuits (SSI) which contain
about 10-20 components. When Large-Scale Integrated Circuits (LSI) (around
30,000 components) was developed, the fourth generation computers were
produced.
Page 2
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
replace the valves of the first generation. The components of this generation
computers (printed circuit diode and transistors) were based on the solid state
technology since electricity did not have to flow through space as in the thermionic
valve. Transistors could do all that the thermionic valves could do at a much faster
rate, consumed far less electricity (power) and were physically smaller and
cheaper.
Another important technology of this age was the use of magnetic core storage
instead of magnetic drum of the first generation.
The second generation also saw the advent of magnetic tape which replaced, to
some extent punch card systems (input/output operations).
Examples of computers of this age were the IBM 7090 and IBM 7094. their
applications included payroll and inventory processing.
Page 3
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Page 4
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
The computer can store and manipulate large quantities of data at very high speed,
but a computer cannot think. A computer makes decisions based on simple
comparisons such as one number being larger than another. Although the
Page 5
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
c. REGISTERS: They are used to store instructions and data for further
use.
4. OUTPUT UNIT: It is used to print/display the results, which are stored in the
memory unit.
Secondary Stored Devices refer to floppy disks, magnetic disks, magnetic disks,
magnetic tapes, hard disks, compact disks etc., which are used to store huge
information for future use.
Page 6
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
The
components
of a computer are connected by using buses.
A bus is a collection of wire that carries electronic signals from one component
to another. There are standard buses such as Industry Standard Architecture (ISA),
Extended Industry Standard Architecture (EISA), Micro-Channel Architecture (MCA),
and so on. The standard bus permits the user to purchase the components from
different vendors and connect them together easily.
Page 7
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
POINTING DEVICES
• Mouse – Mouse is a small device held in hand and pushed along a flat surface.
It can move the cursor in any direction. In a mouse a small ball is kept inside and
the ball touches the pad through a hole at the bottom of the mouse. When the
mouse is moved, the ball rolls. This movement of the ball is converted into
electronic signals and sent to the computer. Mouse is very popular in the
modern computers that use Windows and other Graphical User Interface (GUI)
applications.
• Trackball - a pointing device consisting of an exposed protruding ball housed
in a socket that detects rotation about two axes.
GAMING DEVICES
• Joystick - a general control device that consists of a handheld stick that pivots
around one end, to detect angles in two or three dimensions.
• Gamepad - a general game controller held in the hand that relies on the digits
(especially thumbs) to provide input.
• Game controller - a specific type of controller specialized for certain gaming
purposes.
Page 8
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
2. Mainframe computers are very large, often filling an entire room. They can
store enormous amount of information, can perform many tasks at the same
time, can communicate with many users at the same time (multi-user
Page 9
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
3. Minicomputers are similar but much smaller than mainframe computers and
they are also much less expensive. The cost of these computers can vary. They
possess most of the features found on mainframe computers, but on a more
limited scale. They can still have many terminals, but not as many as the
mainframes. They can store a tremendous amount of information, but again
usually not as much as the mainframe. Data is usually input by means of
keyboard and adapt to a number of environments into which large mainframes
cannot fit because they emit less heat. Medium and small businesses typically
use these computers.
Examples are Digital PDP11 and VAX Range, the Data General Range, HP1000
and 3000.
Page 10
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
decimal (the original input form). This is necessary because of the ease with
which the input interpretation of the output and processing are to be handled.
Most of today’s business applications use digital computers.
2. Analogue Computer does not hold data in discrete digital form. They
measure physical quantities and give output in form of electric signal or
calibrated moving parts. They work on continuous data e.g. volume control. It
stimulates the system in question by representing data in proportionally physical
quality such as voltage. This means that an analogue computer holds data in
quantity and volume. The analogue machine, because it has only limited
memory facility and is restricted to the type of calculation it can perform, can
only be used for certain specialized engineering and scientific applications.
Analog devices are used for time, volume, pressure or temperature
measurement, weapon guidance etc.
3. Hybrid Computer system bridges the gap between digital and analogue
computers. They combine the features of both digital and analogue computers.
These feature means that a hybrid computer needs conversion element which
will accept analogue inputs and outputs digital values. The device responsible
for the conversion is known as digitizer. These computers can be employed in
process control applications, specialized engineering and scientific applications.
4.0 HARDWARE
The electronic circuits used in building the computer that executes the software is
known as the hardware of the computer. For example, a TV bought from a shop is
hardware; the various entertainment programs transmitted from the TV station are
software. An important point to note is, hardware is a one-time expense and is
necessary whereas software is a continuing expense and is vital. However, for the
purpose of this course, we would be studying computer hardware and software.
Page 11
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
5.0 SOFTWARE
A set of programs associated with the operation of a computer is called
software.
Software is a term used for all sorts of programs (set of instructions) that
activates the hardware to function, that is, controls the computer system and its
operation.
a. Operating System
These are collection of programs acting as an interface between the user of
computers on one hand and the hardware on the other. It provides the users with
features that make it easier for him/her to code, test execute, debug and maintain
his programs while efficiently managing the hardware resources.
An operating system can be said to be a complex piece of software needed to
harness (control) the power of a computer system and make it easier to use.
Operating System are programs written by the manufacturer to help the computer
user control all the various devices
Page 12
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
b. Language Translators
These are programs that can convert source codes written in high – level language
such as BASIC, FORTRAN, COBOL and C into Object Code (machine language).
iii.Interpreters: This translator that accepts high level source program, reads,
translates and executes the program one line at a time. It also produces the
errors (if any) at the end of every line. An example of this is the BASIC
interpreter.
iv. Loader: It is a system program used to store the machine language program
into the memory of the computer.
Page 13
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
c. Service Programs
They are specialized programs that perform routine functions and are always
available to any computer user. They perform the following operation: -
i. File conversion
ii. File Copy
iii. File Reorganization
iv. File Maintenance
v. File Sorting
vi. Dumping routines
vii. House keeping operations
viii. Tracing routines
ix. Library program
x. Editing
a. Application packages
They come in a complete set of suite of programs with its documentation covering
a business routine. It is supplied by a software house or a manufacturer, either on
lease or purchase from dealers in computer hardware.
Application software is any software used for specified applications such as Word
Processing, Spreadsheet, Database, Presentation Graphics, Communication,
Tutorials, Entertainment and Games.
Examples are:
i. Accounting Package e.g. SAGE ACCOUNTANT, PEACHTREE ACCOUNTING etc.
ii. Word Processing Packages e.g. WordStar, Word Perfect, Microsoft Word, Notepad
iii. Spreadsheet Packages. E.g. Lotus 1-2-3, Microsoft Excel
iv. Utilities e.g. Norton Utilities
Page 14
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
User application programs are used to do a lot of things, a few is mentioned below:
• To solve a set of equations
• To process examination results
• To prepare a Pay-Bill for an organization
• To prepare Electricity - Bill for each month.
Page 15
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Input Peripherals
• Joystick
• Touch screen
• Gamepad
• Microphone
• Image scanner
• Computer speech recognition
• Webcam
• Barcode reader
Output Peripherals
• Plotter
• Printer
• Braille embosser
• Computer speech synthesis
• Sound card
• Speakers
• Digital Camera
• Graphics card
• Monitor
Page 16
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
USES OF COMPUTERS
The computer is used to assist man in business organization, in research and in
many aspects of life. Computer affects our daily lives more and more and hopefully
can be used to improve the quality of our lives by releasing us from dull, respective
tasks and allowing us to expand our minds.
AREAS OF APPLICATION
Scientific Research – Medicine, Space Technology, Weather Forecast.
Business Application – Payroll, Office Automation, Stock Control and Sales, Banking.
Industrial Application – Quality Control, Oil refineries
Communication – Transportation, Libraries,
Education – Administrative and Guidance, Computer Assisted Instruction (CAI),
Computer Managed Instruction (CMI)
Page 17
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Disadvantages of Computers
Discouraging people with less technology advantages.
Internet availability.
Connection tariffs.
Speed of technologies advance outsmarts the users' possibilities.
Technical disabilities need more acquired knowledge.
Centers on one specialization at a time.
Learning a lot in a particular study field is not necessarily useful.
Non-availability of on-line reference material.
Many institutions do not recognize a specific qualification.
English knowledge must be satisfactory.
Overestimation of time available.
Learners experience frustration going through all their mail messages.
Limitations of Computers
Computer networks are costly to develop.
Technology is changing rapidly.
Widespread computer illiteracy still exists.
Students must be highly motivated and proficient in computer operation.
COMPUTER MEMORY
Main Memory
Page 18
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Page 19
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
information. CD-ROMs are normally used to store massive text data. (such as
encyclopedias) which is permanently recorded and read many times. Recently CD
writers have come in the market. Using a CD writer, lot of information can be
written on CD-ROM and stored for future reference.
Hard Disk Drive (HDD)
Unlike a floppy disk that is flexible and removable, the hard disk used in the PC is
permanently fixed. The hard disk used in a higher end Pc can have a maximum
storage capacity of 17 GB (Giga Byte; 1 GB= 1024 MB = 230 bytes). Now a days,
hard disks capacities of 540 MB, 1 GB, 2 GB, 4 GB and 8 GB are quite common. The
data transfer rate between the CPU and hard disk is much higher as compared to
the between the CPU and the floppy disk drive. The CPU can use the hard disk to
load programs and data as well as to store data. The hard disk is a very important
Input/Output (I/O) device. The hard disk drive doesn't require any special care other
than the requirement that one should operate the PC within a dust-free and cool
room (preferably air-conditioned).
In summary, a computer system is organized with a balanced configuration of
different types of memories. The main memory (RAM) is used to store program
being currently executed by the computer. Disks are used to store large data files
and program files. Tapes are serial access memories and used to backup the files
form the disk. CD-ROMs are used to store user manuals, large text, audio and video
data.
Central Processing Unit
A processing unit in a computer interprets instructions in a program and carries
them out. An instruction in general, consists of a part, which specifies the operation
to be performed and other parts, which specify the address of operand. In a
processor, a strong of bits is used to code operations and another string of n
operations in binary so that 2x = n. For example to code 16 operations we need 4
bits, since 24=16.
An instruction consisting of an operation code and operand address or addresses
designed for a specific computer is know as a machine language instruction of that
computer. Machine language instructions for input/output, data movement,
arithmetic, logic and controlling sequence of operations are available in all
computers. A computer's processor has storage registers to store operands and
results. It also has a register to store the instruction being executed called
"Instruction Register" and a register which store the address of the next instruction
to be executed called “Program Counter Register".
A sequence of machine language instructions to solve a problem is known as a
machine language program. A computer executes a machine language programs in
two phases. In the first phase, it reads and stores the program in its memory. After
storing the program, it initiates program execution. In this phase, instructions are
retrieved from memory one after another and are decoded and executed.
Page 20
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
DATA REPRESENTATION
Introduction
In any modern numbering system, the numbers are represented by unique patterns
of unique symbols; individual symbols are usually called digits. The common
system is the decimal system with ten different symbols 0,1,2,3,4,5,6,7,8 and 9. In
a computer, however, the pattern of symbols which will represent the numbers are
created by some physical condition. (e.g. transistor or valve passing current) which
is either in one state (e.g. passing current) or in only one other possible state (not
passing current).
Bits are rarely seen alone in computers, they are bundled together into 8-bit
collections.
A set of 8 bits is called a byte and each byte stores one character.
ASCII (American Standards Code for Information Interchange) codes are used to
represent each character. The ASCII code includes codes for English Letters (Both
Capital & Small), decimal digits, 32 special characters and codes for a number of
symbols used to control the operation of a computer which are non-printable.
NUMERATION
Man has over the years developed symbols to represent numbers.
A group of symbols that can be used according to some rules to express numbers is
called numeration system.
The symbols of a numeration system are called numerals.
The number of unique digits in a numeration system is called number base or base
of the numeration system.
Hindu-Arabic Notation uses base ten probably because humans have ten fingers.
Thus ten and its powers are the basic numbers of the system.
In the topic, we shall examine four number bases used very frequently in
computing.
They are:
Decimal System
Binary System
Octal System
Hexadecimal System
Decimal Numbers
Page 21
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
The easiest way to understand bits is to compare them to something you know:
digits. A digit is a single place that can hold numerical values between 0 and 9.
Digits are normally combined together in groups to create larger numbers.
The decimal system is a number system to the base ten where counting is done in
groups of ten. For example, 6,357 has four digits. It is understood that in the
number 6,357, the 7 is filling the ‘1s place’, while the 5 is filing the 10s place, the 3
is filling the 100s place and the 6 id filling the 1,000s place. So you could express
things this way if you wanted to be explicit as:
(6*1000) + (3*100) + (5*10) + (7*1) = 6000 + 300 + 50 + 7 = 6357
Binary numbers
The binary system (also called base two) has just two states: usually called ‘on and
‘off’ or ‘1’ and ‘0’. The reason why this why this system is so important is that it is
the most simple system to implement in practice using the electronic technology
available today. It is easy to detect very quickly if a circuit is switched on or off. It
would be a much more difficult task to detect levels in between these two
extremes. Hence binary is ideal for use in modern electronic digital computers.
Binary numbers are formed using the positional notation. Powers of 2 are used as
weights in the binary number system. A binary number 10111, has a decimal value
equal to 1*24+0*23+1*21+1*20=23.
To understand the binary system, it is useful to think more carefully about a system
with which most people will be more familiar, i.e. the decimal system or base ten
also known as denary. When counting in base ten, the symbols that are used are
0,1,2,3,4,5,6,7,8 and 9. i.e. ten different symbols in base ten. Decimal numbers are
arranged into units, tens, hundreds and thousands etc.
Th H T U
2 0 6 7
The above represents two thousands, no hundreds, six tens and seven units
making two thousand and sixty seven. In base ten each column from right to
left is obtained by multiplying the previous column by ten.
Likewise, in binary system, there are just two symbols 0 and 1. Therefore any
number must be represented using 0s and 1s only. This time the column heading
will be (from right to left) 1s, 2s, 4s, 8s, 16s, etc. to obtain the next column
heading, the number is multiplied by two i.e. 1x2=2s, 2x2=4s, 4x2=8s etc.
therefore, in the binary system, the number:
16 8 4 2 1
1 0 1 1 1
would represent one lot of 16, no lots of 8, one lot of 4, one lot of 2 and one unit
of 1.
Page 22
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
In other to avoid confusion about the base number being used, a useful subscript
notation was developed. Therefore, 1012 means base two and 10116 means base
sixteen.
If no subscript is used, then it is usual to assume that base ten is the base number
being used.
Page 23
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
To count in binary, we simply start with 00000, to the required number of digits.
The units column changes 0,1,0,1 etc. the twos column has two 0s followed two 1s
then two 0s etc. the fours column has four 0s followed by four 1s then four 0s etc.
the eights column has eight 1s followed by eight 1s then eight 0s etc.
When it is hoped to obtain large number, the method above would be cumbersome,
therefore, mathematical methods can be used to convert decimal numbers to
binary.
2 18 remainder 1
3
2 91 remainder 1
2 45 remainder 1
2 22 remainder 0
2 11 remainder 1
2 5 remainder 1
2 2 remainder 0
2 1 remainder 1
0
Examples of additions
1 1 0 12 1 0 0 12 1 0 1 02
+ 1 0 1 02 + 1 1 12 + 1 1 0 02
Page 24
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
1 0 1 1 12 1 0 0 0 02 1 0 1 1 02
Examples of subtractions
1 1 10 02 1 12 10 02 1
02 1 12
0 1 0 1 0 02 - 0 1 1 1 12 -
1 0 0 1 1 02 0 0 1 0 02 therefore 100112 – 11112 = 1002
OCTAL NUMBERS
If the principles of the last few sections have been well understood then it is
relatively easy to extend the concepts of the basic rules to any other number base.
However, in computing, only two other number bases are of any importance. These
are octal (base eight) and more important, hexadecimal (base sixteen). In octal we
have eight different characters: (0,1,2,3,4,5,6 and 7). The column headings in octal
are units, 8s, 64s, 512s etc.
We have seen that a computer uses binary numbers rather than decimal numbers
to perform arithmetic operations; however pure binary representation has one
disadvantage. Much space is wasted in storing data than in any other numbering
system. To conserve storage some computers group binary numbers into bunch of
threes. Such grouping is possible with octal numbering system (base 8). Here, a
single octal number is used to represent three binary digits.
+ (4*8 )
0
Page 25
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
8 19 remainder 7 8 83 remainder
4
8 2 remainder 3 8 10 remainder
3
0 remainder 2 8 1 remainder
2
=2378 0 remainder
1
= 12348
CONVERTING BINARY TO OCTAL
As mentioned above, the octal numbering system can be represented as a group of
three binary digits or bits. In other words, any three binary digits can be
represented as a single octal number. These are used as special codes for digits of
octal numbers (base 8) called three-bit equivalent forms as shown below: -
Digits of base 8 0 1 2 3 4 5 6 7
Equivalent number in 00 00 01 01 10 10 11 11
base 2 0 1 0 1 0 1 0 1 Converting
binary to octal requires the subdivision of the binary numbers into groups of threes.
Example
Binary to Octal
a) 1010110112 b) 110001101112
Solution
a) b)
01 000 110 111
10 011 011
1
1
3 0 6 7
5 3 3
Therefore 1010110112 = 5338 and 110001101112 = 30678
Example
Octal to Binary
a) 1528 b) 4 7 3 2
47328
10 111 011 010
1 5 2 0
00 101 010
1
Page 26
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Examples
2 3 48 3 4 38 76 08 58 2 32 614
+ 1 78 + 7 4 58 - 5 1 38 - 1 2 7
2 5 38 1 3 1 08 1 7 28 1 0 78
HEXADECIMAL NUMBERS
As seen above in octal numbering system, the computer saves some storage space
by grouping together three binary digits to produce a single digit. A further step is
taken in some computers, to group four binary digits to produce a digit in the base
16 or hexadecimal numbering system.
In other words, this number base comes into its own when it is necessary to deal
with large groups of binary numbers. The base of the hexadecimal system is 16 and
the symbols used in this system are 0,1,2,4,5,6,7,8,9,A,B,C,D,E,F. Strings of 4 bits
have an equivalent hexadecimal value (four-bit equivalent forms).
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 1 15
4
Hexadecim 0 1 2 3 4 5 6 7 8 9 A B C D E F
al
For example,
6B is represented by 0110 1011 or 110 1011,
3E1 is represented by 0011 1110 0001 or 11 1110 0001 and
5DBE34 is represented by 101 1101 1011 1110 0011 0100. Decimal fractions can
also be converted to binary fractions.
We use the method as previously discussed to convert from any number system to
the decimal system; multiply each digit by its place value and then obtain the total.
Care should be taken when using hexadecimal digits A to F.
Page 27
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
a. 1111001101102 b. 11011010102
111 001 011 011 001 011 101
1 1 1 0 1 0 0
F 3 7 6 3 6 A
Page 28
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
provide a standard way for digital machines to encode characters. The ASCII code
provides a mechanism for encoding alphabetic characters, numeric digits, and
punctuation marks for use in representing text and numbers written using the
Roman alphabet. As originally designed, it was a seven bit code. The seven bits
allow the representation of 128 unique characters. All of the alphabet, numeric
digits and Standard English punctuation marks are encoded.
The ASCII standard was later extended to an eight bit code (which allows 256
unique code patterns) and various additional symbols were added, including
characters with diacritical marks (such as accents) used in European languages,
which don’t appear in English. There are also numerous non-standard extensions to
ASCII giving different encoding for the upper 128 character codes than the
standard. For example, the character set encoded into the display card for the
original IBM PC had a non-standard encoding for the upper character set. This is a
non-standard extension that is in very wide spread use, and could be considered a
standard in itself.
Bytes are frequently used to hold individual characters in a text document. In the
ASCII character set, each binary value between 0 and 127 is given a specific
character. Most computers extend the ASCII character set to use the full range of
256 characters available in a byte. The upper 128 handle special things like
accented characters from common foreign languages. The table above shows the
127 standard ASCII codes which computers uses to store text documents both on
disk and in memory.
Parity Check Bit
Page 29
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
In the early computers systems, the ASCII code consisted of just 128 characters as
explained above. This is because the 8th bit was used for parity checking. Errors
may occur while recording and reading data and when data is transmitted from one
unit to another unit in a computer. Detection of a single error in the code for a
character is possible by introducing an extra bit in its code. This bit, know as the
parity check bit, is appended to the code. The user can set the parity bit either as
even or odd. The user chooses this bit so that the total number of ones ('1') in the
new code is even or odd depending upon the selection. If a single byte is
incorrectly read or written or transmitted, then the error can be identified using the
parity check bit.
However, when being used inside computers, parity was not really necessary and
the top bit in the byte was wasted. It then was a good idea to make use of this top
bit (8th bit), thus releasing a further 128 characters giving a total of 256 overall. This
has led to what is now known as the Extended ASCII character set.
Page 30
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Page 31
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
4 00000100 04
5 00000101 05
6 00000110 06
7 00000111 07
8 00001000 08
9 00001001 09
10 00001010 0A
11 00001011 0B
12 00001100 0C
13 00001101 0D
14 00001110 0E
15 00001111 0F
16 00010000 10
17 00010001 11
31 00011111 1F
32 00100000 20
63 00111111 3F
64 01000000 40
65 01000001 41
127 01111111 7F
128 10000000 80
129 10000001 81
255 11111111 FF
256 00000001000 0100
00000
32767 01111111111 7FFF
11111
32768 10000000000 8000
00000
65535 11111111111 FFFF
11111
Page 32
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Page 33
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
COMPUTER LANGUAGES
The term computer language includes a wide variety of languages used to
communicate with computers. It is broader than the more commonly-used term
programming language. Programming languages are a subset of computer
languages. For example, HTML is a markup language and a computer language, but
it is not traditionally considered a programming language.
Computer languages can be divided into two groups: high-level languages and low-
level languages. High-level languages are designed to be easier to use, more
abstract, and more portable than low-level languages. Syntactically correct
programs in some languages are then compiled to low-level language and executed
by the computer. Most modern software is written in a high-level language,
compiled into object code, and then translated into machine instructions.
Computer languages could also be grouped based on other criteria. Another
distinction could be made between human-readable and non-human-readable
languages. Human-readable languages are designed to be used directly by humans
to communicate with the computer. Non-human-readable languages, though they
can often be partially understandable, are designed to be more compact and easily
processed, sacrificing readability to meet these ends.
Machine language
The computers can execute a program written using binary digits only. This type of
programs is called machine language programs. Since these programs use only '0's
and '1's it will be very difficult for developing programs for complex problem
solving. Also it will be very difficult for a person to understand a machine language
program written by another person. At present, computer users do not write
programs using machine language. Also these programs written for execution in
one computer cannot be used on another type of computer. i.e., the programs were
machine dependent.
Assembly Language
In assembly language mnemonic codes are used to develop program for problem
solving. The program given below shows assembly language program to add two
numbers A & B.
Program code Description
It reads the value of A.
READ A
The value of B is added
ADD B
with A.
STORE C
The result is store in C. Assembly language is
PRINT C
The result in 'C' is printed. designed mainly to replace
HALT
Stop execution. each machine code with
and understandable mnemonic code. To execute an assembly language program it
should first be translates into an equivalent machine language program. Writing
and understanding programs in assembly language is easier than that of machine
language. The programs written in assembly language are also machine-
dependent.
Page 34
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Page 35
Introduction to Computer Science [CSC 111] Lecture Note [2010] Olowonisi Victor O.
Internet
Intercommunication between computer networks is possible now. Computer
networks located in different Organizations can communicate with each other
through a facility know as Internet. Internet is a world wide computer network,
which interconnects computer networks across countries. The Internet facility
known as Internet. Internet is a world wide computer network, which interconnects
computer networks across countries. The Internet facilitates electronic mail
(email), file-transfer between any two computers and remote access to a
computer connected in the internet. This intercommunication facility has changed
the style of functioning of the business organization and it has made the world a
global village.
Page 36