As Computer Science 9618
As Computer Science 9618
DENARY
- base 10 with digits 0-9
BINARY
- base 2 system, represented with 1 and 0
- All inputs need to be converted to binary for computers
DECIMAL PREFIXES
- Kilobyte = 1000 bytes = 10^3
-
- Megabyte = 10^6
- Gigabyte
- Terabyte
*Nibble = 4 bits
*Byte = 8 bits
BINARY ARITHMETIC
- Overflow
- The largest number of bits a register can hold at a time is exceeded
- CPU discards the overflow digit (It will think it is 255 + 1)
- Ex: 11111111 + 1 → 1 00000000 → 00000000
BINARY CODED DECIMALS (BCD)
= binary encodings of decimal numbers where each digit is represented by a fixed number of bits
1. Unpacked
- A numeral encoded into one byte (8 bits, first 4 0s insignificant)
- Ex: 8 5 0 3 → 00001000 00000101 00000000 00000011
2. Packed
- A numeral encoded into a nibble (4 bits, most significant), typically used for transmission, can
be made into 2 bytes
- Ex: 8 5 0 3 → 1000 0101 0000 0011 → 10000101 00000011
Applications of BCD:
- Digital Calculator
- Digital Clock
- Digital Thermometer
- Currency Values
UNICODE
+ Covers majority of different languages across the world
+ Uses 16 bits/32bits (4 digits only, represents 2 bytes)
Limitations:
- Requires more space compared to ASCII (16 bits instead of 8 bits)
-
-
- More bits are required for non-ASCII characters
Special features:
- Big enough to handle all existing characters and symbols
- Characters from the same language are grouped together and are in its natural order (if can be
made possible)
IMAGES
VECTORS BITMAP
+ To edit the design, need to change each of + Consists of a matrix of individual dots (or
the geometric shapes pixels) that all have their own color (made up
+ File size is small since made up of of binary)
geometric shapes + Made up of pixels
+ Created by a drawing package or a + Image built from pixel by pixel, final image
computer-aided design (CAD) are usually very realistic
+ Constructed using mathematical formulas, + Can edit each pixel to change the design of
which makes it scalable the image
+ Has a drawing list + Most images are typically stored as a bitmap
+ Bitmap image usually have a file header
- limited number of geometric shapes causes - very large file size because of pixel
graphics to not appear to be very realistic (accurate designs)
- Only can be displayed on a graph plotter - Poor quality when zoomed in
(expensive hardware), not cost effective - Decimation: throwing away pixels when
zooming out which changes the image in an
unacceptable manner
- Slow reading and rendering process (due to
expansion of compressed data)
*Drawing list = set of commands used to define a property (thickness, style, colour, fill colour) of the object
*Vectors = scalable and do not pixelate like a bitmap image therefore are used by corporations to create
logos as they can resized without losing quality
*Pixel= small blocks of addressable areas & the color they have is represented by binary and stored as bits
*File header = a few bytes of binary and represents basic information about the graphic, such as image
resolution, size, and number of colors
*Image resolution = the amount of pixels an image contains per inch
*Screen Resolution = the number of pixels per row by the number of pixels per column
*Color depth = number of bits used to represent the color of a single pixel
- The higher the color depth/image resolution, the better the color quality and. file size
*Bit depth = the number of bits used to represent each pixel in an image
SOUND
= vibrations that travels through a medium
- continuous in nature
COMPRESSION
= technique to reduce the size of a file without reducing the quality in the use of the file
Why?
- files tend to have large file size
- Transfer speed is slow
LOSSLESS LOSSY
+ compressed file which can be restored to its + Unnecessary data is permanently removed
original file size + The unnecessary sounds (such as
+ Save the color code for every pixel background noises) can be removed from
+ Use run length encoding the audio file to reduce the file size.
+ an image which has a large background
could be encoded so the background pixels
have a lower resolution
+ Colors such as blue, to which the human
eye is less sensitive could be encoded at a
lower resolution
HARDWARE:
1. hubs
- Connects devices to form LANS
- Send data packets to every computer in the network this leads to security risks and wastes
bandwidth
2. Switch
- Connects devices to form LAN send the data packets to appropriate node thus more secure
than hubs
- Devices within a network that forward packets within the network itself
- Allow multiple computers to connect to a network through a single node
1. Server
- Computer or system that provides resources, data, service to computers, known as clients
2. Network Interface Card (NIC)
- Computer hardware component that connects a wire-based computer to a computer network
usually the company’s network
- It allows computers to connect to networks such the internet.
3. Wireless Network Interface Card (WNIC)
- Computer hardware component that connects a radio-based computer to a computer network
usually the company’s network
- Use antennas to communicate with the computer via microwaves
- And usually plugged to the USB port
4. Wireless Access Point (WAP)
- Access pint which allows wired devices to connect to a wired network the wap itself is
connected to the wired network.
- Hardware device on a LAN that allows wireless capable devices and wired networks to
connect through a wireless standard (WiFi or Bluetooth).
5. Cables
- Wired transmission medium that allow communication in wired networks
- Coaxial, Twisted Pair, and Fibre optic cables
6. Bridge
- Connect two lans with the same protocols
- Connect multiple devices that has the same protocol & provide communication between them
7. Repeater
- Extend the range of a network by regenerating and amplifying signals allowing signals to
reach long distances
- Prevents dead spots
- Non logical devices as the boost all signals detected
- Unmanageable
- latency
- Expanding network coverage by combining 2 LAN signals
WIDE AREA NETWORK (WAN)
= network that extends over a large area
- created by joining several LAN together
- Used by company to connect different sites but not owned by the company
- Provided from a PSTN(Public switched telephone network)
- Use fibre optic Cable, satellite radio, and microwave radio
Benefits:
- Wider reach : can connect locations over large distances allowing businesses to operate in different
cities.
- Resource sharing organisation can share resources such as servers database and applications
- Scalability, they are easily expandable
- Job can be run on a remote computer that had the required application software
- Data archive that was stored on a remote computer can be access
- Message could be transmitted electronically to a user on a remote computer
Disadvantages:
- Expensive to setup due to the need of dedicated lines and routers
- More complex to manage than LAN need specialised knowledge and skills
- Security vulnerability the larger the network the increase in potential attacks
HARDWARE
1. Routers
- Connect 2 different network using the same protocol.
- Regulate network traffic
- Assign private IP address
- Calculates the most efficient route for data packets to be sent
- Receive and forward packets from a network using the most efficient route
2. Gateways
- Connect 2 network using different protocol
- Regulate network traffic
- Assign private IP address
- Convert data packets from one protocol to another
- Receive and forward packets from a network
3. Server
- Computer or system that provides a specific function for computers using a network such as
file storage, delivery of web pages, etc
4. modems
- It allows the computer to connect to the internet by turning digital data into an analogue
signal so it can travel over phone lines and cable wires
INTERNET WORKING
= shortened to Internet
INTERNET is massive network of networks which are made up of various computers and electronic devices
- uses IP protocol/ transmission control protocols (TCP)
- Access provided by internet service providers
- Forms a collection of connected networks and is a packet-switched network
- All network traffic is made up of packets of data with a source address and destination address
- There will be a large number of available paths for the transmission of any data packet
Disadvantages:
- used in small areas
- Security risks as there is no authentication
- Data integrity issues data is accessed by many clients hence may be inconsistent
- Max nodes = 10
- Performance issues.
THIN-CLIENT
= a client that only provides input and receive output from the application
- choose an app to run on the server
- Sends input data to the server when requested by app
- Received output from the app
Benefits:
- cheap to expand
- Hardwares are cheap
- All devices are linked to a server
- Update and new softwares installation done centrally
- Server can offer protection against malwares and hacking
Disadvantages:
- High reliance on server
- Goes down = devices won't work
- Startup cost is high
THICK CLIENT
= a client that carries out at least some of the processing itself
- Choose an app provided by the server
- Possibly carries out some processing before running the app on the server and also after receiving
the output from the app
- Possibly download the app from server and runs the app by itself
Benefits:
- More robust
- Can carry out processing even without connection to server
- Clients have more control
- Store their own programs and data/files
Disadvantages:
- Less secure
- Rely on client to keep own data secure
- Each client need to update data and software individually
- Data integrity issues
- Many clients access the same data which can lead to inconsistencies
- relies on a connection to a remote server - can run some features even without
- Requires very few local resources; SSD, connection to the server
RAM - Relies heavily on local resources
- Relies on good, stable, and fast connection - More tolerant on slow network connections
- Data is stored on a remote server - Can store data on local resources; HDD,
SSD
ETHERNET
Protocol used by wired lans which allows devices in the lan to send data between themselves via cables
Made up of:
A node(any device on LAN)
medium(path used by LAN devices such as ethernet cables)
frame(data is transmitted in frames which are made up of source address and destination addresses)
CONFLICTS
Occurs when devices on the same network have the same IPaddress . it is impossible for devices without
unique IP addresses to connect to the internet .
Occurs when one device having a dynamic IP address has the same address as a device having a static ip
address.
To resolve this a router may need to be restarted.
COLLISION
Occurs when two nodes are transmitting data on the same channel at the same time
Carrier sense multiple access with collision detector(CSMA/CD)
Carrier sense
First detects if a collision has occurred if a collision has occurred then a device stops transmitting frame and
transmits a jamming signal.
The device waits a random amount of time before restarting/retrying
Collision
= if 2 end systems were to transmit message at the same timeCarrier Sense Multiple Access / Collision
Detection (CSMA/CD)
1. Workstation tune in to the communication channel
2. If no data is being transmitted, computer can send data
3. If collusion occurs, each workstation waits at random time before transmitting
CLOUD COMPUTING; allows computers to access or store data and application over the internet
instead of local computers and servers
= the provision of computing services usually via the internet
Benefits:
- Accessibility,can be accessed from anywhere where internet is available.
- Acts as a backup for any accidental data loss.
- Scalability, easy to adjust to cope with an organisations requirement.
Disadvantages:
- Security risks, data stored can be vulnerable to hacking.
- Internet dependency , requires stable internet.
- Downtime cloud service providers may experience outages that may make data unable to access.
- Ongoing costs such as subscription fees.
1. Private Cloud
= owned by one organisation and only accesses by one organisation
- the organisation take full responsibility for creating and managing the cloud installed on-site
and connected to a private network.
- The organisation outsources to a third party the creation and management of an on-site
installation to a private network
- The organisation outsources the creation and management of an internet accessible system
by a third-party
Benefits:
- Enhanced security, since resources are only for one organisation which means greater
control over security measures reducing risk of data breach.
- Flexibility, can scale resource up or down based on their needs.
- Customization organisation can tailor infrastructure and applications to meet specific
requirements.
Disadvantage:
- more expensive, due to the need of purchasing hardware and having top personnel.
- complex to maintain and manage need high level skills.
2. Public Cloud: computing services are provided over the internet by a third party provider
= owned by a cloud service provider for general access.
Advantages
-Cost effective, users only pay for the resources they consume while the costs of maintenance is
take upon by service providers.
- can be accessed anywhere where internet is available.
Disadvantages
- Security risks, shared resources can expose sensitive data to breaches.
- Limited control over infrastructures and may face limitations in customization .
- Downtime,cloud services providers can experience outages preventing accessibility.
TOPOLOGIES
1. Bus
- Single central cable connecting all devices with terminators at each end
- Terminators are needed at each end to prevent signal reflection
- Travels in only one direction(if data is sent between devices than the other device cannot
transmit.
- They are typically peer to peer
Benefits:
- Even if one node fails the the network still functions.
- Easy to increase size of the network by adding additional nodes.
Disadvantages:
- If the main cable breaks the entire network goes down.
- Performance deteriorates after heavy loading.
- Difficult to troubleshoot therefore not used in large networks.
- Not secure since each data packet passes through every node.
2. Star
- Uses a central switch/ hub where nodes are connected .
- Each node has a dedicated connection.
- Each end-system has a point-to-point connection to the central device
- Transmission is duplex
- The central device can be used to connect the network to other networks
Benefits:
- More secure data goes to the correct data packets.
- Easy to install and wire.
- No disruptions to the network if one node fails.
- Easy to detect faults and to remove parts.
Disadvantages:
- Requires more cable length than a linear bus topology.
- If switch/hub goes down than the entire network goes down goes down.
- More expensive than linear bus topology because of the cost of the connecting devices
(network switches).
3. Mesh
There are two types routing where nodes acts as routers and send the data to the correct node by
using the shortest route and flooding where router send to sends to all the nodes
- Every network device is connected to another network device
- Used for site-to-site WAN connectivity, to increase redundancy
Benefits:
- Easy to expand.
- Easy to recognize faults.
- Privacy as data packets are sent in dedicated routes.
- If one link is down, we have another path to reach the destination.
Disadvantages:
- Is costly because of the extra cables needed.
- It is very complex and difficult to manage.
4. hybrid
- Is a type of network topology, which is made of two or more different topologies.
made using a combination of bus topology, star topology, mesh topology (full-mesh topology
or partial-mesh topology), ring topology or wireless topology as per the requirement of the
organisation.
Advantages
- Can handle large traffic .
- Easy to recognize faults.
- Well suited for the creation of large networks.
Disadvantage
- Is difficult and complex to manage.
- Expensive to set up.
.
WIRED NETWORK VS WIRELESS NETWORK
uses cables to connect devices Uses radio waves and infrared signals to transmit
data between devices without the need of a cable
+ Faster data transfer rates + Accessibility, can offer internet access from
+ More reliable (are less vulnerable to anywhere where wires are impractical
interference such a weather and physical + Scalability ; straightforward and easy no
obstacles providing a more stable need for additional infrastructures for
connection) expansion
+ More secure (as they require physical + Mobility as not tied to cable
access to the network making unauthorised + Cheap as it eliminates wiring expenses
access difficult + Easier installation,Easy to set up as there
are no cables.
WIRED NETWORK
= Carries data as electrical signals and can consist = Transmit data as light
of a twisted pair
- Doesn’t perform well with small charges - Needs expensive optical transmitter and
- Affected by electromagnetism receivers
- Limited bandwidth which may limit data - Only transmit data in one direction
transfer speed - fragile
- More easily intercepted
Fibre optic
Single mode uses single light source thus less reflection thus can be used in longer distances
Multi mode uses multiple light sources more reflections thus used in shorter distances
SUBNETTING
Is dividing LAN small into smaller manageable subnetworks.
The IP is broken down into three parts without changing the NetID The host ID is divided to two parts host
ID and subnet ID(which identifies the subnet in the network)
Subnet mask hides the net ID allowing data only to be routed in the subnet
Advantage
- Increases security by limiting access and control traffic flow between sub networks
- Reduces network traffic
- Hides the complexity of the network
- Allows better allocation of IP addresses reducing waste and ensuring efficient use of IP addresses
WIRELESS NETWORK
BIT STREAMING
= the transfer of a sequence of bits at a high speed one at a time, representing a stream of data over the
internet, hence it requires some form of buffering and high broadband connection.
Bit rate number of bits transmitted per second
Benefits of bit streaming
- No need to wait for the whole file to download before the user can watch.
- No need to store large file on device.
- Allows video file to be played on demand.
- More difficult to copy streamed file than stored on hard drives.
- No need for specialist hardware.
Disadvantages of bit streaming
- Cannot stream video or music file if broadband connection is lost.
- Streaming uses a lot of bandwidth.
- Security risks associated with downloading files over the internet.
- Video files will pause if insufficient buffer capacity or slow broadband connection.
VIDEO
- data is compressed before transmission .
- Video is hosted on a media server.
- Video then transmitted continuously as a series of bits.
- The recipient receives bit stream from a buffer.
REAL TIME ON DEMAND
= used when watching live streams of events that = watching an event that has taken place in the
are currently taking place. past.
- Event is captured live with a video camera - Existing media are encoded to bit streaming
that is connected to a computer, cannot be format and uploaded to a server, can be
paused or rewound. paused and rewound.
- Video signal is encoded to streaming media - Encoded feed is uploaded to a dedicated
files streaming server
- Encoded feed is uploaded to a file server - Server send live images to user.
- Streamer it servers duplicate the feed and - When client request to watch a specific
send it to all clients requesting in real time video, a bit stream is set up which transmit
saved video.
WEBSITE STREAMING
+ No need to download the full file
+ No need special software for playback in browser
- Video stops if internet connection is bad
- Viruses can be downloaded from websites
PRIVATE PUBLIC
- Only unique within a LAN hence can be - IP Address is unique and can be across the
accessed within LAN internet
- Issued by router in a LAN - Assigned by the ISP
- NAT(network address translation required - Address can be reached over the internet
by private IP addresses to access the
internet)
- More secure than public IP addresses since
they are hidden by net NAT
- Reduce the number of public IP addresses
needed
- Need Network Address Translation (NAT) to
access the internet directly
- Can be duplicated in different networks
STATIC DYNAMIC
IPv4 IPv6
none why?
- the number of IP address needed will
exceed the number available by using only
IPv6
- 32 bits grouped into four blocks - 128 bits grouped into 16 blocks
- Range 0-255 - Range 0000 to FFFF
- Each block can have a value between 0 to - Each block can have 4 hexadecimal value
255
with range 0000 to FFFF
- Separated by a full stop
- The first two number is the network - Separated by colons
- Last two numbers are host - Only 1 double colon is allowed
- EX: - Ex:
- 192.0. 2.146 1234:1234:1234:0000:1234:1234:1234:123
4
ZERO COMPRESSION:
IPv6 can be shortened by replacing zeros with double columns but this is applied only once.
BENEFITS OF IPV6 OVER IPV4
- Has no need for NAT
- Removes the risk of private ip address collision
- Allows for more efficient routing
- Has built in authentication
IP ADDRESSES ARE DIVIDED INTO TWO PARTS:
- NetID
This identifies the specific network to which the devices belong to , it allows routers to route data to
the correct network
- HostID
It identifies a host/device on a network it ensures data sent over the network reaches the right device
EXAMPLE
192.168.1.10 the host id is 10 and the net id is 192.168.1
INPUT DEVICES
1. Keyboard
- Uses switches and circuits to translate keystroke into signals the computer can understand
- The key matrix is a grid of circuits
- Each circuit is broken beneath the key
- When key is pressed, a circuit is completed and a signal is sent
- Processor compares the location of signal from key matrix to a character map stored in ROM
- A character code for each key is saved in a keyboard buffer
2. Trackball Mouse
- The ball touches horizontal and vertical rollers
- When the ball moves, the roller moves as well
- Each roller connects to a shift which spins a disk with holes
- Infrared beams shine through the holes in the disks
- As the ball moves the roller the beam is broken by the space between the holes, creating pulses of
light
- The distance and speed of the mouse is determined form the rate of the pulses by an on-board
processor chip in the comp
3. Optical Mouse
- laser shines through the surface though a ring at the base
- Light is reflected from the surface through the ring
- Sensor detects reflected light
- Captured details on surface at about 1500 times per second
- When mouse moves, the sensor detects changes in the surface details
- Which are translated into movement (x and y coordinates)
- The processor updates the position of the cursor on the screen
4. scanners
- main component is a CCD array
- CCD is a collection of light sensitive diodes
- Laser is shone onto the barcode
- Scanned image reaches the CCD through mirrors and lenses
- Sensors detect level of reflected lightScanner
-
- Brighter light results in greater electrical charge
- Light intensity is converted to a digital value
5. Touchscreen
RESISTIVE CAPACITIVE
● has an upper layer of polyester and a ● made up of many layers of glass that acts
bottom layer of glass like a capacitor creating electric fields
● When top polyester layer is touched, the between the glass plates in layers
top layer and bottom layer complete a ● When top glass is touched, the electric
circuit current changes and the coordinate where
● Signals are then sent out, which are the screen is touched are determined by an
interpreted by a microprocessor and the on board microprocessor
calculations determine the coordinates of ● Coordinates sent to touch screen driver
where the screen was touched
+ cheap + expensive
+ Can use bare fingers, gloved or stylus for + Screen visibility is good under strong
input. sunlight
+ Permits multi-touch capability
+ Screen is very durable
- screen visibility is poor in strong sunlight. - only bare fingers and cannot use gloves to
- Does not permit multi-touch capacity. styluses for input
- Screen durability is weak.
- Vulnerable to scratches and wears
out though time
6. Microphone
- When sound is created, air vibrates
- cone pick up the air vibrations, hence the diaphragm also vibrates
- Copper coils is wrapped around the permanent magnet and coil is connected to the diaphragm using
a cone
- As diaphragm vibrates, the cones moves in and out, causing the copper coil to move backwards and
forwards
- This movement causes the magnetic field around the permanent magnet to be distributed, inducing
an electric current
- Electric current is then either amplified or sent to a recording device.
- The electric current is analogue in nature.
7. Virtual Headset
- video is sent from a Computer to the headset either using HDMI cable or smartphone is fitted into
the headset
- Two feeds are sent to an LCD/OLED displays
- Lenses placed between the eyes and the eye for focusing and reshaping of the image/video for each
eye, thus giving a 3D effect and adding to the realism
- As the user moves series for sensor and LED measure this movement, which allows the image/video
on the screen to react to the user’s head movement
- Headset also use binaural sound so speaker output appears to come from behind, side, from a
distance giving a realistic 3D
- Infrared sensors to monitor eye movement which allows the depth of field on the screen to be more
realistic
OUTPUT DEVICE
1. Laser Printer
- The revolving drum is initially given an electrical charge
- A laser beam bounces off moving mirrors and scans back and forth across the drum
- Discharge certain points
- The drum is coated with oppositely charged toner
- Pattern on the drum is transferred to paper & Paper is passed through the fuses to seal the image
- Electrical charge is removed from the drum.
Print head
- contains a large number of small nozzles
- Ink is fed to each nozzle from a reservoir
- The print head fires droplets of ink onto the Oates
- The print head moves horizontally across the paper
Stepper motor
- Connected to the print head by a belt
- Moves the print head across the paper
- Parks the print head assembly when not in use
- Turns the rollers that provides the paper feed.
2. 3D Printer
- the object is designed by a Computer Aided Design (CAD)
- Software splits the object into slices
- Data about the slices is sent to printer
- Solid plastic is melted and transferred to the nozzle
- A stepper motor moves the nozzle into position and then nozzle extrude the molten plastic
- Repeat step 5 until layer is completed
- Fan cool layer
- Repeat step 4-7
3. Inkjet Printer
- data from the document is sent to a printer driver
- Printer driver ensures that the data is in a format that the printer can understand
- Cheerleader is made by the printer drive to ensure that the chosen printer is available to print
- data is sent to the printer and stored temporary in a printer buffer.
Ink is created by
Thermal bubble :tiny resistors produce localised heat which makes the ink vaporise.
Piezoelectric: crystals is located at the back of ink reservoirs for each nozzles.
4. Speaker
- an electric current is sent to the speaker
- The electric current passes through the coil the current in the coil creates an electromagnetic field
- Changes in the audio signal cause the direction of the electrical current to change
- This determine the polarity of the electromagnet
- The electromagnet is repelled by or attracted to a permanent magnet
- The movement of the coil causes the diaphragm to vibrate
- The vibration creates sound waves
5. Virtual headset
Two feeds are sent to LCD display
Two Lenses between the screen and eye allow reshaping and focusing which allows for 3D effects
LED measures and sensors which track head movements
Binaural sound which appears to come from the back adding more 3d realism
STORAGE DEVICES
PRIMARY STORAGE
Why?
- to store files needed to boot the system.
- Store parts of the OS.
- use flip flops to hold each bit of memory - consist of a number of transistors and
- Does not need to be constantly refreshed capacitors.
- Faster data access time than DRAM - Needs to be constantly refreshed
- Used as Processor memory cache - Less expensive than SRAM
- Higher memory capacity
SECONDARY STORAGE
Why?
- to store files/software long term
1. INTERNAL SECONDARY STORAGE
HDD, Tape Drive SD Card, SSD Hard Drives, USB DVD, CD, Blu ray
Pen Drive
Solid state is made up of
transistor gate floating
gate:stores electrons and control
gate which stores flow of
electrons
- large capacity to store - Large capacity to store - Can hold a lot more data
large files large files than a standard DVD,
- Reasonably fast access - Lower power meaning it can store
speed consumption(laptop use) movies with better picture
- Uses will not have - Runs much cooler than and sound quality
to wait for videos HDD making it suitable for - Portable
to load laptops - More expensive than
- Storage costs less per - ** SSD less longevity DVDs.
unit storage hence cant be used in - Requires a Blu-ray player
- If a large number servers with huge - Can lose data when
is needed, cost amounts of write scratched.
would be quite low operations.
- Slower degradation of - Fast access speed
data - Users won’t have
- Last longer and to wait for videos
more reliable to load
under heavy use - Reliable
- Can be damaged
and would still
work
- No moving parts
- Not possible to overwrite
the existing data
- Need to erase the
old data to write
- To read/write uses
movement of
electrons
EMBEDDED SYSTEM
= installing microprocessors into devices to enable operations to be controlled in a more efficient way
- At the core is an integrated circuit designed to carry out computation for real-time operations
- Embedded systems are managed by microcontrollers or digital signal processors (DSP),
application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), GPU
technology, and gate arrays
- These processing systems are integrated with components dedicated to handling electric and/or
mechanical interfacing
- CHARACTERISTICS OF EMBEDDED SYSTEM
Installed into the device.
Have a specific task.
Not easily changed .
Are ,managed by microprocessors.
PROS CONS
BUFFERS
= hold data temporarily as it is transferred from one component to another e.g. keyboard buffers,printer
buffers,video buffers.
Advantages of buffers
Prevents data loss
Smooth operations/playback/communications(avoid interruptions)
Purpose of buffers
-Data transfer management
Data is transferred at different speeds buffers hold data temporarily to avoid interruption of processes
at the receiving end and prevent data loss
-enhancing device communication
Multiple devices or processed communicate buffer facilitates interaction and allows synchronisation
MONITORING SYSTEM
SENSORS
Are input devices which measure and read physical properties
= The sensor measures and converts the physical quantity to an electrical signal, which can then be read by
an embedded systems engineer or any electronic instrument. A sensor stores the measured quantity to the
memory
A-D Converter
= An analog-to-digital converter converts the analog signal sent by the sensor into a digital signal so
processor can understand
Processor & ASICs
=Processors assess the data to measure the output and store it to the memory
D-A Converter
= A digital-to-analog converter changes the digital data fed by the processor to analog data
Actuator
Take control signals into physical action such as adjusting
= An actuator compares the output given by the D-A Converter to the actual output stored and stores the
approved output
LOGIC GATES
Truth Tables
AND NOT OR
A B X A X A B X
0 0 0 1 0 0 0 0
1 0 0 0 1 1 0 1
0 1 0 0 1 1
1 1 1 1 1 1
A B X A B X A B X
0 0 1 0 0 1 0 0 0
1 0 1 1 0 0 1 0 1
0 1 1 0 1 0 0 1 1
1 1 0 1 1 0 1 1 0
COMPONENTS OF CPU;
1. Arithmetic & Logic Unit (ALU)
- Performs mathematical and logical operations required while running a program
- Has an “Accumulator”
- A temporary register used when carrying out ALU calculations.
3. System Clock
- produces timing signals which are sent on the control bus to ensure the synchronisation take place
- Without it, computer would crash
Current Instruction Register CIR Stores the current instruction being decoded
and executed
Memory Address Register MAR stores the address of the memory location
currently being read from or written to
Memory Data Register / Memory Buffer MDR / MBR stores data which has just been read from
Register memory or data which is about to be written to
memory
Status Register
= used when an instruction requires some form of arithmetic or logic processing
- Carry Flag (C)
- Set to 1 if there is CARRY in the following an addition operation
- Negative Flag (N)
- Set to 1 if the result of a calculation has a negative value
- Overflow Flag (V)
- Set to 1 if an arithmetic operation results in an overflow
- Zero Flag (Z)
- Set to 1 if the result of an arithmetic operation is ZERO
SYSTEM BUSES
- used in computer as a parallel transmission component
- Each wire in the bus transmit one bit of data
1. Address Bus
- caries data throughout the computer system (CPU and memory)
- Unidirectional (travel in one direction only)
- Prevents addresses being carried back to the CPU
2. Data Bus
- Bidirectional (allows data to be sent in both directions along the bus)
- Data can be carried from CPU to memory and to/from input/output devices
- Data can be an address, an instruction, or a numerical value
- Carries word lengths the greater the width of the bus the larger the word length which improves the
performance of the computer system
- *word is a group of bits regarded as a single unit e.g. 16-bit.*
3. Control Bus
- bidirectional
- Carries signals from CPU to all other components
- 8 bit wide and only carry control signals .i.e timing signals and interrupt signals
2. Clock speed
- The number of pulses the clock gives out per unit time
- The increase in clock speed reduces execution time and the increase in number of fetch execute
cycle per unit time
- increasing speed by accessing the Basic Input/Output System (BIOS), processing speed also
increase
-
- Can lead to unsynchronized operations (unable to complete on time)
- Overheating the CPU = unreliable performance
3. Number of cores
- Each core can independently carry out a process at the same time so more instructions are
executed improving performance of computer system
- dual core (CPU made up of 2 cores)
- Has one channel and needs the CPU to communicate with both the cores, not really affect
performance
- Quad core (CPU made up of 4 cores)
- Has 6 channels and need the CPU to communicate with all 4 cores, reducing a lot of
performance
4. Cache Memory
- using cache can improve performance
- Cache have faster access time
- Stores frequent instructions that is used by CPU
- Contents lost when power is turned off similar to R.A.M
COMPUTER PORTS
UNIVERSAL SERIAL BUS (USB)
+ simpler technology
+ Only 1 standard available
+ Easy to split the signal and connect a number of devices from one source
+ Connection is very secure
INTERRUPTS
Caused By:
- timing signal
- Input/output processes e.g. disk drive ready to receive data
- User interaction e.g. user presses a key such as <ALT> or <BREAK>
- Hardware fault e.g. paper jams
- Software error e.g. dividing by zero and an exe.file not being found to run a program
ASSEMBLY LANGUAGE
= a low level machine specific programming language that uses mnemonics
MACHINE CODE
= the programming language that the CPU uses
- binary
- Sometimes displayed on a screen as hexadecimal so user can understand machine code instruction
more easily
- Very time consuming and error problem
LANGUAGE TRANSLATORS
Why?
- shorten development time for writing computer programs
- Instructions to be easier to learn and understand
Before a program written in assembly language (source code) can be executed, it needs to be translated to
machine code. This is performed by an Assembler
- Translates each assembly language instructions into machine code instruction
- Checks syntax of the assembly language program to ensure that only the appropriate machine code
instruction set are used
- This speeds up the development time as some errors are identified during translation before the
program is executed
TYPES OF ASSEMBLER
1. One Pass
- Removes white lines.
- read the assembly language program one line at a time
- Ignore anything not required: comments
- Allocate a memory address for the line of code
- Check the opcode is in the instruction set
- Add any new labels to the symbol table with the address, if known
- Place address of labeled instruction in the symbol table
2. Two Pass
- read the assembly language program one line at a time
- Generate object code, including opcode and operand, from the symbol table generated in one pass
- Save or execute the program
5. Compare Instructions
ADDRESSING MODES
ABSOLUTE ADDRESSING the contents of the memory location in the operand are used
DIRECT ADDRESSING the contents of the memory location in the operand are used
INDIRECT ADDRESSING the contents of the contents of the memory location in the operand
are used
INDEXED ADDRESSING the contents of the memory location found by adding the contents of
the IR to the address of the memory location in the operand are used
RELATIVE ADDRESSING the memory address used is the current memory address added to
the operand
BIT MANIPULATION
BINARY SHIFT
= moving the bits stored in a register a given number of places with the registers
TYPE OF SHIFTS:
LOGICAL SHIFTS bits shifted out of the registers replaced with 10101111
0 Shifted left 3 places
01111000
CYCLIC SHIFTS no bits are lost, bits shifted out of one end of 10101111
the register are introduced at the other end Shifted left 3 places
of the register 01111101
In monitoring and control, each bit in a memory location can be used as a flag and would need to be tested,
set, or cleared separately
CH5 - SYSTEM SOFTWARE
OPERATING SYSTEM
= software that provides an environment in which applications can run and provides an interface between
hardware and human operators
TASKS
1. Memory Management
- Memory optimization = determine how comp memory is allocated and de allocated when a number
of applications are running simultaneously
- To maintain optimization, swap data to and from the HDD or SSD
- Memory organization = determines how much memory is allocated to an application, and how the
memory can be split up in the most appropriate and efficient way
- Partitioned allocation =. Memory is split up into contiguous blocks and memory management
then allocates a block into an applications
- Memory protection = ensures that two competing applications cannot use the same memory
locations at the same time
- If not done, data could be lost, security issues, computer can crash
2. Security Management
- to ensure integrity, confidentiality, and availability of data
- Carry out OS updates when they’re available
- Ensure that anti-virus software is up to date
- Maintaining access rights for all users
- Offering recovery of data (in case of lost or corrupted)
3. Process Management
- allocating resources and permit the sharing and exchange of data, thus allowing all processes to be
synchronized
4. Hardware Management
- Controlled by queues and buffers
- Communicating with all input and output devices using device drivers
- Translating data from a file into a format that the input/output device can understand using
device drivers
- Ensuring each hardware resource has a priority so that it can be used and released as
required
5. File Management
- Defining the file naming convention which can be used (.exe, .xls, etc.)
- Performing specific tasks (copy, open, create)
- Maintaining the directory structures
UTILITY SOFTWARE
1. Hard Disk Formatter
- OS need to know how to store files and where the files will be stored on the hard disk
- Will organise storage space by assigning it to data blocks
- Disk surface may have a number of partitions
- Note that partitions are contagious blocks of data
- Once partition created, they must be formatted
- Done by writing files which hold directory data and tables of contents at the beginning of each
partition
- Allows OS to recognise a file and know where to find it on the disk surface
- Also have a checking tool for each sector
- If bad = sector will be flagged as ‘bad’ and the file tracking records will be reorganised
- Replacing bad sectors with new unused sectors
2. Virus Checker
- check software or files before they are run or loaded on a computer
- Compare possible viruses against a database of known viruses
- Carry out heuristic checking
- Checking software for types of behaviour that could indicate a possible virus
- Put files or programs which may be infected into quarantine
- Automatically delete the virus
- Allow user to decide whether to delete the file
3. Defragmentation Software
- When HDD become full, blocks used for files will become scattered all over the disk surface
- Happens when files are, extended, etc
- Cause slower data access time
- HDD read-write head requires several movements just to find and retrieve the data making
up the required file
- Better if files could be stored in contiguous sectors, hence reducing HDD head movement
6. Back-Up Software
- allow a schedule for backup files to be made
- Only carry out a back-up procedure if there have been any changes made to a file
PROGRAM LIBRARIES
- when software is under development and programmer can utilize pre-written subroutines in their own
programs (save development time)
- Help software developer who wishes to use Dynamic Link Library (DLL) subroutines in their own
program
When software routines are written, they are saved in a program library (Library Program) for future use by
other programmers
*Library Routines = described routines which could be used in another piece of software under development
Source program assembly language - high level language to high level language to
translated to... machine code machine code machine code
Object Program is disk or in main memory disk or in main memory every line of program
stored on... are interpreted then
executed each time the
program runs and its
under the control of
interpreter
Each line of the source one machine code many machine code many machine code
program generates... instruction (one to one instructions, instruction instructions, instruction
translation) explosion explosion
COMPILER INTERPRETER
+ user only need the executable code, hence + easier to develop and debug as error can be
the end user benefits as no need to corrected on each line and the program
purchase compiler restarted from that place
+ Developer have the source code, so cannot + It translate line by line
be altered or extended by user + Untested programs should not be able to
+ Source programs has no syntax or semantic cause the computer to crash
errors + When purchased, end user have all source
code and run-time libraries, enabling the
program to be modified as required without
further purchases
- finds all errors in program, once detected - end user will need to purchase a compiler or
the rest of the code can be an error too an interpreter to translate source code
even though if its not before use
- Untested programs with errors can cause - Developer have no control of source code,
computer to crash more difficult to change for upgrades
- End user has no access to source code and - Contain syntax or semantic errors if any part
run time libraries, unable to make of the program has not be fully tested,
modifications and rely on developer on hence need to debug
updates
IDE have:
1. Source Code Editor
- allows program to be written and edited without the need to use a separate text editor
- Speed up the development process as editing can be done without changing to a different piece of
software each time the program needs correcting or adding to
- Most source code editors color code their words and layout of the program (Prettyprinting)
- Dynamic Syntax checks for possible syntax errors as program code is being type in the SCE and
alerts the programmer at the time before the source code is interpreted
- Logic errors can be found
2. Compiler, interpreter, or both
- interpreter is used for developing the program
- Compiler to produce the final version of the object code
3. Run-time environment with a debugger
- Debugger = program under development and aids the process of debugging
- Allows programmer to go single step through the program a line at a time or set a breakpoint to stop
the execution of the program at a certain point in the source code
- Report window then shows the contents of the variables and expressions evaluated
- Allow programmers to see if there are any logical errors in the program and check if works as
intended
4. Auto-documenter
- explain the function and purpose of programming code
CH6 - SECURITY, PRIVACY, AND DATA INTEGRITY
DATA SECURITY
DATA PRIVACY
Data Privacy= the privacy of personal information, or other information stored on a computer, that should not
be accessed by unauthorised parties
DATA SECURITY
= methods taken to prevent unauthorized access to data and to recover data if lost or corrupted
1. User Accounts
- It is to authenticate a user (prove the user is who they claim to be)
- Used on both standalone and networked computer
- Consist of: Username and password
- User account control access rights
- Involves level of access
2. Passwords
- restrict access to data or systems
- Hard to crack and changed frequently to retain security
- Run anti-spyware to make sure password is not being relayed to whoever spying
- Regularly change passwords and make it hard to crack
- At least one capital
- At least one numerical
- At least one symbol
3. Digital Signatures
- a way of identifying the sender of
4. Firewalls
- software/hardware that sits between a computer and external network that monitors and filters all
incoming and outgoing activities
- Examine traffic between user’s computer and public network
- Checking whether incoming/outgoing data meets a given set of criteria
- Prevent access to undesirable sites
- However cannot protect individuals using their own modems to by-pass the firewall
- Prevent stand-alone computers from disabling the firewall
5. Antivirus Software
- Constantly check for virus attack
- Check software /files before they are run or loaded on computer
- Compare possible viruses against a database of known viruses
6. AntiSpyware Software
- detects and removes spyware programs installed illegally on a user’s computer system
7. Encryption
- the use of encryption keys to make data meaningless without the correct decryption key
- Cannot stop backer from deleting files, but stop from using the data
8. Biometrics
- use of unique human characteristics to identify a user
- Fingerprint scans, retina scans
RISKS
1. Hacking
- Malicious Hacking
- Illegal access to a computer system without the user’s permission or knowledge
- Personal details
- Ethical Hacking
- Authorized by companies to check their security measures and how robust their computer
systems are to resist hacking attacks
2. Malware
- Viruses = program or code that can replicate and/or copy themselves with the intention of
deleting/corrupting files or causing the computer to malfunction
- Spyware = gather information by monitoring
- Key press = sent back to person who sent the software
3. Phishing
- legitimate looking emails designed to trick a recipient into giving their personal data to the sender of
the email
- To prevent:
- User need to be aware of new phishing scams
- Do not click on links unless its safe (fake mails)
- Look out for https green padlock
- Be wary of pop ups
4. Pharming
- redirecting a user to a fake website in order to illegally obtain personal data about the user
- redirecting can be done using DNS Cache Poisoning
- Everytime a user types in a URL, their web browser contacts the DNS server
- IP Address of website is sent back to web browser
- DNS cache poisoning changes the real IP address values to those of the web websites
consequently, the user’s computer connects to fake website
- Protection:
- Using antivirus software
- Check https and green padlock
- Check spelling of websites
DATA RECOVERY
DATA INTEGRITY
= The accuracy, completeness and consistency of data
Can be compromised:
- during the data entry and data transmission stages
- Malicious attack on data: malware and hacking
- Accidental data loss due to hardware issues
VALIDATION
= method used to ensure entered data is reasonable and meets certain input criteria
VERIFICATION
= method used to ensure data is correct by using double entry or visual checks
PRINCIPLES
1. Public
- Software engineer shall act consistently with the public interest
2. Client and Employer
- Software engineer shall act in a manner that is in the best interests of their clients and employer
consistent with the public interest
3. Product
- Software engineers shall ensure that their product and related modifications meet the highest
professional standards possible
4. Judgment
- software engineers shall maintain integrity and independence in their professional judgement
5. Management
- Software engineers managers and leaders shall subscribe to and promote an ethical approach to the
management of software development and maintenance
6. Profession
- Software engineers shall advance the integrity and reputation of their profession consistent with the
public interest
7. Colleagues
- Software engineers shall be fair to and supportive of their colleagues
8. Self
Software engineers shall participate in lifelong learning regarding the practice of their profession
and shall promote an ethical approach to the practice of the their profession
COPYRIGHT ISSUES
A copyright is legal protection that gives creators total control of how their work is used and distributed and
prevents others from using their work without their permission
Why need copyright?
- software piracy = making illegal copies of software
- Which can be sell out or give away to other people
Steps to stop illegal copying of outward and to stop illegal copies being sold:
- User will be asked to agree the license agreement before software continue to install
- user will be asked to key in a product key (string of letters and numbers) which was supplied with the
original copy of the software
SOFTWARE LICENSING
1. Commercial Software
- Available to customers for a fee
- Providing a licence for one genuine copy to be used on a single device or a multi-use licence for
multiple users
- Software is offered free of charge if an earlier version was bought by user
- Fully copyright protected and none of the code can be used without prior consent of the copyright
owner
2. Free Software and the Open Source Initiative
- non profit organization that promote the benefits of giving users the freedom to run, copy, change,
and adapt software
- Freedoms:
- Run the software for any legal purpose they wish
- Study the program source code and modify it where necessary to meet their needs
- Redistribute copies of the software to friends and family
- Distribute code modified by the user to family and friends
- User don’t need to seek permission as it’s not protected with copyright restrictions but user not allow
to:
- Add source code from another piece of software unless this is also described as free
software or open source software
- Use the source code to produce software which copies existing software which is subject to
copyright laws
- Use the source code to produce software which is deemed offensive by third parties
IMPACT
1. Social
- leave people with more time to pursue their interests
- Transport = automation in payment, GPS (waze)
- Criminal Justice System = facial recognition system in forensic science
2. Economic
- automation will cause production to be more efficient
- Increase unemployment (low skill jobs)
- Instability for the future labour
3. Environmental
- Find patterns and interconnection within thousands of data set
- Help scientists to make predictions about the environment and climate change
CH8 - DATABASE
= a structured collection of items of data that can be accessed by different application programs
Limitations:
- Storage space is wasted when data items are duplicated by the separate applications and some
data is redundant
- Data can be altered by one application and not by another - inconsistent
- Enquirers available can depend on the structure of data and software used so data is not
independent
RELATIONAL DATABASE
= database in which the data items are linked by internal pointers
+ storage space is not wasted as data items are only stored once - no little or no data redundant
+ Data entered is one application is available in another application - data is consistent
+ Enquirers available are not dependent on the structure of data and software used - data is
independent
*Table = a group of similar data in a database, with rows for instance of an entry and columns for each
attribute
*Record = a row in a table in a database
*Field = column in a table in a database
KEYS
- Candidate Key = an attribute or smallest set of attributes in a table where no tuple has the same
value
- Primary Key = a unique identifier for a table/ a unique attribute used to identify a record
- Secondary Key = a candidate key that is an alternative to the primary key
- Foreign Key = a set of attributes in one table that refers to the primary key in another table
- tuple= one instance of an entity which is intepreted as a row in the table
- Attribute =a column in the table/ an individual data item stored for an entity
- entity=anything that can have data stored about it
- Referential integrity =makes sure that when data is changed the change is reflected in all related
records/the database must not contain any values of foreign key that are not matched with the
corresponding primary key.
RELATIONSHIP
= formed when one table in a database has a foreign key that refers to a primary key in another table in the
database
ENTITY RELATIONSHIP
1. One-to-One
2. One-to-Many
3. Many-to-One
4. Many-toMany
NORMALISATION
= used to construct a relational database
that has integrity and in which data
redundancy is reduced
- table that has not been
normalised appear larger