SS1 Second Term- Computer Science

  • Revision: Computer System Software
  • Computer Application Software
  • Programming Language
  • Translators
  • Communication System and The Internet
  • Programming Steps
  • COMPUTER DATA AND INFORMATION: SS1 FIRST TERM COMPUTER SCIENCE

Understanding Computer System Software

This is in contrast to hardware; it is the invisible part of a computer system. These set of software are provided by the manufacturer to assist the computer operators/users to make the best use of their machine as distinct from the specific programs written to solve specific problems.

Software is generally categorised into two:

  • System software
  • Application software
  1. System software: This software contributes to the control and performance of the computer system. The collective name of the programs is system software or utility software. System software can further be sub-divided into – a. operating system, b. translators, c. utilities. System software is a type of computer program that is designed to run a computer’s hardware and application programs. If we think of the computer system as a layered model, the system software is the interface between the hardware and user applications.The operating system (OS) is the best-known example of system software. The OS manages all the other programs in a computer.Other examples of system software and what each does:
    • The BIOS (basic input/output system) gets the computer system started after you turn it on and manages the data flow between the operating system and attached devices such as the hard disk, video adapter, keyboard, mouse, and printer.
    • The boot program loads the operating system into the computer’s main memory or random access memory (RAM).
    • An assembler takes basic computer instructions and converts them into a pattern of bits that the computer’s processor can use to perform its basic operations.
    • A device driver controls a particular type of device that is attached to your computer, such as a keyboard or a mouse. The driver program converts the more general input/output instructions of the operating system to messages that the device type can understand.
    • According to some definitions, system software also includes system utilities, such as the disk defragmenter and System Restore, and development tools such as compilersand debuggers.
  • Operating system: A computer cannot understand instructions without the operating system. OS is a set of instruction (programs) designed to efficiently manage the resources of the computer system. Operating system supervises the input and output operation, communicating with the operator and allocating the computer resources to allow the operation of the computer to progress smoothly with minimum intervention.

An operating system performs these services for applications:

  • In a multitasking operating system where multiple programs can be running at the same time, the operating system determines which applications should run in what order and how much time should be allowed for each application before giving another application a turn.
  • It manages the sharing of internal memory among multiple applications.
  • It handles input and output to and from attached hardware devices, such as hard disks, printers, and dial-up ports.
  • It sends messages to each application or interactive user (or to a system operator) about the status of operation and any errors that may have occurred.
  • It can offload the management of what are called batch jobs (for example, printing) so that the initiating application is freed from this work.
  • On computers that can provide parallel processing, an operating system can manage how to divide the program so that it runs on more than one processor at a time.

Examples of Operating System

  • Ms DOS: Microsoft Disk operating system commonly
  • Noval: This is usually used in a network environment and linked together to share resources.
  • UNDC: Usually used in a multiuser environment where many people can use one log computer at the same time.
  • Windows Operating System: Can be defined in a single microcomputer or in a network environment.

Functions of the Operating System

All operating systems must be the same and can be divided into 3:

Allocating system resources: Operating system directs the traffic (movement) inside the computer deciding what resources will be used and for how long.

  • Time: The CPU time is divided into time slices which are measured in milliseconds. When a task starts, a certain number of time slices is assigned. When the time expires, another task gets the turn to start; the first task must wait until it has another turn. Tasks are assigned so that the high priority task gets more time slices than the low priority task.
  • Memory: The memory must be managed at all times. One way to help the traffic arm is to use virtual memory, which includes disk space as main memory. It is slower to put data on hard disk but it increases the amount of time. When the memory gets full, some of the data is paged out to the hard disk. This is called swapping.
  • Input and output flow control: The OS reads data that are coming in data form from the disk and signals the printer to print and send data. To speed up the output to the printer, most OS allows print spading, where the data to be printed is first put in file, this helps to sped up the process.

