22
Computer Pioneers Computer Ace Computer Studies O level

Computer Studies 7010 O Level 2011 Syllabus Insert

Embed Size (px)

Citation preview

Page 1: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Pioneers

Computer Ace

Computer Studies O level

Page 2: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 2 of 22

This pamphlet incorporates the latest changes in the syllabus and should be used as

additional teaching material for the Computer Pioneers Computer Ace course.

Page 3: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 3 of 22

1. System Analysis and Design (Chapter 6) ........................................................................... 4

1.1. Data Flow Diagrams (New Symbols) ........................................................................ 4

1.2. Action Plans ............................................................................................................ 5

PERT (Project Evaluation and Review Technique) ......................................................... 5

Gantt Charts ........................................................................................................... 6

Critical Path Analysis ............................................................................................... 7

1.3. Testing – (Chapter 6 – Section 3. Systems Implementation) ......................................... 8

2. Algorithm Design and Programming Concepts (Chapter 8) .................................................. 9

2.1. For – Next loop ....................................................................................................... 9

3. Video conferencing.........................................................................................................10

4. Logic Gates and Circuits .................................................................................................12

4.1. Introduction to Logic Gates ...................................................................................... 12

4.2. Truth Tables .......................................................................................................... 13

4.3. Combination of Logic Gates ..................................................................................... 16

4.4. Designing a Simple Logic Network ............................................................................ 19

Page 4: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 4 of 22

1. System Analysis and Design (Chapter 6)

1.1. Data Flow Diagrams (New Symbols)

DFD is a pictorial representation that shows the flow of data in a system. It shows the

interaction between the entities and system.

The symbols used for DFD are:

This symbol is used to represent a process within

the system.

This symbol is used to represent an Entity that

interacts with the process

This symbol is used to represent a data store/file

used in the system.

Arrows show the flow of data in the system.

Process

Entity

Data Store

Data Flow

Page 5: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 5 of 22

1.2. Action Plans

PERT (Project Evaluation and Review Technique)

PERT is a project management tool that is used to show and analyse the tasks involved in a

project. It shows the flow of dependent tasks that must be followed in order to complete the

project.

PERT charts are used to handle large projects where analysis of task and time allocation is

of great importance. They were originally developed in 1950s.

The steps used in PERT chart planning are:

1. Identification of activities involved in the project

2. Analysing the sequence of flow of dependencies

3. Developing a network diagram for the above identified activities

4. Estimating the time for each activity identified in Step 1

5. Determining the critical path for the set activities.

6. Updating the PERT chart as the project activities continue

Benefits of PERT

Ability to identify the expected project completion time

Shows the activity start and end dates

Helps to identify the probability of completion of tasks before a specified date

Shows the critical path activities that directly impact the completion time

Shows the activities that have slack time and could lend resources to critical path

activities in order to complete the project

Activity Symbol

PERT charts are created using series of boxes as shown above. Each box represents an

activity or a task.

Task name

Latest finish time

of an activity

Slack time

Duration of the activity

Earliest finish

time of an

activity

Latest Start time

of an activity

Earliest Start

time of an

activity

Page 6: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 6 of 22

Example

In the above example, there are 2 activities, A and C.

Activity A must be completed before Activity C begins. Activity A requires 5 days and

Activity C requires 4 days. Therefore this part of the project will require 9 days in total.

Gantt Charts

A Gantt chart is a pictorial representation that illustrates a project schedule. It shows all the

tasks and resources needed to complete a project. It is a project management tool that

helps to show planned work targets.

Example:

A Gantt chart for a simple project is given below. The project has 5 tasks. Each task has

been allocated the number of days required to complete it.

Earliest Start

Duration

Earliest Finish

Page 7: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 7 of 22

In this example, Task 1 (Analyse data) requires 5 days, Task 2 (Design the product)

requires 12 days and so on. Task 2 can start after 4 days of work of Task 1 and other

