SS1 Second Term Computer

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

TOPIC 1: BASIC COMPUTER OPERATION (BOOTING)

When a micro-computer is switched on, it is normally made to start executing the instruction held in R.O.M.
They normally take place automatically as part of switching on. Sometimes, a boot button is pressed instead.
This is known as booting up the system. The instruction in Rom sometimes performs a number of simple
hardware checks such as finding out what RAM is fitted and working. On most computers, not just micro-
computers, the boot-up operation also causes a special loader program in firm wave ROM to load a program
into memory from pre-define tracks on hard disks. On some micro-computers, the program may be loaded
from floppy disk instead of hard disk. The first program load into memory is that part of operating system
which takes primary control over the hardware and which contains the facilities for high level software to use
it. This software has several alternative name including the kernel, the executive, and the supervisor. Booting is
a bootstrapping process that starts operating system when the user turns on a computer system. A boot
sequence is the initial set of operations that the computer performs when power is switched on. The boot loader
typically loads the main operating system for the computer.
Types of Booting
Cold Booting: When the computer is started after having been switched off, put on the computer on from the
Boot button.
Warm Booting: When the operating system alone is re-started from the keyboard using the following keys in
window (Alt+Ctrl+Del) after a system crash or freeze. Both types of booting clear out any memory conflicts and
other problems with the computer or software. Pressing the Ctrl+Alt+Del keys simultaneously while the
computer is running performs a warm boot. You may need to do this if the computer stops responding because
of memory problem or the Blue screen of Death appears.
What happens between the times the user power up the computer and when the desktop icons appear on the
desktop? In order to understand the booting processing, let’s explain it in order for a computer to success fully
boot its BIOS, operating system and hardware components must all be working properly, failure of any these
three elements will likely result in a failed booting sequence. When the computer’s power is first turned on, the
C.P.U initializes itself, which triggered by a series of clock ticks generalized by the system clock part of the
CPUs initialization is to look to the system ROM BIOs for its first instruction in the startup program. The
ROM BIOs, the first instruction, which is the instruction to run the power on self-test (POST) in a pre-
determined memory address.

TOPIC 2: COMPUTER SYSTEM SOFTWARE


Definition of software
A computer software (or software) is a general term used to describe a set of instructions usually called a
program, which control the operation of a computer or used to accomplish a specific task.
TYPES OF SOFTWARE
Software can be broadly divided into two, namely:
i. System software: This software helps direct and control the running of computer’s hardware and other
connected devices. It helps to manage computer resources such as memory and processor. Examples include
Operating system, Translators and utility software.
ii. Application software: This software enables the computer to perform specific tasks. Examples include word
processing package, spreadsheet package, game software etc.
Types of System softwares
1. OPERATING SYSTEM: Operating system is a suite/set (collection) of programs/software that controls the
execution of application programs and coordinates/manages the hardware components. It can also be defined
as a set of programs that controls and manages computer resources/components and provides other useful
services. The purpose of an operating system is to provide an environment in which a user can execute
programs in a convenient and efficient manner.
  FUNCTIONS OF OPERATING SYSTEM
i. Serves as an interface between the user and the computer/hardware and software
ii. ACCESS CONTROL/ SYSTEM SECURITY: By means of password and other similar access control
techniques the OS prevents unauthorized access to programs and data.
iii. CONTROLS PROGRAM EXECUTION: The OS runs and control all other system programs and
application software
iv. BOOTING /STARTING UP THE COMPUTER: The operating system manages the starting up of the
computer
v.   CONTROLS HARDWARE RESOURCES
Vi. FILE-SYSTEM MANIPULATION (for users and their programs) - read and write files and directories,
create and delete them, search them, list file Information, permission management.
vii. CONTROL OVER SYSTEM PERFORMANCE:  The OS records the delay between the request for a
service and the response from the system and manages the situation accordingly.
viii. Protects the system from errors and failures/error handling
ix. TASK MANAGEMENT: The OS gives control to the program the user brings to the foreground (from
among multiple opened programs).
x. DEVICE MANAGEMENT: The device management function controls hardware devices by using special
software called device drivers, which are installed in the operating system. This makes the operating system
recognize the device.
Xi. MEMORY MANAGEMENT
EXAMPLES OF OPERATING SYSTEM
Operating system can be grouped into two, namely, the Graphical User Interface (GUI) and the Command
Line Interface (CLI).
a. The GUI group makes use of windows, icons, mouse, scroll bar, and Pointer. In this group, we have the
Microsoft series (Windows 95, 98, NT/2000, ME, XP, Vista, 7, 8,10), Chrome OS, Apple System 7 and
macOS, Linux variants like Ubuntu.
b. The CLI group includes the IBM Disk Operating system (DOS) that is phased out, the Microsoft Disk
Operation System (MS-DOS) and UNIX. The Command line is a text-based interface that allows the
user to interact with the computer system by typing in commands (instructions).
2. Translators: Translators are programs that convert programs written in languages other than the machine
language to machine language. Examples are Assembler, Interpreter and compiler.
3. Utility Software: Utility software is system software designed to help analyse, configure, optimize or maintain
the operation of a computer, its devices, or its software. Examples include disk utilities like defragmenters,
compressors and cleaner. There are also other operating system utilities such as antivirus programs, registry
cleaners, Screen saver, file viewer (windows explorer), editors and system restoration programs. Utility
software are built into the computer operating system, however may be installed separately.