Breakdown of Operating System Functions.

  1. Boot process: When the computer is switched on the boot program that is resided in Rom initialize the setup of the computer, the then load the rest of the operating system from the banking storage (hard ware) in the RAM.
  2. Operating system does the work of sharing and accounting of the computer resources
  3. Operating system handles the input and output of data and information.
  4. Operating system handles the management of memory.
  5. Operating system handles the management of the hardware.
  6. Operating system handles multitasking and multi programming.
  7. Operating system handles protection and error trending.
  8. Operating system acts as an interface between the user and the computer
  9. Operating system controls interaction and program control

 ASSESSMENT

  1.  Computer system software is the ___ part of the computer
    (a) visible
    (b) invisible
    (c) hard
    (d) soft
  2. Software contributes to the ____ and ____ of the computer system
    (a) hard and soft
    (b) clean and unclean
    (c) straight and crooked
    (d) control and performance
  3. The set of instructions designed to efficiently manage the resources of the computer system is known as
    (a) conducting system
    (b) producing system
    (c) software system
    (d) operating system
  4. Examples of operating systems are the following except
    (a) MS DOS
    (b) Noval
    (c) Doors
    (d) Windows
  5. RAM means
    (a) Routing Access Memory
    (b) Return Access Memory
    (c) Round Access Memory
    (d) Random Access Memory

ANSWERS

  1. b
  2. d
  3. d
  4. c
  5. d

 Application Software

Application software is a programme or group of programmes designed for end users. This software can be divided into classes: system software and application software. Application software is a set of computer programs designed to permit the user to perform a group of coordinated functions, tasks, or activities. Application software cannot run on itself but is dependent on system software to execute. Examples of an application include a word processor, a spreadsheet design and management system, an aeronautical flight simulator, a console game, a drawing, painting, and illustrating system, or a library management system.

 Computer application software are so numerous. The different types of application software are:

  • Office application
  • Business application
  • Accounting application
  • Scientific application
  • Industrial applications
  • Games

a. Office/business application: Computer has become very important in offices and business world including bank, aviation, industry and communication organisations. Before now, there were lots of paper works in offices but today, the computer has reduced this as lots of information are stored directly into it. Eg of various business application are

  • Payroll system: used to prepare staff salaries.
  • Invoice control: given to a customer after a purchase has been made.
  • Stock control: used in supermarket and departmental stores to keep a record of purchases made by customers and to know the current stock of goods in the store.
  • Bank transaction such as deposit, withdrawal, funds transfer and customer information unit are all done in the bank.

b. Scientific/industrial application: Computers are used for scientific research, weather forecast, space exploration, and laboratory tests – manual and automated e.t.c.

c. Games: There are different kinds of games that can be played through the use of the computer system. E.g spider solitaire, card games, chess e.t.c.

d. Application Suite: Has multiple applications bundled together. Related functions, features and user interfaces interact with each other.

e. Enterprise Software: Addresses an organization’s needs and data flow in a huge distributed environment.

f. Enterprise Infrastructure Software: Provides capabilities required to support enterprise software systems.

g. Information Worker Software: Addresses individual needs required to manage and create information for individual projects within departments.

h. Content Access Software: Used to access contents and addresses a desire for published digital content and entertainment.

i. Educational Software: Holds contents adopted for use by students.

j. Media Development Software: Addresses individual needs to generate and print electronic media for others to consume.

Examples of Application Software

Microsoft Word is a popular word-processing application that is included in the software suite of applications called Microsoft Office. A software suite is a group of software applications with related functionality. For example, office software suites might include word processing, spreadsheet, database, presentation, and email applications.

Graphics suite such as Adobe creative suite includes application for creating and editing images while Sony Audio suite is for Audio production.  

ASSESSMENT

  1. Application software is a programme or group of programmes designed for
    (a) manufactures
    (b) end users
    (c) retailers
    (d) engineers
  2. Application software permit the user to perform the following operations except
    (a) coordinated functions
    (b) tasks
    (c) activities
    (d) reboot
  3. One of these is not a type of application software
    (a) office software
    (b) business software
    (c) RAM software
    (d) games
  4. Word processing, spreadsheet, database, presentation are all examples of
    (a) Enterprise software
    (b) games
    (c) accounting software
    (d) office software
  5. The  application software that holds contents adopted for use by students is
    (a) educational software
    (b) business software
    (c) office software
    (d) games

ANSWERS

  1.  b
  2. d
  3. c
  4. d
  5. a

Programming Language

Computer Science SS1 Second Term

Programming Language

This is a process that results in the development of a set of detailed instructions following a pattern of a particular programming language necessary to solve a problem. A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. High-level programming languages, while simple compared to human languages, are more complex than the languages the computer actually understands, called machine languages. Each different type of CPU has its own unique machine language.

Levels of Languages

