CSC1201 Part1 Notes. 2023pdf-1
CSC1201 Part1 Notes. 2023pdf-1
CSC1201 Part1 Notes. 2023pdf-1
Science (Part 1)
Dr. Ado Haruna,
Department of Mechatronics Engineering,
Bayero University, Kano.
aharuna.mct@buk.edu.ng
1.0 Introduction
Computers are electronic devices that store, retrieve and process data at high
speeds according to programmed instructions. Computer science is concerned
with application of scientific principles in the design, construction and
maintenance of systems based upon the use of computers.
The earliest computing device undoubtedly consisted of the five fingers of each
hand. Since there are ten discrete fingers (digits) available for counting, both
digital computation and the decimal system have enjoyed huge popularity
throughout history. However, improvements were made to replace the digits
of the hand by a more reliable counting device, which, led to the birth of the
Abacus in China about 2000 years ago. It consisted of a wooden rack holding
horizontal wires with beads strung to them. The beads could be moved around
accordingly to carry out arithmetic.
Augusta Ada Bryon, the countess of Lovelace, was one of the few female
mathematicians of her time and a personal friend to Babbage. She prepared
extensive notes concerning Babbage’s ideas of the Analytical Engine.
Lovelace’s conceptual design led to the naming of a programming language
(Ada) in her honour. Though the Analytic Engine was never built, its key
concepts like the ability to store instructions, use of punch cards as memory
and the ability to print can be found in modern computers.
2
computer algorithm, and is particularly useful in explaining the functions of a
CPU inside a computer. The Turing machine was the theoretical predecessor to
the modern digital computer.
During the Second World War in the 1930s, American Physicist Howard Aiken
developed the Mark 1 calculating machine which was built by IBM and
installed at Harvard in 1944. The machine used relays and electromagnetic
components to replace mechanical parts. Aiken followed the Mark 1 with the
Mark II, Mark III and Mark IV which was completely electronic and used solid
state devices.
The Electronic Numerical Integrator And Computer (ENIAC) was the first
operational electronic digital computer developed for the U.S. Army by J.
Presper Eckert and John Mauchly at the University of Pennsylvania in
Philadelphia. Started in 1943, it took 200,000 man-hours and nearly a half
million dollars to complete two years later. Programmed by plugging in cords
and setting thousands of switches, the decimal-based machine used 18,000
vacuum tubes, weighed 30 tons and took up 1,800 square feet. It cost a
fortune in electricity to run; however, at 5,000 additions per second, it was
faster than anything else.
The EDSAC, (Electronic Delay Storage Automatic Calculator), was the first full-
size stored-program computer, built at the University of Cambridge, by
Maurice Wilkes and others to provide a formal computing service for users.
EDSAC was built according to the principles enunciated by the Hungarian
American scientist John von Neumann and became operational in 1949. Wilkes
built the machine chiefly to study computer programming issues, which he
realized would become as important as the hardware details.
3
The UNIVAC or the Universal Automatic Computer was, effectively, an updated
version of the ENIAC. Data could be input using magnetic computer tape and
later by punch cards. It was tabulated using vacuum tubes and state-of-the-art
circuits then either printed out or stored on more magnetic tape. Mauchly and
Eckert began building UNIVAC I in 1948 and delivered the completed machine
to the Census Bureau in March 1951. The computer was used to tabulate part
of the 1950 population census and the entire 1954 economic census. The
computer excelled at working with the repetitive but intricate mathematics
involved in weighting and sampling for these surveys. UNIVAC I, as the first
successful civilian computer, was a key part of the dawn of the computer age.
The invention of the transistor in 1947 by William B. Shockley and his team at
the American Telephone and Telegraph Company’s Bell Laboratories, had a
huge impact in the evolution of computers. The devices could act as an electric
switch and were smaller, cheaper, faster, and more reliable than vacuum tubes
and soon replaced them in computers. The devices also consumed far much
less energy.
4
processor, had 256 bytes of RAM and displayed its output using rows of light
emitting diodes (LEDs).
This unit sends out processed data to devices so that it can be interpreted by
the user. An output device is any piece of computer hardware equipment used
to communicate the results of data processing which converts the
electronically generated information into human-readable form. Computers
can output information as video, audio or in print. The output may also be a
signal used to control other devices.
This is the part of the computer that facilitates temporary storage of data. The
memory unit, often referred to as primary memory or random access memory
(RAM), is quickly accessible. The memory unit stores data that has been
entered through the input devices, enabling the data to be immediately
available for processing. The memory unit also retains processed data until the
data can be transmitted to the output devices. Primary memory is usually
volatile, meaning that it is erased when the machine is powered off.
5
3.5 Central Processing Unit (CPU)
The central processing unit (CPU), is the principal part of any digital computer
system. It constitutes the physical heart of the entire computer system and is
responsible for supervising the operation of other sections. The CPU alerts the
input unit when instructions should be read, instructs the ALU when to use the
information and instructs the output unit when to transmit the information to
the output devices. The CPU and ALU are commonly regarded as a single unit.
6
4.0 CLASSIFICATION OF COMPUTERS
There are three types of computers that can be identified by their size:
(a) Super Computers: These are the largest, fastest and most expensive
computers. They have extremely fast processors capable of performing 30-
50 billion operations per second. Super computers are used in
meteorology, engineering, nuclear physics and astronomy.
(b) Mainframe Computers: These are large general purpose computers with
extensive processing, storage and input/output capabilities. They are used
in centralised computing environments in which data input is achieved via
terminals wired to the mainframe computer. Mainframes are usually
owned by large cooperate organisations such as universities, research
institutes, giant banks etc. The market for mainframes is dominated by
IBM.
(c) Minicomputers: These can be considered as a scale down version of
mainframes i.e. they are smaller, cheaper and have less memory. The term
minicomputer is no longer used specifically (it predates the term
7
microcomputer) and the boundary between these two classes of devices is
unclear.
(d) Microcomputer: This is the latest category to be developed.
Microcomputers are also called personal computers (PCs) as they can be
used in the home or office. Microcomputers utilise a microprocessor as
their central and arithmetic unit and are fast, cheap, durable and power
efficient. The desktop computer was the first type of microcomputer, so
called as it is placed on top of desks. Due to improvement in technology,
the PC is now more compact in size in the form of Laptops, Notebooks and
Palmtops.
8
The third generation used IC technology. These ICs had small-scale
integration (less than 100 transistors on a single chip) and medium
scale integration (100 – 1000 transistors on a single chip).
Smaller in size as compared to previous generations.
More reliable and faster than earlier generations.
Truly general purpose.
9
board. On the other hand, proprietary SBCs are generally industrialised
designs for use in specific end applications.
4.4 Microcontrollers
10
5.0 HARDWARE and SOFTWARE
5.1 Hardware
Computer hardware are the component parts of the computer that can be
physically handled. These components can also be divided into input,
processing, storage and output hardware.
These are devices used for entering data into the computer system. Examples
are Keyboards, Mice, Scanners, Punch Cards, Game Controllers etc.
Output hardware receive already processed data in human readable form. The
processed information can be read, viewed, heard and reproduced as a hard
copy. Examples of output hardware include monitors, printers, loudspeakers
etc.
(a) Monitors: These are also known as the Visual Display Units (VDUs).
Processed information can be read or viewed on the monitor. The
quality of video output is determined by screen size and resolution.
(b) Printers: Information can be viewed as a hard copy using printers.
Printers may be dot matrix, inkjet or laser.
11
5.1.5 Peripherals
5.2 Software
The system software (operating system) is the primary software that controls
the operations of a computer and provides common services for computer
programs. It has three major functions:
12
Examples of commonly used PC operating systems include MS-
DOS/WINDOWS, APPLE OSX, and LINUX.
(a) MS-DOS: Short for Microsoft Disk operating system, MS-DOS is a non-
graphical command line operating system based on x86 family of
personal computers. Introduced by Microsoft in 1981, it was the main
operating system for IBM PC compatible personal computers during the
1980s to the mid-1990. MS-DOS was gradually superseded by operating
systems offering a graphical user interface (GUI), in particular by various
generations of the Microsoft Windows operating system.
(c) Linux: Linux is an open source operating system first developed by Linus
Torvalds. Thousands of programmers contributed to enhance Linux, and
the operating system grew rapidly. Because it is free and runs on PC
platforms, it gained a sizeable audience among hard-core developers
very quickly. In general, Linux is harder to manage than something like
Windows, but offers more flexibility and configuration options and is
popular with people that want to experiment with operating system
principles.
13
6.0 PROBLEM SOLVING
6.2 Algorithms
14
V) Correctness: Given correct inputs, an algorithm should always
produce correct results.
VI) Efficiency: For any particular problem, there are many alternative
algorithms that can provide a solution. Algorithms should be simple,
fast, and minimise the use of available computational resources.
6.3 Flowcharts
I) Terminals: The ovals indicate the beginning (START) and end (STOP)
of an algorithm.
15
IV) Decision: A diamond-shaped symbol indicates logical
decisions/comparisons.
A machine language consists of the numeric codes for the operations that a
particular computer can execute directly. It can be considered as the natural
language of a specific computer. The codes are strings of 0s and 1s i.e. binary
bits. Machine language instructions typically consist of two parts – the
operation code (opcode) and the operand. The opcode represents the
instruction to be carried out while the operand contains the memory address
for the data to be used. Machine language is difficult to read and write, since it
does not resemble conventional mathematical notation or human language,
and its codes vary from computer to computer.
16
be easily translated into machine language code using a fitting assembler
program. Although blocks of data may be referred to by name instead of by
their machine addresses, assembly language does not provide more
sophisticated means of organizing complex information. Like machine
language, assembly language requires detailed knowledge of internal
computer architecture.
a=b+c
adds the value of memory location b to c and stores the result in a. Translator
programs referred to as compilers convert high-level programs into machine
language. This process takes a significant amount of time and interpreter
programs like Q-BASIC were developed that can directly run high level
languages.
17