TOPIC 3: COMPUTER APPLICATION SOFTWARE


Application software are the programs that enable computer to perform specific productive task.
Types of application software
1. USER APPLICATION DEVELOPMENT PROGRAM: This kind of software is used to develop programs
usually called in-house programs, which are customized to perform specific functions for the user such as
administration, payroll, production control, banking, inventory etc. Examples include Net Beans, Eclipse,
Android studio etc.
2. APPLICATION PACKAGES: The application packages are software packages that perform generalized
functions and are produced for the general public to use. This category of software can be grouped based on
their functions as listed below:
a. Database management: Examples include Microsoft Access, Oracle, MySQL, Dbase etc. which are used for
creating, maintaining and updating databases (collection of related information).
b. Word processing: Examples include Microsoft Word, Lotus WordPro, Corel WordPerfect, Professional
Write etc. are used to create document such as letter, memos made up of textual and graphical information.
c. Spreadsheet, calculation and data analysis: Examples include Microsoft Excel, AmiPro, Quattro Pro, Lotus
1-2-3 etc. which contains grids of cells arranged in rows and columns used for entering data for calculation and
analysis.
d. Graphic designing: Examples include Corel Draw, Adobe Photoshop, Paint etc. which can be used to draw
and make designs related to graphics.
e. Slide presentation: Examples include Microsoft PowerPoint, Impress, Prezi etc. which contains collection of
slides used to hold information that can be presented in form of slide show.
f. Email management: Examples include Microsoft Outlook, MS Exchange etc. which contains tools for sending
and receiving electronic mail (e-mail).
PRACTICAL WORKS ON COMMAND PROMPT
DOS COMMAND: DOS Commands are used to interact with the operating system.
TYPES OF COMMANDS
 Internal commands
 External commands
HOW TO LOAD DOS ENVIRONMENT
Click on the search button at the task bar
Type in ‘’command prompt’’
Press enter key
HOW TO RESTORE THE WINDOWS SCREEN
Press ALT + ENTER KEY
HOW TO EXIT FROM MS DOS
At the c-prompt, type in ‘’EXIT’’
Press enter key
TO CLEAR THE SCREEN
Type in CLS
Press enter key

HOW TO CHECK THE DOS VERSION


Type ‘’VER’’
2. Press enter key
HOW TO CREATE A FILE
Type copy and give space
Type con and give space
Type the file name and press dot
Type the extension number and press enter key
Type the content of the file
After typing, press CTRL + Z or press SHIFT + F6
NOTE: an extension number must not be more than three characters or less than three characters.
Whenever a file is saved, the system will display ‘’FILE COPIED’’.

HOW TO RENAME A FILE


Type REN and give space
Type the file name which you want to rename and press dot
Type the extension number if any and give space
Type the new name which you want to use and press dot
Type extension number if any and press enter key

TO VIEW THE CONTENT OF A FILE


Type ‘’TYPE’’ and give space
Type the file name and press dot
Type the extension number if any
Press enter key

TO COPY A FILE INTO A FLASH


Insert the flash
Type copy and give space
Type the file name, dot, extension number and give space
Type D: and press enter key

HOW TO OPEN A FILE SAVED IN D:


Insert your drive
Type D:
Type ‘’TYPE’’ and give space
Type the file name, dot, and extension number
Press enter key

HOW TO DELETE A FILE


Type DEL and give space
Type the file name and press dot
Type the extension number
Press enter key
HOW TO VIEW ALL THE WORK YOU HAVE DONE
Type DOSKEY
Press enter key
Use the arrow key to bring them out