Each language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions.

  • Machine language
  • Low level language
  • High level language
  • Natural level language
  1. Machine language: This was the first level of language known to man. It involves the use of binary digits ie 0s and 1s to write programs and instructions.
  2. Low level language: This was the next language developed after the machine language. It involves the use of binary code.
  3. High level language: They are highly developed languages and are currently used by programmers in the world today. It involves the use of English to write programming instructions. The invention of high level language has made it easy for programmers to develop programs in the shortest possible time. 

Types of high level programs

  • BASIC
  • FORTRAN
  • COBOL
  • PASCAL
  • C – Language (C++)
  • JAVA
  1. Natural language: This involves different types of languages known to mankind e.g. Igbo, Yoruba, Hausa, Chinese, Ghanaian languages.

ASSESSMENT

  1.  _______ is a formal constructed language designed to communicate instructions to a machine, particularly a computer
    (a) programming language
    (b) natural language
    (c) Igbo language
    (d) Yoruba language
  2. Levels of language include the following except
    (a) Machine language
    (b) human language
    (c) low level language
    (d) high level language
  3. The language the computer actually understands is called
    (a) man language
    (b) animal language
    (c) machine language
    (d) mechanics language
  4. _____ involves the use of the use of binary digits i.e. Os and 1s
    (a) low level language
    (b) machine language
    (c) natural language
    (d) high level language
  5. These are examples of high level programs except
    (a) FORTRAN
    (b) COBOL
    (c) JAVA
    (d) D++

ANSWERS

  1.  a
  2. b
  3. c
  4. b
  5. d

Translators

Computer Science SS1 Second Term

Introduction

Translators are highly developed programs capable of converting high level language to machine language, low level language to machine language. A translator is a computer program that performs the translation of a program written in a given programming language into a functionally equivalent program in a different computer language, without losing the functional or logical structure of the original code (the “essence” of each program).

Types of translators

  • Assembler
  • Compiler
  • Interpreter
  •  
  • If the translator translates a high level language into another high level language, it’s called a translator or source-to-source compiler. Examples include Haxe, FORTRAN-to-Ada translators, CHILL-to-C++ translators, PASCAL-to-C translators, COBOL (DialectA)-to-COBOL(DialectB) translators.
  • If the translator translates a high level language into a lower level language it is called a compiler. Notice that every language can be either translated into a (Turing-complete) high level or assembly language.
  • If the translator translates a high level language into an intermediate code which will be immediately executed it is called an interpreter.
  • If the translator translates target/machine code to source language it is called a decompiler. Example: DCC, Boomerang Decompilers and Reverse Engineering Compiler(REC).
  • If the translator translates assembly language to machine code it is called an assembler. Examples include MASM, TASM and NASM.
  • If the translator translates machine code into assembly language it is called a disassembler. Examples include gdb, IDA Pro and OllyDbg.
  • Translators that translate from a human-readable design specified in terms of rules and high level functions, into the equivalent logic gates and chip layout needed to achieve its manufacture, belong to electronic design automation and hardware description language categories.

1. Assembler: This is a translator that is capable of converting low level language to machine language directly. An assembler translates assembly language into machine code. Assembly language consists of mnemonics for machine opcodes so assemblers perform a 1:1 translation from mnemonic to a direct instruction.
For example: LDA #4 converts to 0001001000100100

Advantages of using an Assembler:

Very fast in translating assembly language to machine code as 1 to 1 relationship

Assembly code is often very efficient (and therefore fast) because it is a low level language

Assembly code is fairly easy to understand due to the use of English-like mnemonics
Disadvantages of using Assembler:

Assembly language is written for a certain instruction set and/or processor

Assembly tends to be optimised for the hardware it’s designed for, meaning it is often incompatible with different hardware

Lots of assembly code is needed to do relatively simple tasks, and complex programs require lots of programming time

2. Compiler: This is a translator that is capable of converting high level language to machine language directly. A Compiler is a computer program that translates code written in a high level language to a lower level language, object/machine code. The most common reason for translating source code is to create an executable program (converting from a high level language into machine language).

Advantages of using a compiler

Source code is not included, therefore compiled code is more secure than interpreted code

Tends to produce faster code than interpreting source code

Produces an executable file, and therefore the program can be run without need of the source code
Disadvantages of using a compiler

Object code needs to be produced before a final executable file, this can be a slow process

The source code must be 100% correct for the executable file to be produced