activities will follow according to the scheduled start dates.

Critical Path Analysis When planning a project, we want to know how long will the project take. When will we be

able to start a particular task? If this task is not completed on time, will the entire project

be delayed? Which tasks should we speed up in order to finish the project earlier?

Critical Path Analysis (CPA) is a pictorial representation for scheduling activities within a

project. It helps to determine the time required to complete a project and shows which

activities are critical and which are not.

The Critical Path is the route through the CPA, which has no idle time in any of the

activities. In other words, if there is any delay to any of the activities on the critical path,

the whole project will be delayed

The total time along this critical path is also the minimum time in which the whole project

can be completed.

Page 8: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 8 of 22

Example

In this example, there is a clear sequence of events that have to happen in the right order.

If any of the events on the critical path is delayed, then the project cannot be completed on

time.

Task A-C-F takes 3 + 1 + 3 = 7 weeks

Task A-D takes 3 + 2 = 5 weeks

Task B-E takes 4 + 2 = 6 weeks

Task A-C-F is said to be the critical path as if it is delayed the entire project would be

delayed.

1.3. Testing – (Chapter 6 – Section 3. Systems Implementation)

There are three general categories of test data:

Normal data:

Valid data in a range that the system is able to handle.

Extreme data:

Valid data at the highest or lowest value that can be accepted for a variable.

Abnormal data:

Invalid data that should be rejected by the system.

Example 1: In the context of numbers within the range of 1 to 200:

1. Normal data: Any number between 1 and 200

2. Extreme data: Both 1 and 200, the maximum and the minimum values

3. Abnormal data: Any number outside the range 1 to 200, any negative number, any

alphabetic character or other symbol/character

Page 9: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 9 of 22

Example 2: In the context of an alphabetic value:

1. Normal data: Any letter between „a‟ and „z‟

2. Extreme data: Both „a‟ and „z‟

3. Abnormal data: Any number or any other symbol/character

Example Test Case Field Data

type

Length Test Data Expected

Result

Actual Result

Customer

Number

Numeric 4 Normal : 24 System accepts System accepts

Abnormal : -2A System rejects System rejects

Extreme : 9999 System accepts System accepts

2. Algorithm Design and Programming Concepts

(Chapter 8 – Section 5. Pseudocodes - Repetition Control Structure)

As you have already learned, a repetition control structure has a repetition loop that will end

when the condition is false. In addition to the Repeat … Until and While … Do …

Endwhile structures, the For – Next loop is also a repetition structure.

2.1. For – Next loop

Example 1

Write an algorithm using pseudocode to input 5 numbers and display them. Use a For

Next loop.

For x = 1 to 5

Input x

Print x

Next x

Page 10: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 10 of 22

Figure 7.8 Video conferencing

Example 2

Write an algorithm using pseudocode to print 5 “*” and display them. Use a For Next

loop.

For x = 1 to 5

Print “*”

Next x

Example 3

Write an algorithm using pseudocode to input 25 marks. If mark greater than 50, it

should display “Pass” or otherwise display “Fail”. Use a For Next Loop.

Start

Define variable x, mark

For x = 1 to 25

Input mark

If (mark > 50) then

Display “Pass”

Else

Display “” Fail”

End if

Next x

3. Video conferencing

Video conferencing is a communication technology which is also

known as video teleconferencing. This allows users to

communicate in two or more locations via video and audio

transmissions simultaneously (i.e. moving pictures and sound).

This facility can be used whenever a live conversation is needed

where the people involved cannot physically come to the same

location for the meeting. Another consideration resulting in the

use of video conferencing could be the expenses or the time that a person would have to

utilise to travel to a meeting.

Page 11: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 11 of 22

Basic requirements needed for this facility:

Video camera or Webcam

Computer monitor or television

Microphones

Speakers, display device or telephone

Data transfer – telephone network, LAN or internet

Due to the availability of high speed internet connection with better images at a reasonable

