Introduction to Computer Engineering 1
Introduction to Computer Engineering 1
ENGINEERING
1.. It can be looked at as the art or science of making practical application of the knowledge
of pure sciences, as physics or chemistry, as in the construction of engines, bridges,
buildings, mines, ships, and chemical plants.
The term engineering is derived from the Latin word ingenium, meaning
"cleverness" and ingeniare, meaning "to contrive (manufecture), devise (create)".
. Engineering is the application of knowledge in the form of science, mathematics, and
empirical evidence, to the innovation, design, construction, operation and maintenance of
structures, machines, materials, devices, systems, processes, and organizations. The
discipline of engineering encompasses a broad range of more specialized fields of
engineering, each with a more specific emphasis on particular areas of applied
mathematics, applied science, and types of application. See glossary of engineering.
Definition
The American Engineers' Council for Professional Development (ECPD, the predecessor
of ABET) has defined "engineering" as:
The creative application of scientific principles to design or develop structures, machines,
apparatus, or manufacturing processes, or works utilizing them singly or in combination;
or to construct or operate the same with full cognizance of their design; or to forecast
their behavior under specific operating conditions; all as respects an intended function,
economics of operation and safety to life and property.
1
Main branches of engineering
Engineering is a broad discipline which is often broken down into several sub-disciplines.
Although an engineer will usually be trained in a specific discipline, he or she may become
multi-disciplined through experience. Engineering is often characterized as having four main
branches namely:
i. Chemical engineering,
ii. Civil engineering,
iii. Electrical engineering, and
iv. Mechanical engineering.
Chemical engineering
Chemical engineering is the application of physics, chemistry, biology, and engineering
principles in order to carry out chemical processes on a commercial scale, such as
the manufacture of commodity chemicals,
specialty chemicals,
petroleum refining,
microfabrication,
fermentation, and
biomolecule production.
Civil Engineering
Civil engineering is the design and construction of public and private works, such as
Infrastructure (airports, roads, railways, water supply, and treatment etc.),
bridges,
tunnels
dams, and
buildings.
Civil engineering is traditionally broken into a number of sub-disciplines, including
Structural engineering,
environmental engineering, and
surveying.
It is traditionally considered to be separate from military engineering.
Electrical Engineering
Electrical engineering is the design, study, and manufacture of various electrical and electronic
systems, such as
Broadcast engineering,
electrical circuits,
generators,
motors,
electromagnetic/electromechanical devices, electronic devices,
electronic circuits,
optical fibers,
optoelectronic devices,
computer systems,
2
telecommunications,
instrumentation,
controls, and
electronics.
Mechanical Engineering
Mechanical engineering is the design and manufacture of physical or mechanical systems, such
as
power and energy systems,
aerospace/aircraft products,
weapon systems,
transportation products,
engines,
compressors,
power trains,
kinematic chains,
vacuum technology,
vibration isolation equipment,
manufacturing, and
mechatronics.
Other Branches of Engineering
Beyond these "Big 4", a number of other branches are recognized, though many can be thought
of as sub-disciplines of the four major branches, or as cross-curricular disciplines among
multiple. Historically,
a) Naval engineering and
b) Mining engineering were major branches.
3
industrial, materials, and nuclear engineering. These and other branches of engineering
are represented in the 36 licensed member institutions of the UK Engineering Council.
New specialties sometimes combine with the traditional fields and form new branches – for
example, Earth systems engineering and management involves a wide range of subject areas
including engineering studies, environmental science, engineering ethics and philosophy of
engineering.
5
For effective coordination of the CPU, the following form the main functional parts of the
CPU.
Arithmetic and Logic Unit (ALU)
The Control Unit and
The Memory Unit
The links between the basic components of the computer hardware is shown
diagrammatically in figure 3.1 below.
Output Unit
Input Unit or Main Memory Print
ROM, RAM or Devices
Devices or
E.g. Monitor
E.g. Keyboard display
Printer
Mouse
Scanner s
Scanner
Arithmetic & results
Loads Logic Unit
program
Load data
Requests
from Control Unit
computer
Central processing
unit
Links between the basic computer hardware
Functions of CPU
i. The CPU causes a program to be transferred from the disk into the high speed internal
memory, where the program takes control of the CPU.
ii. The CPU shifts data back and forth between internal memory and the disk (external
memory) in order to process data.
Control Unit
The control unit controls the operations of the computer. It acts as the nervous system in
human being. It supervises the CPU in its activities.
Memory Unit
The memory unit is used for storage in the computer. It can be internal memory or main memory
used to store intermediate results and data where the computer is processing. It can also be
inform of external memory used to permanently store data and information: Therefore memory
can be grouped into two types.
Types of memory
There are two types of memory namely:
1. Primary Memory (Main Memory)
2. Secondary Memory (Auxiliary Storage Devices)
Primary Memory
7
The primary memory which is also call internal memory or main memory is the computer’s
memory and is used to store intermediate results and data while the computer is processing. The
primary memory is further divided into two namely.
i. Permanent memory and
ii. Dynamic memory
Permanent memory
The permanent memory is implemented by the use of ROM (Read Only Memory). The ROM is
the place where the manufacturer of system program some pre-set instructions to tell the
computer what to do on powering the system.
Features of ROM
i. The instructions in the Rom are permanently programmed.
ii. The instructions are non-volatile in nature. This means that whether there is light or
not, the instructions are there.
iii. One can only read from it but cannot write to it.
iv. The ROM chips are also called firmware or pre-wired
Functions of ROM
i. It tells the computer what to do when the computer is powered on.
ii. It checks to see that the cable to the printer is connected.
iii. It checks to see that all the connected components to the computer are functioning;
such as RAM,HDD,FDDetc.
iv. It tells the control unit what each character on the key board means.
Types of ROM
Due to the draw backs permanent ROM, different types of ROM chips are now developed; some
of these draw back include:
i. It has been very expensive in the past.
ii. Software vendors create new ROM chips every time they update program.
iii. Users opened the computer case and replace chips when they want to update their
applications.
With all these setbacks, three new types of ROM chips were developed which allow the users to
change them.
1. PROM:- Programmable Read Only Memory. It is a version of ROM that can be changed
for the user. Once changed, it is permanent and can no longer be altered.
8
Advantages:
a. It gives the users all the advantages of ROM.
b. It is flexible to meet special needs of the user.
Disadvantages:-
a. Any mistake in PROM unit cannot be connected.
2. EPROM:- Erasable Programmable Read Only Memory: The chips can be erased and then
re-used. However, before this is done, the chips must be removed from the computer and
erased through certain processes before they can be re-used.
3. EEPROM: Electronically Erasable Programmable Read Only Memory: These allow
information to be changed by software without removing the ROM Chip from the
computer.
Dynamic Memory
Dynamic memory is implemented by RAM (Random Access Memory). Ram is volatile in
nature. It means that it loses its’ content when light goes off unlike the ROM. It is the work space
of the computer. One can write to it as well as read from it. Due to the dynamic nature oneis
required to save ones work as regular as possible especially where there is no UPS. The RAM is
also called main memory.
Features of RAM
RAM is volatile in nature
It is the workspace of computer system
It can be written to as well as read from
Data Storage in Computer Main Memory
It should be recalled that electronic devices are either ‘on or off’ ‘current or no current’, so they
use the binary number system. These devices use only binary digits (0 and 1) known as bits to
store numbers in memory also letters and special characters.
Single bit is not sufficient to represent numbers, letters and characters, a group of eight bits are
used. This is known as byte.
When you type a character on the keyboard, a specific bit pattern is electronically transferred to
the memory. The bit pattern depends on the coding scheme used by the computer. These are:
i. Binary number system
ii. Character coding scheme
To represent large numbers and a set of characters, most computers combine bytes to form
words.
9
Form Words
Microcomputers typically use word lengths of 2 bytes or 16 bits. Most mainframes use 4 bytes or
32 bits
Supercomputers use 8 bytes or 64bits.
Note:
1 Kilobyte (KB) 1024 bytes Memory
1 Megabyte (MB) 1 Million bytes Memory 3rd Generation
1 Gigabyte (GB) 1 Billion bytes Memory 4th Generation
1 terabyte (TB) 1 Trillion bytes Memory 5th Generation
Secondary Storage (Auxiliary or External Storage)
Secondary Storage is additional memory. It is used to hold large amounts of information outside
the main memory. It is separate from the processor and is contained in another box.
It is not compulsory that a computer should have second memory. However a computer is more
useful if it has secondary memory.
Types of Secondary Storage
There are two types of secondary storage namely:
i. Magnetic disks (Disk Pack)
ii. Magnetic tapes
These are like gramophone records and cassette tapes. Records and cassette tapes hold
information which is usually music. When played, the information on the tape or record produces
music.
In computers, magnetic tapes and disks are to held numeric and character information when
played, the computer can read the information contained in them. In micro computer’s secondary
storage is usually either a Hard disk, a Diskette.
Hard Disk Drive (HDD)
Diskettes
Compact Disk Read Only Memory (CD ROM)
10
2. Blank Recordable DVD disks:- Data can be recorded once using a DVD recorder and
then function as a DVD-ROM.
3. Rewritable DVDs (DVD-RW, DVD+RW, and DVD-RAM):- Data can be recorded, and
erased multiple times.
Input Devices
Definition
Input devices are used by the user of the computer to communicate with computer. It is
used to accept input data and programs for processing.
Output Devices
Definition
Output devices are the devices that communicate with the user of the computer system. It
is the device that displays information from the computer. There are three types of outputs
namely;
i. Softcopy
ii. Hardcopy
iii. Audio
Softcopy is the information displayed on the monitor. It can be seen but cannot be touched.
Hardcopy is the information printed on the paper from the system. It can be carried around
and photocopied.
Audio output is the sound produced from the speaker.
Examples of output devices are:
a) Monitor
b) Printer
c) Speaker and
d) Plotter
The Monitor (VDU)
The VDU means Visual Display Unit. The monitor is used to show what you have in the
computer and also to show the result of any command inputted to the computer. It is what
the computer uses in communicating with its user.
MODES OF COMPUTER OPERATIONS
11
There are basically five modes of computer operations namely;
1. Stand-alone or single-user operating system
2. Batch processing
3. Time sharing or multi-user operating system
4. Parallel processing[LAN]
5. Teleprocessing/network[WAN]
STAND ALONE OR SINGLE USER.
In this stand alone or single user tasking environment, only one user can be accommodated
at a time. Only one thing can be done at e time. Whatever package is used e.g WP, LOTUS
etc one has to exit from one application in order to start another one. If a document has to
be printed, all other activities have to wait until printing task is done to resume another
task. Examples is MS-DOS.
Batch processing
In batch processing mode, an operator runs a computer. Programmers and users bring
their jobs in batches to the operator to run and process. The batches are treated as they
come.
Time Sharing Or Multi-User Operating Systems
In this sharing or multi-user operating system, more than one users use computer at the
same time. A single CPU is linked to user through terminals. As a result of processor speed,
the user thinks that he is the only person using the system. in this all users use the same
memory, storage devices, but have different keyboards and monitors. If the computer
breaks down, all terminals will be out until it is repaired. It is at times called Dummy
Network. Multi- tasking enables the running of several applications at the same times. You
don’t have to exit before going into another package, e.g. the windows.
Parallel processing or networking
In this type of networking, complete computer system are connected to a central computer.
Each individuals system is called a file server. In this mode, if the central system breaks
down. This is known as Active Networking[LAN or WAN.]
12
COMPUTER SYSTEM SOFTWARE
Definition of software
Software is a program or set of instructions written for the operation of a computer. It
instructs the computer system on what to do and when to do it. Without software, a
computer system cannot function.
Types of software
There are two types of software namely
1. System software
2. Application software
System software; this is a specialized program that coordinates and controls the basic
internal operations of the computer system. It also enables application software to
function properly; e g operating system.
Operating systems
Definition
Operating System (O/S) is the software that controls the basic internal operations of a
computer system and co-ordinates the hardware activities. It is the first program that is
loaded whenever the computer is turned on. It provides the platform on which other
application programs will run. It is sometimes regarded as the supervisor. It resides in the
computer’s memory and hard disk. It is important to the computer system such that
without it the computer cannot work.
13
c) Input and output sharing: It controls the input and output functions such as
how
d) Keyboard, joystick, mouse, monitor and printer works.
e) Resource Sharing: Sharing of printers on a network.
f) Memory Management: It allocates adequate memory for running a particular
program.
g) Storage/File Management: Operating system manages how files are been stored in a
floppy disk, hard disk, flash disk, compact disk etc.
h) It supervises the running of the application software such as typing documents
using Ms Word.
i) It passes program from one program to another e.g. working on two programs at the
same time such as Ms Word and Ms Excel.
Translators
A translator is a program that takes as input a program written in one programming
language and produces as output a program in another language. A translator reads an
input program referred to as the source program, and converts the lines in the source
program one by one into another language called object code.
Examples of translator are:
i. Assembler
ii. Compiler
iii. Interpreter
Assembler
Assembler is a program developed to translate assembly language into machine code. The
program written in assembly language is called Source Code while the machine code is
called the Object Code.
Compiler
The compiler is a program that translates high level language into machine language. Such
as FORTRAN, PASCAL, C++, JAVA etc. The program written in these languages is called
SOURCE CODE and the machine code is called OBJECT CODE.
Interpreter
It is a program that translates Basic Language instructions into machine language or
OBJECT CODE.
Utility Programs
These are service routines that make life easier for the user as he or she relates with the
hardware components of the computer. They eliminate the need to re-write a program
every time it is needed to perform certain computer operations.
Examples include
i. Editor Program
ii. Anti-Virus software
14
Computer Application Software or Packages
Application software is defined as a program specifically designed to perform specific task
based on need. They most popularly business software is the family of personal
productivity software packages. They are referred to as productivity tools because they
help to relieve the drudgery of many time consuming manual tasks, such as typing
formatting table.
Types of Application software
Application software or package is classified into the following:
1. General Purpose Application Package or Software
2. User application Software
3. Specialty software
4. Graphics Software
15
These are software produced by the user themselves to suit their peculiar needs and
circumstances. They are therefore called user programs. Examples include;
Hospital Management software
Banking Software
Education management software to mention but a few.
Graphic Software
They provide facilities for the users to design various kinds of computer graphics such as
producing drawings and diagrams and other related jobs. There are three types of graphic
software, namely:
Presentation Graphics
Art and Illustration Graphics and
Computer Aided Design (CAD)
Presentation Graphics
This type of graphics make it possible to create a variety of graphics based on data from an
electronic spread sheet or database for business which can be in form of printed paper, or
colour slides such as bar graphics, Pie chart graphics and line graphics. Examples of such
software include: Ms PowerPoint, Ms Excel, Lotus 1-2-3 etc.
Computer Aided Design (CAD)
CAD software is a tool used by architects and designers. It is an advance form of art and
illustration software; however the difference is in terms of accuracy/precision and
hardware requirements.
Specialty Software or Packages
These are packages or software developed based on need of a particular field or area of
specialization. Examples of such software include;
Optical Character Recognition software
Robotics
Computer Aided Manufacturing
Robotics
Robotics is defined as the technology of building machines with computer intelligence and
computer controlled human like physical capabilities. The machine is called ROBOT.
The majority of industrial robots is single mechanical arms, called manipulator, has a
shoulder, forearm, and wrist, and is capable of performing the motions of human arm.
Industrial robots best perform tasks that are repetitive and those that require precisions
movements of heavy loads in hazardous areas. Robots can be
car manufacturing industries
Circuit connecting chips to circuit boards
Medical field especially in brain surgery
16
To achieve these, special computer programs are written to control the robots including
such commands as when to reach, in which direction to reach, how to reach, when to grasp
and so on. Once a robot is programmed, it does not need much attention.
Counting in numbers larger than ten is also possible, up to base 16, but 10 to
15 is represented with A to F respectively.
17
For example; 0,1,2,3,4,5,6,7,8,9, A= 10, B=11, C=12, D=13, E=I4, F=15.
The commonly used counting systems are those of base 2,8,10 and 16. They are usually
referred to as bases.
2 Binary
8 Octal
10 Decimal
16 Hexadecimal
Note: The base of any number that is not decimal is always indicated whenever the number is
written: i.e. 425 (for a base 5 number). If the base is not indicated, the number is assumed to be
decimal or base 10.
Conversion of numbers
To convert a decimal number to a number in another system, you have to divide the number
several times by the new base number, taking note of the remainders, until there is nothing to
divide again. The remainders form the digits of the new number starting from the last
remainder till you get to the first remainder in successive order.
Example:
a. Convert 13 to base five
5 13
5 2 rem. 3
0 rem. 2
The answer = (23)5
Convert 19 to base 2
2 19
2 9r1
2 4r1
2 2r0
1r0
Answer=(10011)2
Convert 13 to base 2
2 13
2 6r1
2 3r0
2 1r1
0r1
Answer = (1011)2
This means 13 = (23)5 = (1011)2
18
Example: Convert 39 to base 4
4 39
4 9r1
4 2r1
0r2
Answer= (213)4
2 (21)3
2 10 r 1
To avoid complications, convert first to base 10. Then divide by the new base. Example:
(21)3 = 2*31 + 1*30 = 6+1=7. Then:
2 7
2 3r1
21 r 1
0r1
(21)3 = (111)2
Examples
a) (23)5 b) 269 c) 1112
+(33)5 _189 *112
(111)5 (7)9 111
111
(10101)2
19
Exercise:
Convert the following decimal number to the base indicated against them;
i) 15 to base 2
ii) (1998)10 to base 8
Convert these to base 10
I) (11011)2 ii) (510)7 iii) (10128)16 iv) (243)6
Solve the following:
i) 10112 iii) 2139 * 509
+11012
Solutions:
(1998)10 to base 16
16 199810
16 124 r 14
16 7 r 12
0r7
(1998)10 = (7CE) 16
To check:
7*162 + 12*161 +14*160
17 92 + 192 +14 = (1998)10
Convert (1012B) 16 to base 10
1*14+0*163+1*162+2*161+B*160
65536+ 0+256+32+11 = (65835)10
Check:
16 65835
16 4114 r 11
16 257r 2
16 16 r 1
16 1r 0
0r 1
(65835)10 = (1012B)16
Programming Constructs
Programming Constructs are the building blocks used to design and implement programs.
SUM A+B+C+D+E
30 SUM = A + B + C + D + E
40 AVE = SUM/5
AVE SUM/5
50 PRINT SUM, AVE
60 END
PRINT SUM, AVE
STOP
2. Selection: Determines which path a program takes when it is running, based on a set
of conditions. For example, a program could determine if a user is old enough to drive a
car.
Structured design is a programming technique that involves breaking down larger processes into
smaller ones. Structured development helps hide information about a program’s structure and
processes. Combines text, graphics, and style elements in a unified code-space. The goal is to
improve the experience of writing programs for software developers.
count-controlled iteration
condition-controlled iterat
. Otherwise, it would follow a different path and execute a different set of instructions.
Iteration is also often referred to as looping since the program ‘loops’ back to an earlier line of
code. Sections of code that are iterated are called loops.
Iteration enables programmers to greatly simplify a program. Instead of writing out the same
lines of code again and again, a programmer can write a section of code once, and ask the
program to execute it again and again until it is no longer needed.
21
Iteration Example: Draw a flow chart to computer the areas of ten different
triangles whose bases and heights are each given by b and h, respectively.
Solution: (see figure below; the flow chart keeps a counter, I. which results
in the computation of the area of the triangle as far as the value of I is not
greater than 10, then nothing is done other than to stop.
Start
I 1
1 Initialize counter (start with the first
triangle)
Input B, H
Get the base and the height
Area (B*H)/2
No Increment counter
Is I > 10 ?
Computer Science
Computer science is the study of computers and computing, including their theoretical and
practical applications. It uses principles from engineering, mathematics, and logic to develop
software and hardware, formulate algorithms, and create artificial intelligence.
Computer Science is the study of computers and computational systems. Unlike electrical and
computer engineers, computer scientists deal mostly with software and software systems; this
includes their theory, design, development, and application.
22
Software engineering
The design, development, testing, and maintenance of software applications. Software engineers
use programming languages and engineering principles to create software solutions. What is
Software Engineering? |
Software engineering is the branch of computer science that deals with the design, development,
testing, and maintenance of software...
Computer architecture
The design and organization of computer hardware, including processor design, memory
hierarchy, and input/output devices.
Cybersecurity
The protection of computer systems and networks from theft, damage, or disclosure of
information. Cybersecurity also involves protecting against disruption or misdirection of
services.
Some careers that a computer science degree can lead to include:
Software developer
Systems administrator
Data scientist
Information security analyst
Web developer
Database administrator
Mobile application developer
Systems analyst
Logic Gate is defined as a symbol or diagram that represents a device which receives that status of
action (s) going into the device, reacts with the actions and then produces the result of actions as
logic 1 (True) or a logic 0 (false).
The Truth Table: This is a table which shows the logic gate in a numeric logic form. It shows
the inputs (what go into the gate) and the output (what go out the gate).
The Basic symbols and operations involved in logic gates and truth table used in system designs
are:-
1. OR – gate
2. AND – gate
3. NOT –gate
23
4. NOR – gate
5. NAND – gate
Truth Table
A B C
0 0 0
AND Gate
0 1 0
1 0 0
1 1 1
Truth Table
A B C
0 0 1
0 1 1
1 0 1
NAND Gate 1 1 0
Truth Table
A B C
0 0 1
0 1 0
NOR Gate 1 0 0
1 1 0
24