The Functions of the Main Components of a Computer System

The  hardware components include the keyboard , monitor , cpu (processor) an the hard drive. In this lesson, we wish to observe the main functions for each component category.

The Logical Steps For Data Processing

Data processing has a logical organization divided into 4 main steps functions.

Computers input  data via input devices, processes the data to produce information which is in turn output to the user via output devices.   The results of processing or even the captured data can be stored on storage devices.

IPO

Input : to get data into the computer system

Processing: perform some operation on data as directed by software instructions.

Output: to make the results of processing (information) available to the computer user.

Storage:  to store data and information for future use.

IPO-in-context

© 2018 Vedesh Kungebeharry. All rights reserved

Computing Disciplines

Computing disciplines are sometimes fundamentally distinct or may differ subtly. The difference among disciplines originates based on the use of computer systems  as a tool  and for the purpose of further developing the tool.

 

Computer Technology

 

Computer Technology is the broad use of computers to solve problems.

 

Information Technology (IT)

 

Information technology is the study and use of computer technology for effective information storage, access, and manipulation; that is, information management.

 

Information and Communications Technology (ICT)

 

ICT  is an extension of IT, in includes effective information management across all major communication channels including telephone, wired and wireless computer networks.

 

Computer Science

 

Computer science is a branch of science which deals with the fundamental principles of computer design and use.

Computer science focuses on computer architecture and how to program computers to make them work effectively and efficiently[1].

[1] Computer Concepts (2011) p514

 

© 2018 Vedesh Kungebeharry. All rights reserved

Computational thinking

What is computational Thinking?

Definition: A problem is a required change from the current state of things to a desired  future state.

Definition: Computational  thinking  is use of ideas in a structured manner to solve a problem, such that it can be eventually used to instruct a computer.

Building applications or programs is essential to aiding computer users to perform tasks.

We use computational thinking to analyze problems in order to build applications that solve those problems.

There are four principles that are used to solve problems computationally.

They are:

  • Decomposition – Breaking down a large problem into sub problems so that solving the entire problem can be solved in a structured manner.
  • Pattern Recognition – observing patterns within the group of sub problems.
  • Abstraction – Focusing on the parts of the problem that are essential to solving the overall problem.
  • Algorithm generation – Creating a set of general, well defined steps which can be used to solve the problem.

© 2018  Vedesh Kungebeharry. All rights reserved

Bounded Iteration Example

Task

Create an algorithm in flowchart AND pseudocode to accomplish the following task:

“output the squares of all numbers from 2 to 75 inclusive”.

Flowchart Solution

Flowchart
Solution as expected by CXC CSEC and NEC

The solution was also generated in Flowgorithm and is shown below:

Flowchart - 2

Similar solution generated in Flowgorithm

Pseudocode

The solution in PSEUDOCODE is shown below:

Start
For i = 2 to 75
Output i , ” Squared is ” , i * i
EndFor
End

BONUS: Coded solutions!

Pascal

The pascal code for the above algorithm is shown below:

Pascal Code

Solution in bloodshed Dev Pascal

Copy-able code:
program Squares;
uses
crt;
var
i:integer;
begin
for i:=2 to 75 do
writeln (i, ‘ squared is ‘ , i*i);
writeln();
writeln(‘Press any key to continue…’);
readkey();
end.

C# Solution

The following is a solution in C#:

C# Code

Solution created using Visual Studio Community Edition

See here for instructions on setting up Visual Studio to start using C#

Copy-able code:
using System;
namespace Squares
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i <= 75; i++)
Console.WriteLine(i + ” squared is ” + (i * i));
//pause execution here
Console.WriteLine(“press any key to continue….”);
Console.ReadKey();
}
}
}
© 2018 Vedesh Kungebeharry. All rights reserved

VOIP

Voice Over Internet Protocol (VOIP)

Definition: A protocol set of rules for communication

Definition: VOIP is the protocol which governs voice communication by sending the audio over the internet.

VOIP can be implemented by phone handsets which is connected to a computer network. Some popular apps also allow for VOIP, e.g Skype, Whatsapp, Discord, Telegram etc.

voip

