Computer Revision Sohaila

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 56

BINARY SYSTEMS AND HEXADECIMAL

Binary system – base 2


Denary system – base 10
Hexadecimal system -- base 16

Converting:
1-Converting from binary to denary:
126 64 32 16 8 4 2 1
0 0 1 1 0 0 1 1
32 + 16 + 2 + 1 = 51
2-converting from denary to binary:
 Convert 107 into binary:
 Move from left to right
 See which numbers you add to make 107
126 64 32 16 8 4 2 1
0 1 1 0 1 0 1 1
The number is = 01101011
3-Converting from binary to hexadecimal:
 Split the binary number into 4 groups
 Add them
 Convert the numbers you added to hexadecimal
1011 / 1110 / 0001
8421 8421 8421
11 14 1 = BE1
4-Converting from hexadecimal to binary:
 Convert the hexadecimal values into binary
 6 in binary is = 110
 C in denary is 12 then into binary = 1100
6 C = 1101100
5-Converting from hexadecimal to denary:
 16 x 6 = 96
 1 x 11 (b in hexadecimal) = 11
16 1
6 B
96 + 11 = 107
6-Converting from denary to hexadecimal:
 Divide by of 16
 Read the remainders 2004
16
From bottom to top=
7 D 4 16 125 remainder 4
Table: 16 7 remainder 13 = D in hexadecimal

0 remainder 7

0
Binary value Hexadecimal value Denary value
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
1001 9 9
1010 A 10
1011 B 11
1100 C 12
1101 D 13
1110 E 14
1111 F 15

Powers of 16
 1 to the power of 0
 16 to the power of 1
 256 to the power of 2
 4096 to the power of 3

Measurements of the size of computer memories:


 A binary digit is commonly referred to as a bit; 8 bits are usually referred to 1 byte.
Memory size in order:
1. Bit = 0 or 1 binary digit
2. Nibble = 4 bits
3. Byte = 8 bits
4. Kilobyte = 1024 bytes = 2 to the power of 10 bytes
5. Megabyte = 1024 KB = 2 to the power of 20 bytes
6. Gigabyte = 1024 MB = 2 to the power of 30 bytes
7. Terabyte = 1024 GB = 2 to the power of 40 bytes
8. Petabyte = 1024 TB = 2 to the power of 50 bytes

Example use of binary:


When computers are used to control devices registers are used as part of the control system.

If the register contains 1 0 1 0 1 0 1 0 this means ‘motor B is ON and motor C is ON and both motors are
turning to produce FORWARDS motion’. Effectively, the vacuum cleaner is moving forwards.

Use of hexadecimal system:


The is 5 uses for hexadecimal system:
1-Memory dump
 When the memory contents are output to a printer or monitor.
 It’s much easier to work with hexadecimal then a long series of 1s and 0s
 A program developer can look at each of the hexadecimal codes and determine where the error
lies.
 Example: there is an error in the page so you use memory dump to identify the error.

2-HyperText Mark-up Language (HTML)


 HYPERTEXT MARK-UP LANGUAGE (HTML) is used when writing and developing web pages.
 HTML isn’t a programming language but is simply a mark-up language.
 A mark-up language is used in the processing, definition and presentation of text (for example,
specifying the color of the text).
 HTML code is often used to represent colors of text on the computer screen. For example:
o # FF 00 00 represents primary color red
o # 00 FF 00 represents primary color green
o # 00 00 FF represents primary color blue
Example: selecting the color of the text that you want in your webpage.

3-Media Access Control (MAC)


A MEDIA ACCESS CONTROL (MAC) ADDRESS refers to a number which uniquely identifies a device on the
internet.
 The MAC address refers to the network interface card (NIC) which is part of the device.
 The MAC address is rarely changed
 A MAC address is usually made up of 48 bits which are shown as six groups of hexadecimal
digits:
NN – NN – NN – DD – DD – DD
 The first half (NN – NN – NN) is the identity number of the manufacturer of the device
 And the second half (DD – DD – DD) is the serial number of the device.
 Example: identify the manufacturer and serial number of an apple phone.
Types of MAC addresses
 There are 2 types of MAC addresses:
 the UNIVERSALLY ADMINISTERED MAC ADDRESS (UAA) and the LOCALLY ADMINISTERED MAC
ADDRESS (LAA)
 The UAA is by far the most common type of MAC address and this is the one set by the
manufacturer at the factory
 There are a few reasons why the MAC address needs to be changed using LAA:
 Certain software used on mainframe systems needs all the MAC addresses of devices to
fall into a strict format.
 To bypass a MAC address filter on a router or a firewall.
 To get past certain types of network restrictions.

4-Web addresses
 Each character used on a keyboard has what is known as an ASCII CODE (AMERICAN STANDARD
CODE FOR INFORMATION INTERCHANGE)
 These codes are represented using hexadecimal or decimal values.
 It takes longer to type in the URL using the hexadecimal codes, but it has the advantage that you
are unlikely to fall into the trap of copying and pasting a ‘fake’ website address.

Example:
 A good example of the use of ASCII codes is the representation of a web address (or URL,
which stands for uniform resource locator)
 www.hodder.co.uk which becomes (using hexadecimal values):
5-Assembly code and machine code
Computer memory can be referred to directly using machine code or assembly code.
 Using true machine code (which uses binary) is very cumbersome and it takes a long time to
key in the values.
 It is also very easy to mistype the digits in a sea of 1s and 0s.
 They are examples of low level languages and are used by software developers when
producing.

Explain why hexadecimal is used to represent binary numbers?


Because it is easier and faster for the user and the computer to understand and binary can be confusing.

COMMUNICATION AND INTERNET TECHNOLOGY


What is data transmission?
Transferring data from one point to another over a communication channel. It can be either over a short
or a long distance.

Directions of data transmission:


1-Simplex data transmission: only one direction.
Example: data sent from a computer to a printer.
2-Half duplex data transmission: both directions but not at the same time.
Example: a phone conversation where on person speaks at a time.
3-Full duplex data transmission: both directions at the same time.
Example: broadband connection on a phone line.

Methods of data transmission:


1-Serial data transmission: one bit at a time over a single wire or channel.
Example: USB (universal serial bus).
Advantages: cheap and sends data with no errors.
Disadvantages: very slow.

2-Parallel data transmission: several bits at the same time over several wires or channels.
Example: sending data to a printer from a computer using a ribbon connector.
Advantages: very fast.
Disadvantages: expensive and sends data with some errors.

USB (universal serial bus)


It’s an asynchronous serial data transmission method.
The USB cable consists of:
 Four wire shielded cable.
 Power wire.
 Earth wire.
 Two data transmission wires.
When a device is plugged into a computer using one of the USB parts:
 The computer automatically detects that a device is present.
 The device is automatically recognized and loaded up so that the computer and devise can
communicate.
 If a new device is detected the computer will look for the devises driver that matches it, if not
found the user is promoted to download it.

Benefits and draw backs if the USB:

Benefits Drawbacks
 Devises plugged into the computer  The maximum length is about 5
are automatically detected; device meters
driver is automatically uploaded.  The present transmission rate is
 The connectors can only fit in one limited to less than 500 megabits per
way second
 The older USB standards may not be
 Several different data transmission supported near the future
rates are supported -
 Newer USB standards are
compatible with older USB
standards

IC (integrated circuit) USB


Uses parallel data transmission Uses serial data transmission
Sends data internally Sends data externally

Error checking methods


1. PARITY CHECKING
2. AUTOMATIC REPEAT REQUEST
3. CHECKSUM

1-Parity checking:
 It is a method of error detection in data transmission from a device to another.
 Systems that use EVEN PARITY have an even number of 1- bits.
 Systems that use ODD PARITY have an odd number of 1-bits.
Example 1:

It’s using even parity so in this case it will be a 0 as we already have and even number of 1 bit.

How it works?
 Before data is transmitted the sender and receiver of the data agrees on which type of parity to
