Professional Documents
Culture Documents
Input Devices
The devices that allow data and instructions to enter a computer (such as a keyboard, mouse,
scanner) are called input devices. These further include kinds such as: Pointing devices
Mouse
Tracker-ball
Touch-sensitive pad
Joystick
Light pen
Text-input devices
Keyboard
Imaging and video input devices
Webcam
Image scanner / 3d Scanner
Barcode reader
Voice Input Device (Microphone)
Sensors:-
Biometric Devices
They allow people to be identified based on unique characteristics. Examples include
fingerprint scans, iris scans, and voice recognition. Biometric devices utilize technology
Computer Science 2210/10th C Notes/By M Shoaib
to capture and process this type of information. Such devices may be found at airports,
government buildings, and law enforcement agencies
Output Devices
An output device is any piece of computer hardware equipment used to communicate the results
of data processing carried out by an information processing system (such as a computer) which
converts the electronically generated information into human-readable form.
Computer Monitor
LCD
LED
Plasma screen
Printers
Inkjet Printer
LaserJet Printer
Dot-matrix Printer
3d Printer
Audio Output Devices
Speakers
Headphones
Projectors
DLP
LCD
Plotter: Plotters are a specialist type of printer which is able to draw high quality images on
very large pieces of paper, for example 3 foot wide by 10 foot long.
LEDs (Indication lights)
Computer Science 2210/10th C Notes/By M Shoaib
Operating Systems
The operating system (OS) is a program that, after being initially loaded into the computer by a boot
program, manages all the other programs/applications. On a PC, the first program that runs is stored
on a ROM chip. This program checks the system hardware to make sure everything is functioning
normally. This checks the CPU, memory and basic input-output systems (bios) for errors. If all is
satisfactory, the BIOS will activate the disk drives. When the hard drive is activated, the OS is found
Computer Science 2210/10th C Notes/By M Shoaib
Computer Memory
There are two main types of Memory:-
It allows a user to store data that may be instantly and easily retrieved, transported and
used by applications and services.
Secondary memory is also known as secondary storage. For Example USB Flash Device,
Hard disk drive etc
The difference between primary and secondary storage, is that primary is considered as the main
memory, while secondary is an additional memory. Primary storage is the only memory that is
accessed directly by the CPU. It has the ability to store and retrieve information. It uses RAM and
ROM. On the other hand, secondary memory is not directly accessed by the CPU. Secondary
memory is a storage device like a hard disk. Offline storage includes floppy disks, magnetic tape,
punched cards, and USB flash drives. These are easily detachable from the computer system.
Data Storage Devices: A data storage device is a device for recording (storing) information
(data).
CD (Compact Disks)
DVD: Essentially, each is a recordable variation of the DVD format. They allow the
recording of audio, video, data, etc. on DVD discs. DVD-R is a one-time recordable
disc, similar to a CD-R. If used to record video, it should be playable on most DVD
players. DVD-RAM, DVD-RW and DVD+RW are competing, rewriteable DVD formats.
Floppy disk
Memory card/stick
RAM: Random-access memory (RAM) is a form of computer data storage. A random-access
device allows stored data to be accessed directly in any random order. It is a Primary Memory
and Volatile Memory device.
ROM: Read Only Memory (ROM) is a type of "built-in" memory that is capable of holding data
and having that data read from the chip, but not written to. Unlike Random Access Memory
(RAM), ROM is non-volatile which means it keeps its contents regardless if it has power or not.
Interrupts
In systems programming, an interrupt is a signal to the processor emitted by hardware or software
indicating an event that needs immediate attention. An interrupt alerts the processor to a high-priority
condition requiring the interruption of the current code the processor is executing, the current thread.
Hardware Interrupt: It is an electronic alerting signal sent to the processor from an external
device, either a part of the computer itself such as a disk controller or an external peripheral.
Software Interrupt:Software is also allowed to issue interrupts to the CPU. For example
software has detected that an error has occurred and will issue a software interrupt for the
CPU to run some instructions to try to clear the error.
accurate
kept for no longer than is absolutely necessary
handled according to peoples data protection rights
kept safe and secure
not transferred outside the country without adequate protection
Computer Security
How to keep data safe from physical damages?
A checksum or hash sum is a small-size data computed from an arbitrary block of digital data
for the purpose of detecting errors that may have been introduced during its transmission or
storage.
Check digits and parity bits are special cases of checksums.
Parity-bit
A parity bit, or check bit, is a bit added to the end of a string of binary code that indicates
whether the number of bits in the string with the value one is even or odd. Parity bits are used
as the simplest form of error detecting code.
There are two variants of parity bits: even parity bit and odd parity bit. In case of even parity,
the parity bit is set to 1 if the count of ones in a given set of bits (not including the parity bit) is
odd, making the count of ones in the entire set of bits (including the parity bit) even.
8 bits including parity
7 bits of data
(count of 1 bits)
even
odd
0000000
00000000
00000001
1010001
10100011
10100010
1101001
11010010
11010011
1111111
11111111
11111110
Check digit
A check digit is a form of redundancy check used for error detection on identification numbers
(e.g. bank account numbers) which have been input manually.
It is analogous to a binary parity bit used to check for errors in computer-generated data. It
consists of a single digit (sometimes more than one) computed by an algorithm from the other
digits (or letters) in the sequence input.
Proxy server
A 'proxy' is a word meaning substitute or stand-in.
A proxy server reduces the bandwidth required for internet access. It does this by keeping a
copy of often-used web pages in its local 'cache'.
Disadvantages
Waiting time (takes time for delivery).
You maybe a victim of online fraud.
Your purchase may be mishandled during shipping.
Computer Science 2210/10th C Notes/By M Shoaib
10
Browsing Web
Web Browser: A web browser is a software application that provides a way to view and interact with
pages on the World Wide Web.
Web Server / Remote Server: The term web server can refer to either the hardware (the computer)
or the software (the computer application) that helps to deliver web content that can be accessed
through the Internet.
Network Protocols: An agreed-upon format for transmitting data between two devices.
11
Hypertext Transfer Protocol: HTTP is the set of rules that are used for transmitting files, (text,
graphics, sound, video etc) over the World Wide Web.
Hypertext Markup Language: It is the language used to create documents on the World Wide Web.
IP Address: The IP address is the unique address given to a computer running on a TCP/IP network.
It allows one computer to commmunicate with another one by sending data packets containing the
destination IP address.
Network Packets: It is a formatted unit of data carried by a packet-switched network.
Packets Switching: When data e.g. web pages, emails, instant messages etc are sent across the
internet, they are not sent as one big file. Instead, the file is broken up into lots of parts called
'packets'. The packets are reassembled when they arrive at their destination.
12
File Formats
Video File Formats: Flash Video Format (.flv)
AVI Format (.avi)
MP4 Format (.mp4)
Mpg Format (.mpg)
Windows Media Video Format (.wmv)
3GP File Extension (.3gp)
VOB Format (.vob)
Audio File Formats: MP3 Audio Format (.mp3)
AAC Audio Format (.aac)
WAV Audio Format (.wav)
FLV: The Flash Video format is a video format defined by Adobe Systems. Flash Video is the
standard video format used by nearly all embedded video on the Internet including the videos found
on YouTube, Google Video, and many more websites.
Computer Science 2210/10th C Notes/By M Shoaib
13
AVI: It stores data that can be encoded in a number of different codecs and can contain both audio
and video data. The AVI format usually uses less compression than some similar formats and is a
very popular format amongst internet users.
MP4: This format is mostly used to store audio and visual streams online, most commonly those
defined by MPEG. The MPEG-4 video format uses separate compression for audio and video tracks;
video is compressed with MPEG-4 video encoding; audio is compressed using AAC compression, the
same type of audio compression used in .AAC files.
MPG: Common video format standardized by the Moving Picture Experts Group (MPEG); typically
incorporates MPEG-1 or MPEG-2 audio and video compression; often used for creating
downloadable movies. They are used in VCDs and can be played on DVD players via USB.
WMV: WMV format, short for Windows Media Video was developed by Microsoft. It was originally
designed for internet streaming applications, and can now cater to more specialized content.
3GP: The 3gp format is both an audio and video format that was designed as a multimedia format for
transmitting audio and video files between 3G cell phones and the internet. It is most commonly used
to capture video from your cell phone and place it online. It is commonly used to be played on small
screened mobile phone. It has a low size as well as low quality but works perfectly on Mobile Phones.
VOB: It is the container format in DVD-Video media. VOB can contain digital video, digital audio,
subtitles, DVD menus and navigation contents multiplexed together into a stream form. Files in VOB
format may be encrypted.
MP3: It is the standard format for compressing a sound sequence into a very small file, up to 12 times
smaller. The good thing about MP3 is that there is no or very little loss of sound quality from the
original file.
AAC: It is a standardized, lossy compression and encoding scheme for digital audio. Designed to be
the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit
rates.
WAV: WAV files are popular because they are considered a first generation format. That is, they are
generally kept as the first digital copy of a file completely uncompressed. This means that WAV files
are the best possible quality and have not gone through any digital alterations except to be outputted.
Image File Formats: JPG/JPEG
BMP
PNG
GIF
TIF
Computer Science 2210/10th C Notes/By M Shoaib
14
JPG: It is a lossy compression method; JPEG-compressed images are usually stored in the JFIF file
format.
BMP: The BMP file format is capable of storing 2D digital images of arbitrary width, height, and
resolution, both colorless and color, in various color depths, and optionally with data compression,
alpha channels, and color profiles.
PNG: This file format was created as the free, open-source successor to GIF. It is lossless and may
contain animation.
GIF: It is suitable for storing graphics with relatively few colors such as simple diagrams, shapes,
logos and cartoon style images. The GIF format supports animation and is still widely used to provide
image animation effects. It also uses a lossless compression.
TIFF: It is a lossless type of format that is used to contain very heavy images, of larger size. It is a
format that offers very huge size of images to be printed, such as flexes.
Lossy & Lossless Image Files
There are two types of compression. 'Lossy' and 'Lossless'. The lossless method compresses
the image without effectively losing any detail at all. The TIF file format is a lossless format and
is an excellent choice for long term storage of images.
A 'lossy' format actually discards some of the image detail in order to get even more
compression but it does so very cleverly so that a person hardly notices the loss of quality. A
very popular lossy method is the JPEG image format.
15
Its Features
Memory
The computer will have memory that can hold both data and also the program processing that
data. In modern computers this memory is RAM.
Control Unit
The control unit will manage the process of moving data and program into and out of memory
and also deal with carrying out (executing) program instructions - one at a time. This includes
the idea of a 'register' to hold intermediate values.
The 'one-at-a-time' phrase means that the von neumann architecture is a sequential
processing machine.
Input - Output
This architecture allows for the idea that a person needs to interact with the machine.
Whatever values that are passed to and forth are stored once again in some internal registers.
Arithmetic Logic Unit
This part of the architecture is solely involved with carrying out calculations upon the data. All
the usual Add, Multiply, Divide and Subtract calculations will be available but also data
comparisons such as 'Greater Than', 'Less Than', 'Equal To' will be available.
Bus
Notice the arrows between components? This implies that information should flow between
various parts of the computer. In a modern computer built to the Von Neumann architecture,
information passes back and forth along a 'bus'. There are buses to identify locations in
memory - an 'address bus'.
And there are buses to allow the flow of data and program instructions - a 'data bus'.
16
Register: A register is
within the CPU
temporary data and
many types of
Program
holds the
the next
Current
(CIR): A
control unit,
information
instruction that
be) performed.
Instruction Register
register, usually in the
that contains the
specifying the
is being (or is about to
Program Status Word (PSW): The PSW has a number of duties all rolled into one:
The Arithmetic Logic Unit compares two data items together, and it arranges for the
result of that comparison to appear in this register i.e. the result of 'greater than' etc.
The PSW also indicates if program conditions have been met that would lead to a jump
to a different part of the program. In programming terms this means the result of an IF
statement. An IF statement is important in any programming language as it allows
execution to jump from one set of instructions to another.
The PSW also holds error flags that indicate a number of problems that may have
happened as a result of an instruction, such as 'overflow' which means a calculation has
exceeded it allowed number range.
Memory Address Register (MAR): The memory address register, or MAR, holds the location
in memory (address) of the next piece of data or program to be fetched (or stored).
Memory Buffer Register (MBR): When data, instruction is fetched from memory, it is
temporarily held in MBR.
Problems of this Model
Problem 1: Every piece of data and instruction has to pass across the data bus in order to move from
main memory into the CPU (and back again). This is a problem because the data bus is a lot slower
than the rate at which the CPU can carry out instructions. This is called the 'Von Neumann
bottleneck'. If nothing were done, the CPU would spend most of its time waiting around for
instructions.
Problem 2: Both data and programs share the same memory space. This is a problem because it is
quite easy for a poorly written or faulty piece of code to write data into an area holding other
instructions, so trashing that program.
Computer Science 2210/10th C Notes/By M Shoaib
17
Problem 3: Another issue is that the rate at which data needs to be fetched and the rate at which
instructions need to be fetched are often very different. And yet they share the same bottlenecked
data bus.
Fetch-execute Cycle
Step 1: Fetch: The next instruction is fetched from Main Memory.
Step 2: Decode: The instruction gets interpreted/decoded, signals produced to control other internal
components (ALU for example).
Step 3: Execute: The instructions get executed (carried out)
Programming Languages
Machine Code: Another description of Machine code is 'object code'.
1010010110111010
1001110110000111
0001110010110001
These instructions are stored in memory locations called 'Registers' within the CPU. Different
CPUs have a different set of registers.
The raw instructions that the CPU carries out is called 'machine code' and each CPU family
has a different set of machine code.
Low Level Languages: Low level languages are near to the hardware but away from humans. Low
level languages have the advantage of providing very close control of the CPU but the code is still
quite difficult to read and follow by other programmers.
High Level Languages: High Level Languages are near to humans but away from hardware. They
are easy to understand for the programmers but they do not offer such a close control of the
hardware as the Low Level Languages do!
Converting High Level Language
High level languages are fairly close to normal written language. But this means that they are
nowhere close to machine language! So an application is needed to convert the fairly abstract high
level language into a precise set of machine codes that the CPU can actually run. This application is
called the translator.
18
A translator converts high level commands into a set of machine codes. One high level command can
translate into many individual machine instructions. There are mainly 3 kinds of translators:
Interpreter
Compiler
Flowcharts
Common flowchart symbols:Computer Science 2210/10th C Notes/By M Shoaib
19
Pseudo Code
20