3. Interpreter: An interpreter program executes other programs directly, running through program code and executing it line-by-line. As it analyses every line, an interpreter is slower than running compiled code but it can take less time to interpret program code than to compile and then run it — this is very useful when prototyping and testing code. Interpreters are written for multiple platforms, this means code written once can be run immediately on different systems without having to recompile for each. Examples of this include flash based web programs that will run on your PC, MAC, games console and Mobile phone.

Advantages of using an Interpreter

Easier to debug(check errors) than a compiler

Easier to create multi-platform code, as each different platform would have an interpreter to run the same code

Useful for prototyping software and testing basic program logic
Disadvantages of using an Interpreter

Source code is required for the program to be executed, and this source code can be read making it insecure

Interpreters are generally slower than compiled programs due to the per-line translation method

Stages of programming

There are six stages in developing a good program.

  1. Program analysis
  2. Program design
  3. Program coding
  4. Program verification
  5. Program documentation
  6. Program maintenance

Flow chart: This is the pictorial or graphical representation of steps in writing a program.

Flow Chart

A logarithm is the step by step procedure in solving a problem or task

Basic programming language

The programming language must have the following basics

  1. Language syntax: This involves codes which are understood by computer compiler of the computer language. Example “20” is a Hausa syntax. Compiler has its own syntax and it includes
  • Print
  • REM
  • Input
  • Output
  • Tab
  1. Variable: Also known as identifier, which contains some known or unknown quantity of information referred to as a value.
  2. Constant: These are data items which do not change during program execution.

Examples include:

1, 2, 3 ……..

A, B, C, .…..

  1. Operator: This can be arithmetic, relational or logic.

Examples:

Arithmetic operators include (arithmetic language)

+ = addition

– = subtraction

x = multiplication

/ = division

؈ or ** = Exponent

Relational operators include

= for equality

> = greater than

< = less than

≤ = less than or equal to

≥ = greater than or equal to

Logical operations

True or false

Yes or no

OR or AND

Every program must have

  1. Beginning
  2. End
  3. Body

ASSESSMENT

  1.  ____ converts high level or low level language to machine language
    (a) transmitter
    (b) translator
    (c) transferrer
    (d) transducer
  2. One of these is not a type of translator
    (a) assembler
    (b) compiler
    (c) interpreter
    (d) silicon
  3. If the translator translates target/machine code to source language it is called a
    (a) machiner
    (b) languager
    (c) decompiler
    (d) congester
  4. ______ is capable of converting high level language to machine language directly.
    (a) assembler
    (b) compiler
    (c) interpreter
    (d) silicon
  5. How many stages are involved in developing a good program.
    (a) 4
    (b) 5
    (c) 6
    (d) 7

ANSWERS

  1. a
  2. d
  3. c
  4. a
  5. c

Programming Steps

Computer Science SS1 Second Term

Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable computer programs. Programming involves activities such as analysis, developing understanding, generatingalgorithms, verification of requirements of algorithms including their correctness and resources consumption, and implementation (commonly referred to as coding) of algorithms in a target programming language.

Steps Involved in Programming

  1. Analyzing the Problem
  2. Algorithm design / Pseudocode
  3. Flowchart
  4. Coding
  5. Debugging
  6. Testing
  7. Final output
  8. Documentation

1. Analyzing the Problem

This is the first step of programming and involves getting the following information. These things are very important for the programmer because it provides him the basis for planning about the programming and to control the potential difficulties that may arise.

2. Algorithm Design

All instructions to be performed at different stages are listed. This is done in simple English language. We may call it the strategic step.

3. Flowchart

It is a graphical tool that shows the steps/stages which are to be executed in a program. All the steps which are written in the second stage are now presented in a diagrammatic manner so as to make it easily understandable. Making off lowchart helps us in increasing our process of program development because it facilitates our ability to define the logic, detecting and removing errors in a program design.

Types of flow chart

  • System Flowchart shows the processing of the entire system. It describes the input/output devices, the media being used and the flow of data in the system.
  • Program flowchart shows the complete steps involved in the execution of a program including I/O, processing, loops and branching. It is more detailed than system flowchart.

4. Coding

In this step, the programmer writes the instructions in a computer language to solve the problem. All coding processes depend upon the information obtained from previous steps. Choice of language depends upon the requirements and facilities available with a language.

5. Debugging