cost, more people can afford to use this facility nowadays.

Reasons for the popularity of video conferencing:

Reduces cost - money is saved on travelling, accommodation, costs of lost time whilst

employees are out of the office, etc.).

Less impact on the environment (e.g. less traffic)

Flexibility – ability to call off a meeting at short notice, workers can work from home,

etc.

Allows staff around the world to see and interact with each other – more personal than

only hearing the voice

Applications of video conferencing:

Education – Distance learning programmes, virtual field trips

Business - Meetings on short notice

Media – Live press conferences

Health and Medicine – transmit data about a patient to another doctor for specialist

advice etc.

Page 12: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 12 of 22

4. Logic Gates and Circuits

4.1. Introduction to Logic Gates

A computer is an electronic device which can solve problems by accepting data, performing

various operations with the data, and supplying the desired output. The operations

performed by the computer can be divided into two categories; arithmetic operations and

logical operations. The central processing unit (CPU) in the system unit carries out all of

these operations. The central processing unit has a highly complex, extensive set of

electronic circuitry that executes stored program instructions. Have you ever wondered how

a computer carries out its operations? In order to find the answer to this question, you need

to understand something called Boolean algebra.

Algebra is a part of mathematics in which signs and letters represent numbers. Boolean

algebra is used as the basis of computer operations. This was developed by an English

mathematician called George Boole in the mid-nineteenth century.

Boolean algebra deals with binary variables and logic operations. Boolean variables can

have only two values, 0 or 1. Logic gates process signals which represent true or false.

Some common representations of logic operations are:

0 / 1

False / True

Off / On

Low / High

No / Yes

Open Switch / Close Switch

Page 13: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 13 of 22

A X

NOT A X

Logic Gate Symbols

The following are the five main logical operators used in Boolean algebra:

Simple graphical

representations

MIL symbols used to

represent logic gates

4.2. Truth Tables

A truth table is used to show how the logic gate functions.

NOT Operator

This logical operator is different from the rest as it normally has only one operand/input.

Note that NOT simply reverses the truth-value of its operand.

A X (NOT A)

0 1

1 0

NOR

NAND

OR

AND

NOT

Page 14: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 14 of 22

AND Operator

Can you see that X (A and B) is true only when both A and B are True? It is false when at

least one of A and B is false.

OR Operator

Can you see that X (A OR B) becomes true when at least one of A and B is true? It is false

when both A and B are false.

A simple expression has only one operator. The examples above are simple Boolean

operators. Expressions can also have more than one operator and these are known as

compound expressions. Now we are going to derive truth tables for some compound

Boolean expressions.

A B X (A AND B)

0 0 0

0 1 0

1 0 0

1 1 1

A B X (A OR B)

0 0 0

0 1 1

1 0 1

1 1 1

A

B X

AND A X

X

A

B

OR A X

Page 15: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 15 of 22

NAND (AND & NOT) Operator

First values for A AND B were derived. Then the NOT operator was applied. You can

derive truth tables for compound Boolean expressions in stages as shown above.

NOR (OR and NOT) Operator

First apply the OR operator to variables A and B. Then apply the NOT operator to the

result from the OR operator.

A B A AND B NAND X

0 0 0 1

0 1 0 1

1 0 0 1

1 1 1 0

A B A OR B NOR X

0 0 0 1

0 1 1 0

1 0 1 0

1 1 1 0

X

A

B

NOR A X

A

B

X

NAND A X

Page 16: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 16 of 22

4.3. Combination of Logic Gates

Two or more logic gates can be combined in order to develop a more complex logic network.

Look at the following example. This contains two inputs (A, B) and two logic gates:

To draw the truth table for the above logic circuit, we need to identify the number of

combinations. There are two inputs (A, B). Therefore, number of combinations of 1s and 0s

would be 22=4. To derive the output of P we need to refer to the output of B.

A B P (NOT B) X (P*A)

1 1 0 0

1 0 1 1

