Computer science

introduction

  • A computer is an electronic device that inputs, outputs or stores data or information

  1. Computer System

a) data representation

b) data transmission

c) hardware

d) software

e) internet and its users

f) automated and emergency technology

  1. Algorithms programming and logic

a) algorithms design broaden soling

b) programming

c) databases

d) Boolean logic

computer systems

HARDWARE

  • it is divided into four parts/ categories

HARDWARE:

  • input devices

  • processing devices

  • output devices

  • storage devices

input devices - there are computer equipment that provides data or information into the computer system

Input Devices

By definition these are computer components used to provide data or information to the computer system.

we have different examples which include

  • barcode reader

  • keyboard

  • digital camera

  • optical mouse

  • microphone

  • QR code scanner

  • Touch screen

  • 2 or 3D scanner Joystick

  • remote control

Digital camera

this is a device that captures photographs and images

These cameras are controlled by a system which automatically carry the following:

  1. Adjusting the shutter

  2. Focus image automatically

  3. Operate the flash automatically

  4. adjust the operator size

  5. Adjust the size of the image

  6. Remove red eye when the flash has been used

The number of pixels determine the size of the file used to store the image. The quality of the photograph depends on:

  • Recording device ( camera lens and senor arrows )

  • Number of pixels used

  • Level of light and how the image is stored eg JPES

REVISION

PRINTERS

Differences

IMPACT PRINTER (Dot Matrix Printer)

NON IMPACT PRINTER ( Laser Printer)

uses a ribbon to print

uses powdered ink to print

has noise when printing

less noise when printing

cheaper

expensive

can work in dirty and dusty environments

works in offices

it is more durable

less durable

slower when printing

faster when printing

has poor quality

has higher quality

can use continuous paper

cannot use continuous paper

SIMILARITIES

Dot Matrix Printer

Laser Printer

has buffer storage

has buffer storage

prints hardcopy

prints hardcopy

ALGORITHMS

An algorithm is a step by step instruction used to solve a problem

Relational operations

Operator

Meaning

Example

<

less than

A < B

<=

less than or equal to

A <= B

>

Greater than

A > B

>=

greater than or equal to

A >= B

= or ==

equal to

A = B

# or !=

not equal to

A # B or A != B

  • e.g

    ALGORTHM OF HOW TO FIND THE AREA OF A RECTANGLE.

START

  • Output - “ enter length “

  • input - L (10)

  • Output - “ enter width “

  • Input - W (5)

  • area = L (10)* (5) W

  • Output Result = Area (50)

STOP

Example 2 ( IF STATEMENT )

IF ( Age > = 18 ) THEN

print “ You are old you can Enter “

ELSE

print “ You are young you cannot Enter “

END IF

EXAMPLE 3

X = 2

REPEAT

Print x

x = x+2

UNTIL ( x >=7 )

it will start by printing what is in x

2 , 4 , 6

EXAMPLE 3 ( Mathematical Operations )

A = 10 and B = 4

WE HAVE (T) TRUE OR (F) FALSE AND OPERATIONS

  1. A > B = T

  2. B != A = T

  3. B == A = F

  4. A % B = 2

TOPOLOGIES

Bus Topology

Advantages

  1. Cost-Effective: Uses less cable, making it cheaper to set up.

  2. Easy to Add Devices: Adding new computers is simple and doesn’t disturb the network.

  3. Simple Design: Easy to understand and set up for small networks.

  4. Less Clutter: Only one main cable reduces cable mess.

  5. No Central Hub Needed: Devices connect directly to the same cable, allowing quick communication.

Disadvantages

  1. Limited Cable Length: As the length of the bus increases, the performance decreases due to signal degradation.

  2. Network Failure: If the main cable (bus) fails, the entire network goes down, as all devices rely on this single cable for communication.

  3. Difficult to Troubleshoot: Isolating faults can be challenging since all devices share the same bus, leading to potential confusion in identifying the failure point.

  4. Performance Issues: Increased traffic on the bus can lead to collisions and slower performance, especially as more devices are added.

  5. Security Risks: Since all devices share the same communication medium, it can be easier for unauthorized users to intercept data.

Star Topology

A network topology where all devices are connected to a central hub, allowing for centralized management and easy troubleshooting, but if the hub fails, the entire network goes down.

Advantages:

  • Centralized Management: Easy to manage and configure due to the central hub connecting all devices.

  • Enhanced Performance: Adding or removing devices does not disrupt the network.

  • Fault Isolation: If one cable fails, only the affected device is isolated.

  • Easy Troubleshooting: Central hub makes it easier to identify and fix problems.

Disadvantages:

  • Dependency on Central Device: If the central hub fails, the entire network goes down.

  • Higher Cost: Requires more cable and a central hub, making it more expensive to set up than other topologies.

  • Limited Scalability: Adding too many devices can overload the central hub.

Ring Topology

Advantages:

  • Simple Setup: Easy to set up and understand; each device connects to exactly two others.

  • Consistent Performance: Data packet travels in one direction, reducing the chances of data collision.

Disadvantages:

  • Network Failure Risk: If any device fails, it can disrupt the entire network as each device relies on the next.

  • Difficult Troubleshooting: Isolating faults can be challenging because all devices are interconnected.

  • Limited Scalability: Adding or removing devices can disrupt the network temporarily.

Mesh Topology

Advantages:

  • Robustness: Highly reliable; if one connection fails, data can be rerouted through other paths.

  • No Traffic Bottlenecks: Each device has multiple connections, reducing the chance of overload.

Disadvantages:

  • Complexity: More complex to set up and manage due to multiple connections.

  • Cost: Requires a lot of cabling and hardware, making it expensive to implement.

  • Difficult Maintenance: Troubleshooting can be complicated due to the number of connections.

Definitions of Network Topologies

Bus Topology: A network topology where all devices are connected to a single main cable, known as the bus. Data is transmitted to all devices on the bus, but only the intended recipient processes the data. This topology is cost-effective and easy to set up but can suffer from issues if the main cable fails.

Mesh Topology: A network topology in which every device is connected to multiple other devices, creating a web-like structure. This setup allows for data to be rerouted through different paths if one connection fails, enhancing reliability. However, it can be complex and expensive to implement due to the amount of cabling required.

Ring Topology: A network topology where each device is connected to exactly two other devices, forming a circular pathway for data transmission. Data travels in one direction around the ring. While it is simple to understand and set up, failure of any single device can disrupt the entire network.

Star Topology: network topology where all devices are connected to a central hub, allowing for centralized management and easy troubleshooting, but if the hub fails, the entire network goes down.

Types of Networks

Local Area Network

Is a network over a small geographical area. eg in a building

Advantages

  • Fast data transfer

  • Easy sharing of resources

  • Many people can use the network

Disasvantages