Figure 9 VOIP Implementation (Credit: http://cat5comms.com/landlines-and-voip/)

Some reasons why we use VOIP are:

  • VOIP is cheaper than traditional telephone
  • You can use VOIP if you do not have access to a phone
  • VOIP has a high audio quality.

© 2018 Vedesh Kungebeharry. All rights reserved

Basic Computational Thinking Exercise

Exercise: block problem

3 blocks ABC rest on a desk. What are the steps to stack B on C on A?

After completing the exercise, continue:

Computational thinking allows for us to arrive at well defined steps based on the tool that we are using.

If a robotic Arm Were used the steps would be:

  1. Lift B
  2. Place B on C
  3. Lift C
  4. Place C on A

If we were directing a human, we might arrive at:

  1. Place B on C
  2. Place C on A

You may arrive at an entirely different solution:

  1. Place C on A
  2. Place B on C

Computational thinking allows for us to find General solutions to problems also. For example, if our problem was

“ N blocks rest on a table. Create a stack using all blocks. “

Using a robotic arm , our solution would be:

  1. Start with an empty space for a stack area on the table
  2. Lift an unstacked block from the table and place it on the designated stack area.
  3. If any other unstacked blocks rest on the table that are not in the stack,
    1. Lift an unstacked block
    2. Place the block on the stack
  4. Repeat Step 3 until there are no more blocks.

Note that:

  • This solution can solve multiple problems i.e n could be 0,1,6 etc.
  • The task always gets done regardless of the order of how the blocks are stacked.

© 2018 Vedesh Kungebeharry. All rights reserved

Swap Two Integers

A student reproduced a programming question for me today:

Write a program which accepts 2 integers separated by a space. If the first integer is less than the second integer, output a message stating this fact e.g “The first number is smaller”, else swap the values of both variables which contain the integers respectively.

Before the program exits, print both integers respectively.

Analysis

A flowchart for the solution is shown below. Note that, input is obtained on separate lines, a limitation of the software used to create the chart, flowgorithm:

Swap - Main

Solution 1

Below is a suggested solution written in pascal code:

Swapping 2 variables

Copy-able pascal code here:


program swap;
uses crt;
var
num1,num2,temp:integer;

begin

writeln(‘Please enter 2 unequal integers separated by a space…’) ;
//read data separated by a space
readln (num1,num2);

if (num1>num2) then //we swap the numbers using a tempoary varible
begin
temp:=num1;
num1:=num2;
num2:=temp;
end //notice that there is no semicolon on this line.
else//print message
writeln(‘num1 is less than num2’);

writeln();
writeln(num1,’ ‘,num2) ;

writeln(‘Press any key to exit…’);
readkey;
end.


Solution 2

Below is a suggested solution written in c# code (generated by flowgorithm and edited to accept input of the two integers on one line):

Swap - C# Code

Copy-able c# code here:


using System;

public class Program
{
public static void Main()
{

int num1, num2, temp;
string anykey;

Console.WriteLine(“Please enter 2 unequal integers separated by a space…”);

//Read line, and split it by whitespace into an array of strings
string[] tokens = Console.ReadLine().Split();
//Parse element 0
num1 = int.Parse(tokens[0]);
//Parse element 1
num2 = int.Parse(tokens[1]);

if (num1 > num2)
{
temp = num1;
num1 = num2;
num2 = temp;
}
else
{
Console.WriteLine(“num1 is less than num2” + “\n”);
}
Console.WriteLine(num1 + ” ” + num2 + “\n”);
Console.WriteLine(“Press any key to exit.” + “\n”);
anykey = Console.ReadLine();
}
}
© 2018 Vedesh Kungebeharry. All rights reserved

Using Computational Thinking to solve a Math problem

In this class, we use computational thinking to solve a mathematical problem.

Class Activity – Finding the sum of a range of numbers

Complete the following task in your ICT notebook showing all working

Task: Without the aid of your classmates, find the sum of all whole numbers from 1 to 200 inclusive.

(15 minutes)

Discovery: at least 3 different methods were found. One interesting solution was the addition of al the ones (1+11+21..+91 = 460) then all twos (2+12+22+…+92 = 470) etc.

Teacher Demonstration and Discussion

Practical: Observe students suggestions, pattern recognition, past algorithms, decomposition into sub problems

Demonstrate:

1+2+3+4+…………+197+198+199+200

Observe the sum of pairs from out going in always sum to 200.

Determine the number of pairs.

Note that the steps to solve this problem are:

  • Find the sum of the first and last numbers (1+200)
  • Find the number of pairs (200/2)
  • Multiply the results of 1 and 2.

Further Exersises and Discussion – Finding the Sum of a Range Of numbers

Homework:

  • Using a similar approach as shown above, write the set of steps to find the sum of numbers from 1 to 10
  • Write the steps to find the sum of any range of numbers from which form a complete number of pairs. (e.g 5 to 10)
  • Write the steps to find the sum of any range of numbers from which form an incomplete number of pairs. (e.g 5 to 11)

© 2018 Vedesh Kungebeharry. All rights reserved

Ergonomics

Definition: Ergonomics is the science of designing objects for safe and efficient use by the people who use them.

It is usually applied to employees and the tools and furniture they use in the workplace.

Required Reading : How to sit at a computer – https://www.wikihow.com/Sit-at-a-Computer

 

Portfolio Assignment

Use the internet to find a suitable picture showing how one should properly sit at a computer.

 

Print the picture and attach it to a page with the following details as illustrated in the diagram below:

The proper way to sit at a computer

By ___[Student Name]______

Date: ____________________

 

 

 

 

 

[IMAGE GOES HERE]

 

 

 

 

 

Insert the page into your ICT portfolio.

 

 

 

© 2018  Vedesh Kungebeharry. All rights reserved