use.
 If a byte was sent from the sender to the receiver (even/odd parity) an error would be flagged if
the byte has an odd/even number of 1 bit.
 This error is detected by the receiver checking the parity agreed on and the number of 1 bit in
the byte sent.

Example 2:

 This example uses even parity


 However, the use doesn’t know which of the bits has been transmitted incorrectly.
 One way around this problem is sending a parity byte as well.
 Answer: bit = 0010111000
Byte= 00010010

2-Automatic repeat request (ARQ)


 Another method used to check whether data has been transmitted correctly.
 It uses acknowledgment and time out.
How it works?
 Sender sends data with an agreed error checking.
 Sender waits for the acknowledgment that an error has been received.
 If the acknowledgment is received sender sends the next packet.
 If timeout occurs sender resends the same packet again.

3-Checksum
 Another way to check if data has been changed or corrupted following data transmission.
How it works:
 Sender computes a checksum by adding all the data and sending that checksum with the data.
 Receiver computes the checksum on the data received.
 It the sender’s checksum and the receiver’s checksum are equal the data is assumed to be
correct.
Calculating the check digit:
 The modelu of the digit is calculated.
 It is added to the data.
 It is then recalculated when data is added.
 The digits are compared checking for errors.

Internet technologies
What is meant by internet?
A global computer network providing a variety of information and communication facilities.

ISP (internet service provider)


A company that provides a connection to access the internet
Example: Etisalat and du.
IP (internet protocol)
An address given to each device on a network. It is provided by the network.
 Each device on the internet has a unique number IP address
 It’s a 32-bit number and not a permanent address
 An IP address is given by the ISP for the particular internet session.
 An IP address can be used instead of typing a full URL
Difference between MAC and IP address:
MAC:
 It’s a unique address given to a device on a network. Its provided by the manufacturer.
 48-bit address.
 Physical address.
 Fixed, assigned by the manufacturer.
IP:
 An address given to each device on a network. It is provided by the network.
 32-bit address.
 Logical address.
 Can change depending on the network environment.

HTML (hypertext markup language) structure and presentation


Structure:
 Essential part of the HTML document
 Includes semantics Examples: <tags>, <div>
 Structural markup of the document
 Placements of paragraphs and images
Presentation:
 Style of the document
 Hoe the document looks Examples: text color, <font-color>
 Text color, font size and image sizes
 Saved in a separate document called cascading style sheet (CSS)

HTTP (hypertext transfer protocol)


The main protocol that governs the transmission of data using the internet.
 It’s a set of rules that much be obeyed when transferring a file across the internet.
 When some form of security is used, then this changes to https (you also often see the padlock
sign in the status bar)
 HTTPS (HTTP over secure) is slower than HTTP

Web browser
A program that allows a user to view webpades
 Translates HTML codes from websites and show the result
Most web browsers share the following features:
 Have a home page.
 Have the ability to store the users favorite websides.
 Keep a history of the websites visited .
 Give the ability to go backward and forward to the websides opened.

URL (uniform resource locator)


The websites address that is types into the adress bar.
The URL is divided ito three parts:

LOGIC GATES AND LOGIC CIRCUITS

Introduction:
 Logic gates take binary inputs and produce a binary output.
 Several logic gates combined together form a LOGIC CIRCUIT and these circuits are designed to
carry out a specific function.
 The checking of the output from a logic gate or circuit is done using a truth table.

Logic gates:
We have six different logic gates:

Truth tables:
 Truth tables are used to trace the output from a logic gate
 The NOT gate is the only logic gate with one input.
 When constructing truth tables, all possible combinations of 1s and 0s which can be input are
considered. We can use 2 to the power of n.
 For example, if the logic circuit has 3 inputs it will give us 8 binary combinations (2 to the power
of 3)

The function of the six logic gates:


1-NOT gate:
 Inverter
 It has one input and one output
 Boolean algebra = X = ā
 Boolean logic = X = NOT A

2-AND gate:
 Two inputs and one output
 Just like multiplying
 Boolean algebra = X = A . B
 Boolean logic = X = A AND B

3-OR gate:
 Two inputs and one output
 Just like addition
 Boolean algebra = X = A + B
 Boolean logic = X = A OR B

4-NAND gate:
 Inverse of the AND gate
 Two inputs and one output
 Multiply then inverse
 Boolean algebra = X =
 Boolean logic: X = A NAND B

5-NOR gate:
 Inverse of the OR gate
 Two inputs and one output
 Add then inverse
 Boolean algebra = X =
 Boolean logic = X = A NOR B

6-XOR gate
 It the inputs are the same the output
Will be 0
 Two inputs and one output
 Boolean algebra = X=
 Boolean logic = X = A XOR B

Logic circuits
 When logic gates are combined they carry out a particular function to form a logic circuit
 The output from the logic circuit is checked using a truth table
 First you will split the circuits into groups
 Draw a truth table in this circuit we have 3 inputs so 2 to the power of 3 would give us 8
combinations.
Example 1:
Input values Intermediate values Output
A B C P Q R X
0 0 0 0 1 1 1
0 0 1 0 0 0 1
0 1 0 0 0 0 0
0 1 1 0 0 0 1
1 0 0 0 1 1 1
1 0 1 0 0 0 1
1 1 0 1 0 1 1
1 1 1 1 0 1 0

P uses the AND gate so A . B


Q uses the NOR gate so B + C
R uses the OR gate so P + Q
X uses the XOR gate so C + R

Example 2:
 We produce a logic circuit and truth tables to show the conditions which cause the output
to be X =1
 The first thing to do is to write down the logic statement representing the scenario.
X = 1 if (A = 1 AND B = NOT 1) OR (B = 1 AND C = NOT 1)
 WE WITE THE STATEMENT IN BOOLEAN ALGEBRA FORM:
(A . B) + (B . C)
We draw the circuit:

Input values Intermediate values Output


G
A B C D E F G X
Next we draw a truth table
0 0 0 1 1 0 0 0
E
0 0 1 1 0 0 0 0
0 1 0 0 1 0 1 1
0 1 1 0 0 0 0 0
1 0 0 1 1 1 0 1
1 0 1 1 0 1 0 1
1 1 0 0 1 0 1 1
1 1 1 0 0 0 0 0
D uses the NOT gate so B
E uses the not gate so C
F uses the AND gate so A . D
G uses the AND gate so B . E
X uses the OR gate so F + G

Example 3:
 A wind turbine has a safety system which uses three inputs to a logic circuit.
 The following table shows which parameters are being monitored and form the three inputs to
the logic circuit.

 The output X will have a value of 1 if any of the following combination of the condition occur
Either turbine speed <=1000 rpm AND bearing temp >80°C
or turbine speed > 1000 rpm and wind velocity > 120 kph
or bearing temperature <= 80°C and wind velocity > 120 kph
 Its then written in Boolean algebra form:
(S . T) + (S . W) + (T . W)
 Then we draw a logic circuit:

F
Input values Intermediate
D values Output
S T W A B C D E F X
 We 0 0 0 1 B 1 0 0 0 0 0 draw a truth
table:
0 0 1 1 1 0 1 0 0 1
0 1 0 1 0 0 0C 1 1 1
0 1 1 1 0 0 0 1 1 1
1 0 0 0 1 0 0 0 0 0
1 0 1 0 1 1 1 0 1 1
1 1 0 0 0 0 0 0 0 0
1 1 1 0 0 1 0 0 1 1
Logic circuits in the real world
Two possible ways electronic companies can review logic circuits design:
1. Using off the shelf logic circuits and build up the logic circuit as a number of building blocks.
2. Another method involves simplifying the logic circuit as far as possible.

1-Using logic building blocks


One very common building block id the NAND gate:
 The AND gate:

 The OR gate:

 The NOT gate:

Example 4:
Show that this circuit can be turned into a NAND gate:
 Use the gates above to convert them into
NAND gates

D F H