In this stage we remove all the errors in the program because when we are coding, there are chances that some mistakes may occur at that time. Here the program is executed manually, called DRY RUN. This is done several times until all the errors are removed from the program and the system becomes error free.

6. Testing

The program is tested by entering a dummy data (which includes usual, unusual and invalid data) to check the behavior and result of the program towards the given data.

7. Final Output

After going through all the above stages, the program is given the TRUE DATA. Here the programmer expects positive results of the program and expects full efficiency of the program.

8. Documentation

Most programmers neglect this stage by giving many reasons, but this is very important because this will help the programmer to correct the problems that may occur in the program.

There are two types of documentation

  • User Manual provides the use complete information about how to operate the program and what needs to be done when the user face a problem.
  • Technical Manual contains the technical information about the program. This is used to get technical details of the program, when the system is not working properly or requires modifications.

ASSESSMENT

  1. Computer programming is often shortened to
    (a) progamme
    (b) programming
    (c) compute
    (d) computer
  2. Programming involves activities such as the following except
    (a) analysis
    (b) developing understanding
    (c) generating algorithms
    (d) solving maths
  3. First step of programming
    (a) flowchart
    (b) algorithms design
    (c) analysing the problem
    (d) debugging
  4. ___ is a graphical tool that shows the steps/stages which are to be executed in a program
    (a) flowchart
    (b) documentation
    (c) algorithms design
    (d) User manual
  5. The stage at which all errors are removed in the program is
    (a) flowchart
    (b) debugging
    (c) testing
    (d) coding

ANSWERS

  1. b
  2. d
  3. c
  4. a
  5. b

COMPUTER DATA AND INFORMATION: SS1 FIRST TERM COMPUTER SCIENCE

DEFINITION OF DATA: 

Computer Data can be defined as the representations of facts, concepts or instructions in formalized manner that are suitable for communication, interpretation and processing by human/electronic machine. As you should already know, a computer is an information processing machine. In this vein therefore, computers process data with the intention of producing information.

DATA PROCESSING CYCLE

Data processing involves the re-structuring or re-ordering of data by people or machine, with the intention of increasing their usefulness and add values for particular purpose[s]. Data processing consists of basic steps input, processing and output. The diagram below illustrates the three steps that constitute the data processing cycle-

  • Input: In this step the input data is prepared in some convenient form for processing. The form will depend on the processing machine. For example, when electronic computers are used, the input data could be recorded on any one of several types of input medium, such as magnetic disks, tapes and so on.
  • Processing: In this step input data is changed to produce data in a more useful form. For example, pay-checks may be calculated from the time cards, or a summary of sales for the month may be calculated from the sales orders.
  • Output: Here the result of the proceeding processing step are collected. The particular form of the output data depends on the use of the data. For example, output data may be pay-checks for employees.

DEFINITION OF INFORMATION

Information is organised or classified data which has some meaningful values for the receiver. Information is the processed data on which decisions and actions are based. Note that in order for decision-meaninful to be meaningful and worthwhile, the processed data which inform decisions must qualify for the following characteristics:

  • Timely: Information should be available when required.
  • Accuracy: Information should be accurate.
  • Completeness: Information should be complete

DIFFERENCE[S] BETWEEN DATA AND INFORMATION

 Data: Data is raw, unorganized facts that need to be processed. Data can be something simple and seemingly random and useless until it is organized. For example, every student’s after a WASSCE exam score is one piece of data.

Information: When data is processed, organized, structuredor presented in a given context so as to make it useful, it is called information. For example, the average score of a class or of the entire school  (which can be derived from a given data such the one cited above), is an information.

ASSESSMENT

  1. Computers process data with the intention of producing
    (a) data
    (b) calculations
    (c) information
    (d) process
  2. The representations of facts, concepts or instructions in formalized manner that are suitable for communicationinterpretation and processing by human/electronic machine is
    (a) computer data
    (b) computer information
    (c) computer system
    (d) computer nature
  3. Data processing involves the re-structuring or re-orderingof ___ by people or machine
    (a) data
    (b) information
    (c) nature
    (d) system
  4. Data processing consists of these three basic steps input, processing and ____
    (a) data
    (b) infusion
    (c) output
    (d) locking
  5. ______ is organised or classified data which has some meaningful values for the receiver
    (a) output
    (b) data
    (c) information
    (d) lock

ANSWERS

  1. c
  2. a
  3. a
  4. c
  5. c