TO CREATE A DIRECTORY
Type MD and give space
Type the name of the directory
Press enter key

TO OPEN A DIRECTORY
Type CD and give space
Type the name of the directory
Press enter key

TO CLOSE AN ACTIVE DIRECTORY


Type CD..
Press enter key
TO DELETE A DIRECTORY
Type RD and give space
Type the name of the directory and press enter key
TO RENAME A DIRECTORY
Type REN and give space
Type the current directory and give space
Type the new name and press enter key
TO DISPLAY THE CONTENT OF THE DIRECTORY
Open the directory to be used
Type DIR and press enter key
TO DELETE THE ENTIRE CONTENT OF THE DIRECTORY
Type DEL and give space
Type the name of the directory
Press enter key
From the message that will appear, press Y or N yes and press enter key
HOW TO COPY A FILE IN A DIRECTORY
Type copy and give space
Type the file name, dot, and extension number and give space
Type the name of the directory and press enter key
HOW TO PRINT A FILE
Type PRINT and give space
Type the file name, dot, extension number
Press enter key
TOPIC 4: PROGRAMMING LANGUAGES
Computer programming is the specification of instructions that a computer follows to perform a particular
task. Computer programming is the process of designing and writing computer programs.
A computer program is a sequence of instructions that tells a computer what to do and how to do it.
Computer programming is the specification of instructions that a computer follows to perform a task.
A computer programmer is a computer specialist who writes computer programs and checks the mistakes in
the program.
A programming language is a language used to write instructions for the computer. Programming language,
like any human language has rules and grammar that governs the formation of a statement.
The syntax of a language describes the possible combinations of symbols that form a correct statement. The
meaning given to these combinations of symbols is called semantics.
LEVELS OF PROGRAMMING
I. MACHINE LANGUAGE: Is a system of instructions and data directly understood by the computer’s CPU.
These instructions and data are combinations of sequence of bits (0’s and 1’s) with different patterns
corresponding to different commands to the machine.
ii. ASSEMBLY LANGUAGE: This language uses abbreviations or symbolic letter codes (mnemonics) to write
each machine-language instruction. The letter codes are used in place of binary digits. Programs written in
Assembly language are translated into machine language by an Assembler.
iii. HIGH LEVEL LANGUAGE: The instructions of this language are written using words that are very close
to human languages and algebra-type expression. They are closer to human understanding and are translated
into machine language by a compiler or an interpreter.
Both machine and assembly languages are also called low level languages.
Features/characteristics of each level of programming language
              MACHINE LANGUAGE
1. These instructions consist of binary numbers (set of 0’s and 1’s)
2. This language is machine dependent i.e. instructions written for a particular type of computer can only be
executed on that particular machine.
3. It is very hard for people to write and understand thus making the programs error prone.
4. Each CPU design has its own machine language, which is the set of instructions that the CPU of that machine
understands and executes.
ASSEMBLY LANGUAGE
1. Uses mnemonics (symbolic operation codes) and operands (symbolic storage address).
2. Machine dependent
3. For any assembly language instruction, one machine language instruction is generated.
4. It illustrates fundamentals of computer construction and operation.
            HIGH LEVEL LANGUAGES
1. Machine independent: programs written or compiled on one type of Computer can be executed (run) on
different type of computer that has different architecture.
2. It uses instructions that seem English-like and thus closer to human understanding.
3. Easy to detect errors
4. consists of well-defined syntax and standard.
5. Requires a compiler to translate into machine language before the computer can execute them.
6. Programs written in HLL are called source code and the compiled version is called object code.

COMPARISON OF LEVELS OF PROGRAMMING LANGUAGES


MACHINE LANGUAGE ASSEMBLY LANGUAGE HIGH LEVEL LANGUAGE
Difficult to learn, write It is difficult but easier than It is easier to learn, write and
and debug. it is the native machine language. It is one debug. And it is close to
or mother tongue of the level above the machine human language
computer. language
It is machine dependent Machine dependent Machine independent
Does not require a Requires a translator called Requires a translator called a
translator Assembler compiler or interpreter
Instructions consist of Instructions consist of Instructions consist of
binary digits (1’s and 0’s) symbols and mnemonics English-like words, symbols
and numeric.
 

EXAMPLES OF PROGRAMMING LANGUAGE

CLASSES EXAMPLES

1. Procedural language Ada, Algol, BASIC,COBOL,