c
E
G
 Then we draw a truth table:
Input values Intermediate values Output
A B C D E F G H X
0 0 0 1 1 0 0 1 1
0 0 1 1 0 0 1 1 0
0 1 0 1 1 0 0 1 1
0 1 1 1 0 0 1 1 0
1 0 0 1 1 0 0 1 1
1 0 1 1 0 0 1 1 0
1 1 0 0 1 1 0 0 1
1 1 1 0 0 1 1 0 1

2-Simplification of logic circuits:


D
C

Input values Intermediate values Output


A B C E D X
0 0 1 1 0 1
0 1 1 0 0 0
1 0 0 0 0 0
1 1 0 0 0 0

As you can see the truth table matches the NOR gate so it can be simplified into that gate.

Example 5:
We can also write a logic statement from a logic circuit:
It could be written as both logic and algebraic:
X = (A + B) . (B + C)
X = 1 if (A = 1 OR B = 1) AND (B = 1 OR C = NOT 1)

Example 6:
We can also show that by drawing a truth table we can identify the NAND gate can be simplified into
one gate only.

E
X
Input values Intermediate values Output
A B C D E X
0 0 1 1 0 1
0 1 1 0 1 0
1 0 0 1 1 0
1 1 0 0 1 0

As you can see the outputs of the NAND gate matches the outputs of the NOR gate.

Describe the purpose of a logic gate in a logic circuit:


 To carry out logical operation
 To control the flow of electricity through a logic circuit.

Explain the difference between AND gate and OR gate:


 The output is 1 if both inputs in the AND gate are 1
 The output is 0 if both inputs in the OR gate are 0
AND OR

OPERATING SYSTEM AND COMPUTER ARCHIECTURE

Operating system
What is an operating system?
The OPERATING SYSTEM (OS) is essentially software running in the background of a computer system.
What is the purpose of an operating system?
Operating system is used to facilitate communication between software and hardware.

Functions/tasks of an operating system:

Without an operating system a computer would be useless as it wouldn’t be able to load any sofwate
and we would not be able to interact with it
Examples of operating systems:
 Windows
 Andriod
 Linux
 UNIX
 DOS
Windows:
It’s an example of a single user multitasking operating system – this means only one user can use the
computer at a time but can have many applications open simultaneously.
Simple devices:
They have embedded microprocessor but don’t always have an operating system.
Examples: cookers, microwave, washing machine, toasters

Why don’t they have operating systems?


 Because they carry out only single tasks which don’t change.
 The input is usually a button pressed or a touchscreen option selected which activates a simple
hardware function which doesn’t need an operating system to control it.

What happens when a computer is powered up?


 When a computer is first powered up, the initiating programs are loaded into memory from the
ROM (read only memory) chip.
 These programs run a checking procedure to make sure the hardware, processor, internal
memory and bios (basic input–output system) are all functioning correctly.
 If no errors are detected, then the operating system is loaded into memory.

Interrupt and buffers


What is an interrupt?
An interrupt is a signal sent from a device or from a software to the processor. This will cause the
processor to stop what it is doing and service the interrupt.

Identify 3 devises that makes use of interrupts:


1. Keyboard
2. Printer
3. Mouse

What are the 3 types of interrupt?


1. Hardware interrupts (e.g. a printer has run out of paper, a disk driver is ready to receive data.)
2. User interrupts (e.g. the user has pressed CTRL + ALT + DEL simultaneously.)
3. Software interrupts (e.g. when an application is opened or closed on a system.)

What is the advantage of computer being able to process interrupts?


Interrupts allow computers to carry out many tasks or to have several windows open at the same time.

How do interrupts work?


 An interrupt handler saves the state of current (interrupted) task until the interrupt is fully
serviced.
 Once fully serviced, the status of the interrupt task is resorted and it continues from the point
prior to the interrupt being sent

What is a buffer?
It’s a temporary memory area.

How buffers and interrupts are used when a document is sent to a printer:
Computer architecture
 Very early computers could not store programs.
 There had to be a person feeding the computer data while the machine was actually running.
 In 1945 von Neumann developed the idea of a stored program computer.
 This was then called the von Neumann architecture concept.

Von Neumann

3 components registers
Busses

Input/output MAR
Address Memory unit
Processor + control MDR
unit Data
ALU Processor
Memory unit Control
PC
Control unit
CIR
IAS
ACC

The idea of how a processor and memory unit are linked together by connections known as busses:
Function of each of the three buses:
Buses essentially move data around the computer and also send out control signals to make sure
everything is properly synchronized.
Busses connect the components of the model to one another.

Address and Registers:


Addresses indicate where the data is stored and registers are needed so that data can be manipulated
within the computer.

Registers:
 Internal memory location within the CPU.
 They temporarily hold data and instructions during processing.
 Registers are used to move data and instructions into and around the different components of
the CPU.

Describe the stored program concept when applied to the von Neumann model:
 The program is stored on a secondary storage device.
 Data and instructions are stored in the same memory/ RAM.
 Data and instructions are moved to registers to be executed.
 Instructions are fetched one at a time.

•MAR memory address register


• MDR memory data register
• ALU arithmetic and logic unit
• PC program counter
• CIR current instruction register.
• IAS immediate access store
• ACC accumulator
• CPU Central Processing Unit

Control unit (CU)


 Internal part of the CPU.
 It controls the flow of data through the CPU.
 It controls the interactions between the different parts of the CPU.
 It tells the different components how to respond to the instructions given.

Arithmetic logic unit (ALU)


 Internal part of CPU that carries out calculations.
 The arithmetic part uses the usual operators: add, multiply, subtract and divide.
 The logic part carries out comparisons: equal to, greater than and less than.

Immediate access store (IAS)


 Also known as CPU memory.
 It holds data and instructions to process data.
 CPU holds the data and instructions here before processing as it will be too slow to bring them
directly from main memory.
 The data and instructions are first loaded into main memory and then brought to IAS to be
processed.

Accumulator (ACC)
 Register that is used for arithmetic and logic calculations.
 Values need to be placed in the accumulator for calculations to be carried out.

Processor:
 The PROCESSOR contains the ARITHMETIC AND LOGIC UNIT (ALU).
 The ALU allows arithmetic (e.g. add, subtract, etc.) and logic (e.g. AND, OR, NOT, etc.) operations
to be carried out

Memory address register (MAR)


 MAR (or memory address register) is employed to hold the address of location to or from that
data are to be transferred

Memory data register (MDR)


 Holds the data to be written in or read out of addressed location.

Current Instruction Register (CIR)


 This holds the current instruction to be executed, having been fetched from memory.

Program counter (PC)


 The function of the program counter register is to hold the address of the instruction that is
being executed and (later) to hold the address of the instruction that will be executed next.

Memory unit
 The computer memory unit is made up of a number of partitions. Each partition consists of an
ADDRESS and its CONTENTS.
 The address will uniquely identify every LOCATION in the memory and the contents will be the
binary.

Example:
Address = MAR
Contents = MDR
READ the contents of location 0000 0101
MAR – it will be the same:
0000 0101
MDR – you will go find the read number then write the
Number from the contents column:
0111 1001

WRITE the data 1111 1111 to the address 0100 0100


MAR – whenever they tell you location or address that
will be the number:
0100 0100
MDR – the other number will be written here:
1111 1111
If the MDR is incorrect in the table rewrite it with the
new value you got.

Input and output devices


 Input devices convert external data into a form the computer can understand and can then