0 1 0 0

0 0 1 0

Now let‟s consider three inputs (A, B, C) and three logic gates:

A

B

C

X

AND

X A

B

C P

Q

OR

NOT

AND

A

B

X

P NOT

Page 17: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 17 of 22

We begin by identifying the number of combinations. There are three inputs (A, B, C).

Therefore the number of combinations of 1s and 0s would be 23=8. Now we look at the

outputs produced at P and Q and construct the truth table.

A B C P Q (P * B)

1 1 1 0 0

1 1 0 1 1

1 0 1 0 0

1 0 0 1 0

0 1 1 0 0

0 1 0 1 1

0 0 1 0 0

0 0 0 1 0

Now the final output (i.e. Q OR A)

A Q X

1 0 1

1 1 1

1 0 1

1 0 1

0 0 0

0 1 1

0 0 0

0 0 0

Page 18: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 18 of 22

Exercise

Draw the truth tables for the following logic gate circuits.

1.

2.

3.

NOR

NOT

AND

A

B

X

AND

NOT

OR X NOT

AND

NOT

OR

A

B

X

A

B

Page 19: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 19 of 22

4.4. Designing a Simple Logic Network

Consider the following statement:

“If A and B are on, then the lights will be on.”

In order to convert this on to a logic gate, let‟s consider 1=ON and 0=OFF.

If A=1 AND B=1 then X should be =1.

Now let‟s draw the logic network.

Once the logic circuit is drawn, we can then test it by drawing the truth table.

A B X (A*B)

1 1 1

1 0 0

0 1 0

0 0 0

Remember X should be ON only when A and B both are ON. The truth table shows us that

the above logic circuit is correct.

A

B

X

Page 20: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 20 of 22

Now let‟s consider another problem.

“If A AND B are on AND if C is on, then the lights will be on.”

This means:

If (A=1 AND B=1) AND C=1 then X=1

To draw the logic circuit, let‟s first consider the part written in brackets (i.e. A=1 AND B=1)

which is one gate.

Then we move on to the next gate (i.e. P=1 AND C=1), which again is an AND gate.

Now let‟s combine both the gates, and draw the truth table.

A B P (A*B) C X (P*C)

1 1 1 1 1

1 1 1 0 0

1 0 0 1 0

1 0 0 0 0

0 1 0 1 0

0 1 0 0 0

0 0 0 1 0

0 0 0 0 0

A

B

C

X

P

C

X

A

B

P

Page 21: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 21 of 22

Test and Review

Q1

Draw the truth tables for the following Logic gate circuits.

1.

2.

3.

AND

NAND

NOT

OR

NOR

A

B

C

X

NOR

NOR

NOR

A

B

C

D

X

NOR

NAND

A

B

C

X

Page 22: Computer Studies 7010 O Level 2011 Syllabus Insert

Computer Ace – Computer Studies O Level NCC Education Computer Pioneers

V4.0 August 2011 Page 22 of 22

Q2 Produce a simple logic network and the truth table for these statements.

1. If button A or button B are on and button C is off, then the alarm X is on.

2. A stadium has 3 entrances (A, B and C). A system is created which makes an alarm

X sound each time a door opens.

3. A nuclear plant gives out a warning signal (X = 1) when a process goes wrong. A

logic network is used to provide input and to decide whether X=1 or not. See the

table below.

A warning signal (X=1) will be generated if:

Either Temperature>=125C˚ (i.e. A=1) or

Temperature>=125C˚ (i.e. A=1) and Pressure< 160Pounds/Sq Inch and Chemical

Rate < 10 m3/s (i.e. B and C are both 0)

Input Binary Value Plant Status

A 1

0

Temperature>=125C˚

Temperature<125C˚

B 1

0

Pressure>= 160Pounds/Sq Inch

Pressure< 160Pounds/Sq Inch

C 1

0

Chemical Rate = 10 m3/s

Chemical Rate < 10 m3/s