FORTRAN, Pascal, etc.

C++, JAVA, Smalltalk, visual BASIC,


2. Object oriented language Net, etc.

3. Webpage design and data JavaScript, MySQL, Python, HTML,


management etc.
 
TOPIC: BASIC PROGRAMMING LANGUAGE
BASIC PROGRAMMING LANGUAGE
The full meaning of BASIC is Beginners all-purpose symbolic instruction code. The BASIC language was
written in 1960 by John G Kemeny and Thomas Kurtz at Dartmouth College for students to use and to learn
programming ideas.
VERSIONS OF BASIC
Visual BASIC
GWBASIC
QBASIC
BASICa
QUICK BASIC

BASIC CHARACTER SET


A character set is simply a list of letters, numbers and symbols that provide one with the characters used in a
particular language and that can be printed and displayed.
THE BASIC CHARACTER SETS ARE
1 Alphabetic characters (A-Z and a-z)
2. Numeric characters (0-9 and A-F)
3. Special characters:
The special characters are;
Data type suffixes: it is used to tell the computer the type of data you are giving for processing.
EXAMPLES OF DATA TYPE SUFFIXES
! Exclamation mark: it is used for single precision. A single precision data type stores real numbers up to 7
decimal places. e.g. 21.25134
# Hash: it is used for double precision. It stores real numbers that are more than those of single precision. e.g.
21.245376567867678
$ Dollar sign: it is used for string representation. A string is a sequence of characters usually enclosed in double
quotation mark e.g... “OKORO’
% Percentage sign: it is used for integer representation. An integer is a whole number that is either negative or
positive .e.g... 10, 15, -18, 0, 55, 125 etc.
Ampersand sign &: it is used for long integer .e.g.. 2,147,435,769

ARITHMETIC OPERATORS
CHARACTER NAME USES
* Asterisk For multiplication, e.g. A*B or (3*5)
- Minus For subtraction, e.g. M-N or (4-1)
+ Plus For addition, e.g. K+N or (1+6)
/ Forward slash For real division, e.g. A/B or (7/3)=2.33
\ Bask slash For integer division, e.g. P\G or (7\3)=2
^ Caret For exponentiation, e.g. A^B or (7^3)
RELATIONAL (COMPARISON) OPERATOR
CHARACTER NAME USES
= Equal to A=B
>  Greater than A>B
<  Less than A<B
>= Greater than or Equal to A >=B
<= Less than or Equal to A <= B
Keyword
Keywords are words that have special meaning and function in BASIC. Such words must be used strictly
according to their functions, otherwise the computer will respond with error message.

Here are some of the BASIC keywords and their uses


KEYWORD USES EXAMPLE
S
REM Make comment about an instruction or about the 10 REM Program to add
whole program two numbers
INPUT Used to ask the user to supply the data to be 5 INPUT A,B,C
processed while the program is executing
PRINT Used to display the output of operation on the screen PRINT “The values”, A,B
LET Used to assign a value to a variable 3 LET A=5
READ Used to tell the computer that the data to be 10 READ A,B
processed is supplied within the program statements.
Used together with DATA keyword
DATA Used to show the computer the data it is asked to 10 DATA 4,7
read in the READ statement. Used along with READ
keyword.
END To end the program 5 END
BASIC VARIABLES AND CONSTANTS
A constant is a fixed quantity that does not change. when the value of a memory location is not to be changed,
we refer to such memory location as “constant
Two types of constants
a. Numeric constants
a. String constants.
Numeric constants are positive or negative numbers. Numeric constants include integers and real numbers.
Real numbers are numbers that have the whole number part and the fractional or decimal part. e.g. 70.00, -
96.14, etc.
VARIABLES: the value of a variable changes. It is not always constant. Variable is an identifier or a name of a
memory location where data (values) can be placed or stored. Because the value placed in a memory location
can be changed at any time, we call such memory location “a variable”.
RULES GUIDING THE NAMING OF BASIC VARIABLES
a. A variable name must start with a letter of the alphabet and not a number or special character.
b. A BASIC variable name can contain not more than 40 characters.
c. There should not be a blank space in the name of a variable.
d. No keyword should be used as a variable.
e. A digit (number) may be part of a variable provided it does not start the name.
f. The last character in a BASIC variable may contain a special character like %, $, !, #, & depending on
the type of constant such a variable is used to represent
BASIC STATEMENTS
A BASIC statement is any valid instruction given to computer for processing of data.
The BASIC statements are;
Line number: BASIC statement starts with a line number that goes from lowest to highest. It is called a
statement number or line number and it must be integer.eg. 10, 15, 20, 25 etc.
Remark statement: this is used to describe what the program or a segment of the program is all about.eg. REM
A PROGRAM ON ADDITION
Assignment statement: this statement enables a variable to be created and a value to be assigned to it.eg.
10 AGE%=13
Input statement: this statement can be used to create variable names, display what is placed following it as well
as take in the response of the user. It is used to ask the user to supply the data to be processed.
READ and DATA statement: The READ statement is used to supply data into the program, but unlike the
INPUT statement, the programmer supplies the data inside the program codes using the DATA keyword.
Print statement: this is an output statement used to display the result of what the computer has done.
End statement: the end statement marks the end of the program. It is a program terminator.
BASIC KEYWORDS
Keywords are words that have special meaning and function in BASIC, which is different from the way the
words are commonly used.
Keywords are; REM, INPUT, READ, DATA, PRINT, END, etc.
BASIC EXPRESSIONS
A BASIC expression is found when two or more characters, strings, variables or constants are combined with
arithmetic operators.
The BASIC expressions are; A+B, A1+5, L*W, P*R*T, A/D, C<D
ALGEBRAIC EXPRESSION BASIC EXPRESSION