process (e.g. keyboards, touchscreens and microphones).
 Output devices show the results of computer processing in a humanly understandable form (e.g.
printers, monitors and loudspeakers

The fetch–execute cycle


 To carry out a set of instructions, the processor first of all FETCHES some data and instructions
from memory and stores them in suitable registers.
 Both the address bus and the data bus are used in this process.
 Once this is done, each instruction needs to be decoded before finally being EXECUTED.

Fetch
 In the fetch–execute cycle, the next instruction is fetched from the memory address currently
stored in the Program Counter (PC) and is then stored in the Current Instruction Register (CIR).
 The PC is then incremented (increased by 1) so that the next instruction can be processed.
 This is then decoded so that each instruction can be interpreted in the next part of the cycle.

Execute
 The processor passes the decoded instruction as a set of control signals to the appropriate
components within the computer system.
 This allows each instruction to be carried out in its logical sequence.

Stages that take place during the fetch–execute cycle:


 Tasks Explanation

Human Computer Interface Provides a user friendly platform for the user to communicate with the computer.
(HCI)

Multi-tasking Carries out several tasks at the same time.

Multi-programming More than one programs are loaded in memory to execute.

Batch Processing Processing several jobs in a single batch/group.

Error Handling Detecting and resolving program or communication errors.

Loading software Loading applications from hard drive to RAM for the user to use. 

Managing & securing Managing user accounts and securing their login details like usernames and passwords.
accounts
File Management Save, sort, copy, edit, delete files 

Processor Management Decides which programs should be executed for how long

Memory Management Handles RAM and manages the movement of processes between the RAM and Hard disk.

Interrupt handling Receives interrupts from the devices and responds accordingly

Real-time Processing Processes continuous inputs to generate output in a short period of time

Input/output control Receives input and output requests from the CPU and delivers it to the Input & Output
devices.

Types of OS

 Make use of commands.


 User inputs memorized  
    commands.
 No graphics
 Single Tasking
 Example: MS-DOS
 Make use of Menus  Has Wimp.
What happens when an interrupt is generated?
As soon as interrupt is generated the processor will be forced to stop temporarily from what it was
doing to service the interrupt. In simple words, the processor is interrupted from what it was doing and
the tasks are prioritized. Once the interrupt is serviced, the processor goes back to the point where it
stopped and resumes what it was doing earlier.

Interrupt handler
What is an interrupt handler?
An interrupt handler in a computer system is a piece of code related to a specific interrupt condition. It
is also called ISR or interrupt service routine.

How does ISR work?


ISR can identify what triggered the interrupt and how fast or slow can it complete the task requested.
For example: pressing a key bored key or moving the mouse triggers the interrupt that is then sent ti the
interrupt handler that reads the key pressed or the position of the mouse and copies that information to
the memory

Input and output devices

1-Inputs:
An input device is responsible for putting data or actions from the real world into a format the
computing device can understand.
Some examples are scanner, barcode reader, digital camera, keyboard, mouse, microphone, touch
screen, sensors, interactive whiteboard.
2-Processing:
The central processing unit of the computer processes the data according to the instructions given to it
by programs. Programs are written to produce a certain reaction based on the inputs that are received.

3-Output:
An output device is responsible for relaying information from the computer back to the real world.
Some examples are: printers, speakers, monitor, projector.
Input devices
Barcode reader:
 Barcode readers are most commonly found at the checkout or POS(Point Of Sale)in
supermarkets.
 These are input devices that reads the barcode from an item to get the details of an item at the
time of purchase like price, quantity purchased etc.
 A barcode is a series of dark and light parallel lines of varying thickness

What does a barcode look like?


 The numbers 0 to 9 are each represented by a unique
series of lines.
 The actual left-hand and right-hand sides of the
barcode are separated using guard bars.
 Each digit is represented by bars of 1 to 4 blocks thick.
This means the white or the black bar’s width ranges from
1 to 4, where 1 being the smallest width and 4 being the largest.

How to read a barcode?


Let’s say that an item has a barcode 543052 with guard bars on the
 left-hand, middle and right-hand side.
Each digit is made up of two dark lines
and two light lines.
 The width representing each digit is the same, thus the speed
of scanning isn’t important.
 The digits on the left have an odd number of dark elements and
always begin with a light bar.
 the digits on the right have an even number of dark elements and
always begin with a dark bar.
This arrangement allows a barcode to be scanned in any direction.
What happens next when the barcode is scanned?
 The barcode is first read by a red laser or red LED (LIGHT EMITTING DIODE).
 Light is reflected back off the barcode; the dark areas reflect little or no light which allows the
bars to be read.
 The reflected light is read by sensors (photoelectric cells).
 As the laser or LED light is scanned across the barcode, a pattern is generated which is converted
into digital data – this allows the computer to understand the barcode.
 For example: the digit ‘3’ on the left generates the pattern L D D D D L D (where L = light and D =
dark); this has the binary equivalent of 0 1 1 1 1 0 1 (where L =0 and D = 1).

What happens next when the barcode is read?


 The barcode number is looked up in the stock database to find a match : (the barcode is unique
for every item, that’s why it is called the KEY FIELD in the stock item record.
 When the barcode number is found, the stock item record is looked up.
 The price and other stock item details are sent back to the checkout or (POS).
 The number of stock items in the record is reduced by one each time the barcode is read.
 This new value for number of stock items is written back to the stock item record.
 The number of stock items is compared to the re-order level; if it is less than or
 equal to this value, more stock items are automatically ordered.
 Once an order for more stock items is generated, a flag is added to the record to stop re-
ordering every time the stock item barcode is read.
 When new stock items arrive, the stock levels are updated in the database.

Advantages of using Barcode:

Other applications of Barcode:


Libraries:
 it can be utilized in libraries where barcodes are used in books and on the borrower’s library
card.
 Every time a book is taken out, the borrower is linked to the book automatically. This
 allows automatic checking of when the book is due to be returned
Offices:
 Recording transactions.
Hospitals:
 Allows easy access to large amount of data from patients identification to medical history
and treatment.
Pharmacies:
 Ensures correct medicine details with expiry dates.
Travel:
 Scan codes on luggage, safe and speedy check-ins.

Other input devices at supermarket

2D Scanner
These types of scanner are the most common form and are generally used to input hard-copy (paper)
documents. The image is converted into an electronic form which can be stored in a computer.
 Computers equipped with OPTICAL CHARACTER RECOGNITION (OCR) software allow the
scanned text from the document to be converted into a TEXT FILE FORMAT.
 This means the scanned image can now be edited and manipulated by importing it into a word
processor.
 If the original document was a photograph or image, then the scanned image forms an image
file such as JPEG.
How does a 2D operate?

Application of 2D Scanners
At the Airports:
2D scanners are used at airports to read passports
They make use of OCR technology to produce digital images of the passport pages and can be used in
many ways for e.g. passenger’s name, DOB, passport expiry can be copy pasted into a form field that
accepts text instead of typing manually.
The passenger’s photograph is scanned from the passport as an image at the passport control counter. A
picture of the passenger is also taken using the digital camera. The two images are then compared using
a face recognition/ detection software.
The key feature that are compared and recognized by the software to confirm if the passenger is the
same as in passport image are as follows:
 Distance between the eyes.
 Width of the nose.
 Shape of the cheek bone.
 Length of the Jaw line.
 Shape of the eyebrows.

3D Scanner
3Dscanner is an input device that collects data like shape, color, distance between edges, length, width
etc. from a real-world object and translates these into a virtual 3D object.
Technologies used in 3D scanning:
 Laser
 Magnetic Resonance.
 White Light.
3-D scanners are used for creating life-like images and animation in movies and video games.
Computer Aided Design (CAD) uses scanned images to create 3D working model.

Application of 3D Scanners
CT Scanners (Computed Tomographic):
 Used to scan 3D solid objects.
 Builds up an image of the solid object through a series of very thin ‘slices’. Together these 2D
‘slices’ make up a representation of the 3D solid object.
 Each slice is made using X-rays, radio frequencies or gamma radiations.
 Each ‘slice’ is then stored as a digital image in the computer memory. The whole of the solid
object is represented digitally in the computer memory

Advantaged and disadvantages of 3D and 2D scanners


Advantages

Disadvantages

QR code
Quick Response (QR) code is another type of barcode made up of a matrix of filled-in dark squares on a
light background.
QR code Barcode

Black or dark squares on white Black and white stripped


background vertical lines
2D code 1D code
Read vertically. Can be scanned Read horizontally. Barcode
from any angle reader needs to be lined up
with it.
Can hold up to 7000 digits Can hold up to 30 digits
Used for advertising, used by Used at checkouts, libraries,
mobile phones to get information. hospitals.
Stores more information Stores less information
Can be modified without losing cannot be modified. Less
much information. More error error tolerant
tolerant
Faster to scan. Slower to Scan.

How does a QR code work?


Can be scanned anywhere using smart phone and internet.
By using the built-in camera facility on modern phones and downloading the appropriate application (or
app), it is possible to read the QR code.
When the QR Code is scanned using an app:
 Built-in Camera captures the image.
 Three large squares defines the alignment in case of bent or curves in the QR code tags.
 Black squares reflect less light while light squares reflect more light.
 The app processes the image.
 Each small square called pixels is converted to its binary value.

Other Applications: QR Codes


 Packaging: with QR codes on packages, customers can learn more about the products and its
ingredients.
 Cashless payments: most retail stores and consumers make use of smart phones to make the
payment easily.
 Warehouses: used to get the details of products available at the warehouses when it comes to
online shopping and collection.

Advantages & Disadvantages of QR Code


Digital Camera
 Digital cameras are microprocessor-controlled input devices that capture images (and
sometimes video) digitally.
 Digital cameras use an image sensor chip to capture the image, rather than the film used by a
traditional camera.
 Modern digital cameras simply link to a computer system via a USB port or by using Bluetooth
(which enables wireless transfer of photographic files).
 Traditional cameras were expensive as these used films. Films were developed and the printed
into photographs before the photographers could see the result of their work. Also, it wasn’t
possible to delete unwanted photos to save the film from being wasted.

How does a Digital Camera work?


It is somewhat similar to the 2D scanner when it comes to capturing images or photographs.
A photograph is captured when:
 A digital camera takes light and focuses it via the lens onto a sensor made out of silicon.
 The sensor is made up of tiny light sensitive elements called pixels. There are millions of these
individual pixels in the sensor of a camera.
These cameras are controlled by a microprocessor which can automatically carry out the following tasks:
 adjust the shutter speed (length of time the sensor is exposed to light)
 focus the image automatically
 operate the flash automatically
 adjust the aperture size (size of the lens opening)
 adjust the size of the image
 remove ‘red eye’ when the flash has been used

The quality of the photograph also depends on many other factors, such as:
 the type of lens used
 the lighting

Applications, Advantages & Disadvantages of Digital Camera


Keyboard
• Keyboards are by far the most common input devices used for data and command entry by
simply pressing down keys on the keyboard.
• They are used as the input device on computers, tablets, mobile phones and many other
electronic item.
• The keyboard is connected to the computer either by using a USB connection or by wireless
connection.
• In the case of tablets and mobile phones, the keyboard is often VIRTUAL or a type of
TOUCHSCREEN technology.

Mode of Operation:
• Keyboard is a circuit and each key on the keyboard works as a on a the keys of the keyboard has
an ASCII value. switch.
• Each character
• When keys are pressed, the switches joins the circuit and allows small amount of current to pass
through it creating electronic signals.
• These signals are then converted into a digital signal, which the computer interprets.

Advantages and disadvantages of keyboards

Advantages Disadvantages

Ergonomic keyboards can help to overcome the RSI Frequent use of these devices can lead to injuries,
problem. such as REPETITIVE STRAIN INJURY (RSI) in the
hands and wrists.
Potentially a fast way to enter data. A slow way to enter lots of data if not a trained typist.
Simple and easy to use. Mistakes/ errors can be made if not careful.
Ergonomic keyboards help solve these problems

Types of Keyboard: Concept Keyboard


Concept Keyboard & its mode of operation:
• A concept keyboard is an input device similar to a traditional keyboard but each key/button is
identified by an image.
• The images are chosen to symbolize the command/option each key represents.  
• Traditional ‘overlay’ concept keyboards are now being replaced with virtual concept keyboards
using touch screens.

Advantages & Disadvantages of concept keyboards


Advantages Disadvantages

Reduces the training required as they are easy to use Not suitable for large amount of options/choices
Ideal when options/choices are few Not suitable for all tasks
May speed up data entry

Applications of Concept Keyboard


Cashier tills: E.g. In a fast food restaurant, the concept keyboard belonging to the cashier’s till may use
images to represent each type of meal available to purchase, or each size of drink that can be chosen.

Braille Keyboard
Braille is a writing system for blind and visually impaired people. It is made up of raised dots that can be
'read' by touch.

Visually Impaired Keyboard


Large print keyboards are designed to help the visually impaired with their computing needs. Keys with
bright colors and bold characters on these makes the whole keyboard visible enough for the people with
vision disorders.

Pointing Devices : Mouse & Tracker ball


The selection of an application often requires the user to ‘click’ on an icon. Selection of the icon is
usually done with a POINTING DEVICE (such as a MOUSE or a TRACKERBALL) or by using a touch screen.

Mouse & its operation:


A mouse is an input device that allows you to control the coordinates and movement of the onscreen
cursor/pointer by simply moving the mouse across a flat surface with your hand. Items can be selected
or moved using the left mouse button, whilst the right button usually displays additional menus. The
scroll wheel on the top allows rapid movement up and down the screen.
Types of Mice Pictures

the more traditional type with a mechanical ball


arrangement; connected to the computer through a USB
port

the more modern type that use red LEDs to detect


movement in the x-y direction;
these are a type of optical mouse

mice that use either of the above types of technology


but use a wireless connection
to the computer

Advantages and disadvantages of mouse


Advantages Disadvantages

Simple and easy to use require an area of desk space to allow


movement.
Efficient way to navigate often require a mouse mat since some surfaces, such as
paper, prevent the correct operation of the device.

Tracker Ball & its operation:


A trackball is an input device used to control a pointer/cursor. Unlike a mouse, the device stays
stationary whilst the user moves the ball within its socket.
Tracker balls are seen more often in an industrial environment – such as a control room

Tracker Ball: Application


Trackballs can be stand-alone devices or combined into a keyboard or control panel. Some people prefer
using a trackball over a mouse as they believe it gives them a finer degree of control over the pointer.
They are also handy for people with limited hand motor skills as they are less demanding then a mouse.

Advantages and disadvantages of tracker ball


Advantages Disadvantages
doesn’t need any desk space May take some time getting used to.
or special surface.
The operator is also less likely to suffer from injuries
such as RSI
Can be integrated into a keyboard

Touch Pad: Operation


• Most laptop computers have a built-in TOUCH PAD.
• This contains a tactile sensor which allows the user to control a cursor by simply moving a finger
over the surface of the pad.
• Buttons to the left and right of the pad act in the same way as buttons on a mouse.

Advantages and disadvantages of touchpads


Advantages Disadvantages

simply tapping the surface this acts as a quick Sensitive to touch. May not be able to identify
method of selection on many touch pads. touch and perform accordingly.

Microphone & its applications


Microphones are input devices that take analogue sound waves and converts them into electrical
signals, suitable for a computer to understand. Microphones play an important role in speech
recognition, a technology that is gaining in popularity and usage.
Applications of Microphones

doing a ‘voice over’ in a presentation E.g. Tablets and laptops, e.g. for video conferencing
or VoIP
part of a speech recognition system E.g. Mobile phones, e.g. for traditional phone calls
or VoIP
part of a voice recognition system E.g. Voice recognition systems, e.g. to input data
and commands using spoken words
enabling a disabled person to communicate with E.g. Handicapped people with limited or no
a computer. movement.

Voice Recognition Technology


What happens when a person speaks into a microphone?
When a microphone picks up sound, a diaphragm vibrates producing an electric signal.
This signal goes to a sound card and is converted into digital values and stored in the computer.
If the microphone is being used in a VOICE RECOGNITION system,
 The user’s voice is detected and then converted into digital.
 A few words spoken produce a digital wave pattern.
 Software compares this wave pattern to wave patterns stored in memory to see if they match.
 If they match, then the person has been correctly identified.
 Only certain words can be used since the system is designed to recognize
only a few key phrases (e.g. a user may be asked to say their name).
 This technology can be used in security systems

Speech Recognition Technology


SPEECH RECOGNITION is a different and more complex technology. This again uses a microphone to
input words spoken by a user. But this time the software doesn’t try to recognize the person talking. The
spoken words are recognized and shown on a screen, input into a word processor or used in other
application.
How does the speech recognition software works?
 Suppose a person says the word ‘HUT’; the sound card in the computer will convert the sound
wave into a digital form.
 The software takes the digital image and breaks it up into phonemes (these are the smallest
elements or sounds that make up a language); in this case ‘HUH T’.
 These phonemes are compared with words found in the built-in dictionary.
 The word ‘HUT’ would then be suggested by the software in whatever application is being run.

Factors affecting speech recognition:


 Different accents.
 Different dialects.
Example: Two phrases, if spoken quickly will sound the same to the computer
“ Recognize Speech” / “ Wreak a nice beach”.
In order to overcome this issue, computers need training to differentiate between different accents and
dialects of human beings, which is still a challenge today for software developers working for speech
recognition.

Applications of Voice and Speech recognition


Voice Recognition Speech Recognition

Used in cars to allow the driver to say commands like Task digital assistants in offices to search
make warmer’, ‘switch on GPS’ or ‘open window’ by reports, create graphs using data, voice
using keywords as voice patterns will be compared recording meeting minutes, start video
with the dictionary of words already stored. conferencing, print documents on request.
Used for solving crimes in investigation In banks to make payments, request
information regarding your balance,
transactions, receive information about your
transaction history.
Buying products and services online with your voice In marketing for recognizing customers with
while searching web. different dialects and accents by their names,
age etc.

Checking flight status for arrival and departures. In Health care while finding patients records,
reminding medical staff to follow instructions,
less paperwork and time to input data.

What is a touch screen?


A touch screen is an electronic visual display that also incorporates an input device that responds to
touch.  This allows users to select options from a screen by simply touching them.
Typical applications for touch screens
 Smart phones and tablet computers, e.g. easy input of data and selection of apps/icons
 Ticket / Information kiosks, e.g. allows limited options that can be selected easily

Types of Technologies:
There are three main types of touch screen technology:
 Capacitive
 Infra-Red
 Resistive

Capacitive Touch Screen


Mode of operation, Benefits & Drawbacks
Infra- Red Touch Screen
Mode of operation, Benefits & Drawbacks

Resistive Touch Screen


Mode of operation, Benefits & Drawbacks
Sensors
Sensors send data from the real world to a computer. They often require an analogue to digital
converter (ADC) to change the data into a format that the computer (or microprocessor) can
understand.
However, computers cannot make any sense of these physical quantities and the data needs to be
converted into a digital format. This is usually achieved by an ANALOGUE TO DIGITAL CONVERTER
(ADC). This device converts physical values into discrete digital values

When the computer is used to control devices, such as a motor or a valve, it is necessary to use a
DIGITAL TO ANALOGUE CONVERTER (DAC) since these devices need analogue data to operate in many
cases.
An ACTUATOR is used in these control applications (An actuator is an electromechanical device such as a
relay, solenoid or motor.)
Note that a solenoid is an example of a digital actuator; part of the device is connected to a computer
which opens and closes a circuit as required.
Other actuators, such as motors and valves, may require a DAC so that they receive an electric current
rather than a simple digital signal direct from the computer.
Examples of sensors
Sensors are used in both monitoring and control applications. There is a subtle difference between how
these two methods work:

Examples of monitoring include:


• monitoring a patient in a hospital for vital signs such as heart rate, temperature, etc.
• monitoring of intruders in a burglar alarm system
• checking the temperature levels in a car engine
• monitoring pollution levels in a river.

Examples of control include:


• turning street lights on at night and turning them off again during daylight
• regulating the temperature in a central heating/air conditioning system
• changing the traffic lights at a road junction
• operating anti-lock brakes on a car when necessary
• regulating the environment in a greenhouse.

Monitoring applications
Burglar alarm system

A burglar alarm monitoring system will carry out the following actions:
• The system is activated by keying in a password on a keypad.
• The infra-red sensor picks up the movement of an intruder in the building.
• The acoustic sensor picks up sounds such as footsteps or breaking glass.
• The pressure sensor picks up the weight of an intruder coming through a door or through a window.
• The sensor data is passed through an ADC if it is in an analogue form to produce digital data.
• The computer/microprocessor will sample the digital data coming from these sensors at a given
frequency (e.g. every five seconds); the data is compared with the stored values by the
computer/microprocessor.
• If any of the incoming data values are outside the acceptable range, then the computer sends a signal
to:
• a siren to sound the alarm, or
• a light to start flashing.
• A DAC is used if the devices need analogue values to operate them.
• The alarm continues to sound/lights continue to flash until the system is reset with a password.

Patient in a hospital
• A number of sensors are attached to the patient; these measure vital signs such as: temperature, heart
rate, breathing rate, etc.
• These sensors are all attached to a computer system.
• The sensors constantly send data back to the computer system.
• The computer samples the data at frequent intervals.
• The range of acceptable values for each parameter is keyed in to the computer.
• The computer compares the values from the sensors with those values keyed in. 102
• If anything is out of the acceptable range, a signal is sent by the computer to sound an alarm.
• If data from the sensors is within range, the values are shown in either graphical form on a screen
and/or a digital read out.
• Monitoring continues until the sensors are disconnected from the patient.

Control applications
Street lighting

This next sequence shows how a microprocessor is used to control the operation of a street lamp. The
lamp is fitted with a light sensor which constantly sends data to the microprocessor. The data value from
the sensor changes according to whether it is sunny, cloudy, raining or it is night time etc.
• The light sensor sends data to the ADC interface.
• This digitises the data and sends it to the microprocessor.
• The microprocessor samples the data every minute (or at some other frequency 103 rate).
• If the data from the sensor < value stored in memory:
• a signal is sent from the microprocessor to the street lamp
• and the lamp is switched on.
• The lamp stays switched on for 30 minutes before the sensor readings are sampled again (this
prevents the lamp flickering off and on during brief heavy cloud cover, for example).
• If the data from the sensor >= value stored in memory:
• a signal is sent from the microprocessor to the street lamp
• and the lamp is switched off.
• The lamp stays switched off for 30 minutes before sensor readings are sampled again (this prevents
the lamp flickering off and on during heavy cloud cover, for example).

Antilock braking system (cars)


ANTI-LOCK BRAKING SYSTEMS (ABS) on cars use magnetic field sensors to stop the wheels locking up on
the car if the brakes have been applied too sharply.
• When one of the car wheels rotates too slowly (i.e. it is locking up), a magnetic field sensor sends data
to a microprocessor.
• The microprocessor checks the rotation speed of the other three wheels.
• If they are different (i.e. rotating faster), the microprocessor sends a signal to the braking system:
• and the braking pressure to the affected wheel is reduced
• the wheel’s rotational speed is then increased to match the other wheels.
• Checking the rotational speed using these magnetic field sensors is done several times a second and
the braking pressure to all the wheels can be constantly changing to prevent any of the wheels locking
up under heavy braking; this is felt as a ‘judder’ on the brake pedal as the braking system is constantly
switched off and on to equalise the rotational speed of all four wheels.
• If one of the wheels is rotating too quickly, braking pressure is increased to that wheel until it matches
the other three.

Interactive white bored


Interactive whiteboards are devices that allow computer images to be displayed on a whiteboard using
a digital projector. They also allow a user to write on the whiteboard and the text or drawings produced
are then stored in an electronic form for later use.
It is also possible to run software on the whiteboard and users can interact by simply using their fingers
on the whiteboard surface.

Output devices
Inkjet printers
INKJET PRINTERS are essentially made up of:
• a print head which consists of nozzles which spray droplets of ink on to the paper to form characters
• an ink cartridge or cartridges; either a group of cartridges for each colour (blue, yellow and magenta)
and a black cartridge or one single cartridge containing all three colours + black (Note: some systems use
six colours.)
• a stepper motor and belt which moves the print head assembly across the page from side to side
• a paper feed which automatically feeds the printer with pages as they are required.

The ink droplets are produced currently using two different technologies.
Thermal bubble:
 Tiny resistors create localized heat which makes the ink vaporise.
 This causes the ink to form a tiny bubble; as the bubble expands, some of the ink is ejected from
the print head onto the paper.
 When the bubble collapses, a small vacuum is created which allows fresh ink to be drawn into
the print head. This continues until the printing cycle is completed.
Piezoelectric:
 A crystal is located at the back of the ink reservoir for each nozzle.
 The crystal is given a tiny electric charge which makes it vibrate.
 This vibration forces ink to be ejected onto the paper; at the same time more ink is drawn in for
further printing.

How the inkjet printer work

Applications of inkjet printers


They are best for one-off photos or where only a few pages of good quality, colour printing are needed;
the small ink cartridges or small paper trays would not be an issue with such applications.

Laser printers
 LASER PRINTERS differ greatly from inkjet printers in the way they print pages. They use dry
powder ink rather than liquid ink and make use of the properties of static electricity to produce
the text and images.
 Unlike inkjet printers, laser printers print the whole page in one go (inkjet printers print the
page line by line).
 Their advantage is the speed at which they can carry out large print jobs and the fact that they
don’t run out of ink halfway through.

How does a laser printer work

Applications of laser printers


They produce high quality printouts and are very fast when making multiple copies of a document; any
application that needs high-volume printing (in color or monochrome) would choose the laser printer
they have two advantages: they have large toner cartridges and large paper trays

3D printers
3D printers are primarily used in COMPUTER-AIDED DESIGN (CAD) applications.
Types of manufacturing
 One type of manufacturing use addictive manufacturing. The 3D object being printed is built up
layer by layer using powdered resin, powdered metal, ceramic powder of paper.
 Another type of manufacturing use subtractive manufacturing. The 3D object being printed is
carved from a block t stone until the object in formed.
3D printer’s technology
 Direct 3D printing uses inkjet technology; a print head can move left to right as in a normal
printer. However, the print head can also move up and down to build up the layers of an object.
 Binder 3D printing is similar to direct 3D printing. However, this method uses two passes for
each of the layers; the first pass sprays dry powder and then on the second pass a binder (a type
of glue) is sprayed to form a solid layer.
 Newer technologies are using lasers and UV light to harden liquid polymers; this further
increases the diversity of products which can be made.
How a solid object is formed

Uses of 3D printers
 prosthetic limbs made to exactly fit the recipient
 items to allow precision reconstructive surgery scanning of the skull
 in aerospace, manufacturers are looking at making wings and other parts using 3D technology;
the bonus will be lightweight precision parts
 in fashion and art

2D and 3D cutters
A three-dimensional (3D) laser cutter works in a similar way to a two-dimensional (2D) cutter. The main
difference is that the 3D cutter can recognize an object in the xy-z direction rather than just x-y.
3D laser cutters can cut the following materials:
 glass
 crystal
 metal
 polymer
 wood.
Very complex designs can be cut since the cutters are controlled by computers and very sophisticated
software.

Actuators
ACTUATORS are used in many control applications involving sensors and devices such as ADC and DAC.

Loudspeakers and headphones


Sound is produced from a computer by passing the digital data through a DIGITAL TO ANALOGUE
CONVERTER (DAC) and then through an AMPLIFIER; finally, the sound emerges from a (loud)SPEAKER.

The rate at which the DAC can translate the digital output into analogue voltages is known as the
SAMPLING RATE. If the DAC is a 16-bit device, then it can accept numbers between +32 767 (216 – 1)
and –32 768 (216); the digital value containing all zeros is ignored. The speed at which these values can
be converted is the sampling rate.
Example
 Suppose a CD is being produced to contain a number of music tracks.
 Each piece of music is sampled 44 100 times a second. Each sample is 16 bits.
 Since the music is in stereo this also needs to be taken into consideration.
 The above information means that 44 100 × 2 × 16 = 1 411 200 bits per second sampling (the
number ‘2’ is used in the calculation to account for the sound being in stereo).
 Since 1 byte = 8 bits, this equates to 1 411 200/8 bytes per second.
 This works out at 176 400 bytes per second.

LCD and LED monitors


LCD
 Most monitors and television sets these days are made using LIQUID CRYSTAL DISPLAY/DIODE
(LCD) technology.
 This means that the front layer of the monitor is made up liquid crystal diodes; these tiny
diodes are grouped together in threes or fours which are known as pixels (picture elements).
 The three colors which are grouped together use red, green and blue diodes. Those systems that
use groups of four include a yellow diode – this is said to make the colours more vivid.
LED
 Modern LCD monitors are back lit using LIGHT EMITTING DIODE (LED) technology. This gives the
image better contrast and brightness.
 Before the use of LEDs, LCD monitors used a cold cathode fluorescent lamp (CCFL) as the
backlighting method.
 CCFL uses two fluorescent tubes behind the LCD screen which supplies the light source.
 When LEDs are used, a matrix of tiny LEDs is used behind the LCD screen.

LEDs have become increasingly more popular because of a number of advantages over older CCFL
technology:
 LEDs reach their maximum brightness almost immediately
 LEDs give a whiter light which sharpens the image and make the colours appear more vivid; CCFL
had a slightly yellowish tint
 LEDs produce a brighter light which improves the colour definition
 monitors using LED technology are much thinner than monitors using CCFL technology
 LEDs last almost indefinitely; this makes the technology more reliable and means a more
consistent product
 LEDs consume very little power which means they produce less heat as well as using less energy.

OLED
 Future LED technology is making use of ORGANIC LIGHT EMITTING DIODES (OLEDS).
 These use organic materials (made up of carbon compounds) to create semi-conductors which
are very flexible.
 Organic films are sandwiched between two charged electrodes (one is a metallic CATHODE and
the other a glass ANODE).
 When an electric field is applied to the electrodes, they give off light. This means that no form of
backlighting is required. This allows for very thin screens.

Advantages of using OLED compared with existing LEDs and LCDs include:
 the plastic, organic layers of an OLED are thinner, lighter and more flexible than the crystal
structures used in LEDs or LCDs
 the light-emitting layers of an OLED are lighter; OLED layers can be made from plastic rather
than the glass used in LED and LCD screens
 OLEDs give a brighter light than LEDs
 OLEDs do not require backlighting like LCD screens – OLEDs generate their own light
 since OLEDs require no backlighting, they use much less power than LCD screens
 since OLEDs are essentially plastics, they can be made into large, thin sheets
 OLEDs have a very large field of view, about 170 degrees, which makes them ideal for use in
television sets and for advertising screens.

Light projectors
Projectors are used to project computer output onto larger screens or even onto interactive
whiteboards.
There are two common types of light projector:
• digital light projectors (DLP)
• LCD projectors.

Digital Light Projectors (DLP)


• DLPs use millions of micro mirrors on a chip. The number of micro mirrors and the way they are
arranged determines the resolution of the image projected.
• When the micro mirrors are tilted towards the light source, they are `on'. When they are tilted
away from the light source, they are 'off'.
• The micro mirrors can switch on or off thousands of times a second to create various shades of
grey. The typical number of grey shades which can be produced is 1024.
• A bright white light source (from a xenon light, for example) passes through a colour filter on its
way to the DLP chip.
• The light is split into the three primary colours (red, green and blue).
• The on and off states of the mirrors are linked with the three colours to produce the coloured
image.

LCD projectors
• A powerful beam of white light is generated from a bulb or LED inside the projector body.
• This beam of light is then sent to a group of chromatic-coated mirrors; these reflect the light
back at different wavelengths.
• When the white light hits these mirrors, the reflected light has wavelengths corresponding to
red, green and blue light components.
• These three different coloured light components pass through three LCD screens; these screens
show the image to be projected as millions of pixels in a grey scale.
• When the coloured light passes through the LCD screens, a red, green and blue version of the
grey image emerges.
• These images are then combined using a special prism to produce a full colour image – this final
image consists of millions of colours (each shade of grey in the original image produces a
different shade in each of the colour images).
• Finally the image passes through the projector lens onto a screen.

MEMORY AND DATA STORAGE


A number of different file formats are used in computer systems. We will look at the following ones:
• Musical Instrument Digital Interface (MIDI)
• MP3
• MP4
• jpeg
• text and number format

Musical instrument digital interface (MIDI)


 Musical Instrument Digital Interface is a widely used standard for interconnecting electronic
musical instruments and computers.
 It is associated with the storage of music files. However, MIDI files don't contain sounds. This
makes them much smaller than other music file types.
 MIDI uses 8-bit, asynchronous serial transmission, which means that there is a start bit and a
stop bit.
 A MIDI file has the extension .mid. This file can be played through a musical instrument.
 What makes MIDI special is, since it's a series of commands, it can be played through various
musical instruments.
 Music sequencer software is required to play the file through an instrument, as the file wouldn't
be recognized on its own.
Status byte:
 This tells the MIDI device to perform a function.
 The MIDI channel is also encoded in the status byte.
 MIDI has 16 channels to operate from. They are numbered 0-15
 (sometimes 1-16).
Examples of MIDI commands:
 note on/off
 key pressure
Pitch byte:
 This byte tells the MIDI device which note to play.
Velocity byte:
 This byte tells the MIDI device how loud the note should be played.

MP3
 Moving Pictures Experts Group-3 (MPEG-3 or MP3) uses audio compression technology to
convert sound into an MP3 format. This reduces the size of a normal sound file by around 90%
(so a factor of 10).
 For example, an 80-megabyte sound file could be reduced to an 8-megabyte MP3 file. k
 This is done by removing sounds which humans can't hear. This process is called perceptual
music shaping.
 MP3 files use what is known as a LOSSY FORMAT since part of the original file is lost following
the compression algorithm. This means that the original file can’t be put back together again.
 However, even the quality of MP3 files can be different since it depends on the BIT RATE – this is
the number of bits per second used when creating the file. Bit rates are roughly between 80 and
320 kilobits per second; usually 200 or higher gives a sound quality close to a normal CD

Example question
Q.1 Music is to be stored on a CD. Each minute of music is worth 12 megabytes.
Calculate how much space the CD would need in order to store 3 tracks which are 3, 6 and 7 minutes
long.
3 + 6 + 7 = 16 minutes
16 x 12 = 192 megabytes
Q.2 The files are compressed using an MP3 compression algorithm. Calculate how much space the CD
would now need (you may assume the file size is reduced by 90%).
192 / 10 = 19.2 megabytes
Q.3 The CD has 800 megabytes of space. Calculate how many minutes can be stored on the CD.
Remember: 1 min = 12 megabytes
800 / 12 = 66.67 minutes = 66 minutes and 40 seconds

MP4
 This format allows the storage of multimedia files rather than just sound. Music, videos, photos
and animation can all be stored in the MP4 format.
 Videos, for example, could be streamed over the internet using the MP4 format without losing
any real discernable quality.

Joint photographic experts group (jpeg) files


 When a photographic file is compressed, the size of the file is reduced. However, the quality of
the image is sacrificed for this reduction of size.
 Once an image is compressed, a new file is created which replaces the original file.
 Joint Photographic Experts Group will reduce a raw bitmap image by a factor of 5-15 (depending
on the quality of the image).
 The number of pixels of an image is calculated by length x width.
 For example, an image which is 1000 px by 2000 px: So: 1000 x 2000 = 2,000,000 px.
 The file size of an image is determined by the number of pixels as well as the number of primary
colours the image uses.
 Most images use the three primary colors (red, green and blue).
 So the file size of that image would be: 2,000,000 x 3 = 6,000,000 bytes = 5859.38 kilobytes =
5.72 megabytes.

Text and number file formats


• Text and numbers can be stored in a number of formats. Text is usually stored in an ASCII format
• When using spreadsheets or databases, for example, numbers can be stored in a number of
different formats:
• real, e.g. 2.71678
• integer, e.g. 3
• date, e.g. 12/08/2016
• time, e.g. 19:45:50
•currency, e.g. R$ 15.50
• Text files can also undergo file compression. These use complex algorithms that work on
redundancy or repeated sections of words

Lossless file compression


All the data from the original files is reconstructed when the file is again uncompressed.

Lossy file compression


Unnecessary data is eliminated forming a file that can't be reconstructed to get back to the original file.

Memory and storage


Memory and storage devices can be split up into three distinct groups:
 primary memory
 secondary storage
 off-line storage.

1. Primary memory
Random Access Memory (RAM)
This memory is volatile/temporary in nature. It is used to store data, programs or parts of the operating
system currently in use.The memory can be written to or read from.
The features of RANDOM ACCESS MEMORY (RAM) are:
 it is volatile/temporary memory (the contents of the memory are lost when the
 power to the RAM is turned off)
 it is used to store:
 data,
 files, or
 part of the operating system that are currently in use
 it can be written to or read from and the contents of the memory can be changed
How RAM works
 The larger the RAM, the faster the computer will run.
 RAM never runs out, but it gets slower through time.
 As RAM becomes full, the processor has to access the Hard-Disk Drive (HDD) to replace old data
on the RAM with new data.
 But by increasing the RAM size, the number of times this access operation is done is reduced,
making the computer run faster.

There are currently two types of RAM technology:


• dynamic ram (DRAM)
• static RAM (SRAM).

1. Dynamic RAM (DRAM)


Each DYNAMIC RAM (DRAM) chip consists of a number of transistors and capacitors. Each of these parts
is tiny since a single RAM chip will contain millions of transistors and capacitors. The function of each
part is:
 capacitor – this holds the bits of information (0 or 1)
 transistor – this acts like a switch; it allows the chip control circuitry to read the capacitor or
change the capacitor’s value.
This type of RAM needs to be constantly REFRESHED.
DRAMs have a number of advantages over SRAMs:
 they are much less expensive to manufacture than SRAM
 they consume less power than SRAM
 they have a higher storage capacity than SRAM.

2. Static RAM (SRAM)


 Unlike DRAM, Static RAM (SRAM) doesn't need to be refreshed.
 Instead of capacitors 'and transistors, SRAM makes use of flip flops to hold bits of memory.
 SRAM also provides a faster access speed (typical DRAM access speed is 60 nanoseconds, while
SRAM access speed is 25 nanoseconds).
Read Only Memory (ROM)
This memory is non‐volatile/permanent in nature. It is used to store the start‐up procedures or BIOS
(basic input/output system). The memory can only be read and not written to.
The main features of READ ONLY MEMORY (ROM) can be summarised as follows:
 they are non-volatile/permanent memories (the contents of the memory remain even when the
power to the ROM is turned off)
 they are often used to store the start-up instructions when the computer is first switched on (for
example, ROM might store the basic input/output system (BIOS))
 the data or contents of a ROM chip can only be read; they cannot be changed.

Application of RAM and ROM


ROM
• stores the factory settings such as remote control frequencies
• stores the ‘start-up’ routines when the toy car is first switched on
• stores the set routines; for example, how the buttons on the hand-held device control turning
left, acceleration, stopping, and so on.
RAM
• the user may wish to program in their own routines; these new instructions would be stored in
the RAM chip
• the RAM chip will store the data/instructions received from the remote control unit.

You might also like