A÷B or 6÷2 A/B or 6/2


Pb or 32 P^b or 3^2
A+B or 7+3 A+B or 7+2
C1×P or 5×4 C1*P or 5*4
2b2+5c 2*(b^2)+5*c
√(b2-4ac)/2a Sqr(b^2-4*a*c)/2*a
b =1/4ac b =1/4*a*c

ARITHMETIC OPERATION PRECEDENCE


The rule that guides the order in which operation must be performed in an expression is known as
“precedence” rule.
THE ORDER SYMBOL NAME OF SCHOOL
1 () Bracket
2 ^ Exponentiation
3 - Negation
4 *or / Multiplication
5 \ Integer
6 MOD Modulo (remainder)
7 + or - Addition or subtraction
  WRITING SIMPLE BASIC PROGRAMS
Examples;
Write a simple BASIC program that will add one and two, and print out the answer.
PROGRAM
10 REM A PROGRAM ON ADDITION
15 A=1
20 B=2
25 C=A+B
30 PRINT C
35 END
Press SHIFT + F5 to run the program
2. Write and run a simple BASIC program that will calculate and print the area of a rectangular object with
length 15 and width 10 units.
PROGRAM
10 REM A PROGRAM ON AREA
15 L=15
20 W=10
25 A= L*W
30 PRINT A
35 END
3. Write a BASIC program that will calculate and print the SUM and AVERAGE of any three numbers.
PROGRAM
10 REM A PROGRAM ON SUM AND AVERAGE
15 A=10
20 B=20
25 C=30
30 SUM=A+B+C
35 AVE=SUM/3
40 PRINT SUM
45 PRINT AVE
50 END
4. Write a program to calculate the average age of five students. Using variable A1, A2, A3, A4, A5 to represent
their ages and the statement input to assign values.
PROGRAM
10 REM A PROGRAM ON AVERAGE AGE
15 A1=10
20 A2=20
25 A3=30
30 A4= 40
35 A5= 50
40 SUM=A1+A2+A3+A4+A5
45 AVE=SUM/5
50 PRINT AVE
55 END
5. Write a BASIC program that will calculate the area of a square.
PROGRAM
10 REM A PROGRAM ON AREA OF A SQUARE
20 S=6
30 A=S*S
40 PRINT A
50 END
6. Write a BASIC program that will calculate the area of a triangular object with base 5, height 12.
PROGRAM
10 REM A PROGRAM ON AREA OF A TRIANGLE
15 B=5
20 H=12
25 A=(B*H)/2
30 PRINT A
35 END
7. Write and calculate a BASIC program that will print the surface area of a cylinder
PROGRAM
Rem a program on surface area of a cylinder
r= 2.0
h=5.0
Surfacearea=(2*22*(r+h))/7
Print surfacearea
end
8. A program to find the volume of a cylinder.
PROGRAM
Rem a program on volume of a cylinder
h=38
r= 35
Pie=3.142
Volume=pie*(r*r)*h
Print volume
End
9. A program to sum two integers.
PROGRAM
Rem a program on sum
A= 1
B= 2
Sum=a + b
Print sum
end

You might also like