0% found this document useful (0 votes)
20 views13 pages

Computer Science Assessment Guide

This document provides an overview of key concepts in computer science including: - Binary and hexadecimal number systems and their uses like IP addresses and error codes. - Character sets like ASCII and Unicode and how they represent different languages. - How sound and images are represented digitally through sampling, bit depth, resolution and file compression techniques. - Units and prefixes for measuring data storage capacity from bits to exabytes. - The differences between lossy and lossless data compression and examples like JPEG, MP3, and RLE encoding.

Uploaded by

frayashtia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views13 pages

Computer Science Assessment Guide

This document provides an overview of key concepts in computer science including: - Binary and hexadecimal number systems and their uses like IP addresses and error codes. - Character sets like ASCII and Unicode and how they represent different languages. - How sound and images are represented digitally through sampling, bit depth, resolution and file compression techniques. - Units and prefixes for measuring data storage capacity from bits to exabytes. - The differences between lossy and lossless data compression and examples like JPEG, MP3, and RLE encoding.

Uploaded by

frayashtia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Computer Science Assessment Guide

Chapters 1, 2, 7(flowcharts), 8.1

Chapter 1.1
❖ The binary number system is a base 2 number system and only utilizes
the values 1 & 2.
❖ The hexadecimal number system is a base 10 system.
❖ Uses of the Hexadecimal System
➢ Error Codes - refers to memory location of the eros and are
automatically generated:
■ Example, 101 and 401
■ Mistakes are less likely and easier to track with hexadecimal
number system
➢ MAC Address (Media Access Control Address) - refers to a number
which uniquely identifies a device on a network
■ NN-NN-NN-DD-DD-DD or NN:NN:NN:DD:DD:DD
■ N = No. of manufacturer D = Serial Number
➢ IP Address (Internet Protocol Address) - given to a device
connected to a network
■ IPv4 is a 32 bit number and uses ‘.’
■ IPv6 is a 128 bit number and uses ‘:’
➢ Hypertext Mark-up Language (HTML) color codes
■ #xxxxxx
■ Red:green:blue
❖ Overflow error - a number is too big to be stored in the computer using 8
bits
❖ Logical Binary Shifts
➢ A shift to the left = multiplying the number by 2
➢ A shift to the right = dividing the number by 2
➢ Losing 1 bit following a shift operation causes an error
➢ Left-most bit = most significant bit
❖ Two’s Complement (Negative numbers)
➢ Convert absolute value into binary
➢ 1’s complement (flipping)
➢ 2’s complement(adding 1)
➢ The 8th most bit is taken to be negative 128 -> -128

Chapter 1.2
❖ Characters sets - ASCII(American Standard for Code Information
Interchange) and Unicode
➢ A character or symbol present on the keyboard had a specific
character code consisting of numbers.
➢ A code is generated for each character or symbol whilst typing on a
keyboard which then is converted to its character or symbol for
displaying/printing purposes.
➢ ASCII is a 7 bit set of codes that can represent 128 different
characters.
➢ Consists of lowercase and uppercase letters, digits, punctuation
marks, special and control characters.
➢ ASCII code is used for english only.
➢ Extended ASCII consists of 8 bit characters and thus can represent
256 different characters.
➢ Allows for some non-english and graphical characters.
➢ Unicode can represent all languages in the world - supports
countless operating systems, search engines and internet
browsers used globally.
➢ ASCII uses 1 byte per character whereas unicode supports upto 4
bytes per character.
➢ Was a 16-bit system(65000 characters) but now is a 32 bit system.
❖ 5 goals published with the first version of Unicode:
➢ Create a universal standard supporting all languages and writing
systems
➢ Produce a more efficient coding system than ASCII
➢ Adopt uniform coding where each character is encoded in 32 or
16-bit code
➢ Create unambiguous encoding where each 16-bit and 32-bit value
always represents the same character
➢ Reserve a part of the code for private use enabling users to assign
codes for their own characters and symbols (useful for japanese
and chinese characters)
❖ Representation of Sound
➢ Sound when produced is in analogue form, that is continuous
varying data.
➢ Computers are unable to work with analogue data, thus it gets
sampled.
➢ Sampling - measuring the amplitude of the sound wave via an
adc(analogue to digital converter)
➢ It is the process that converts analogue sound into discrete digital
data which can be stored in a computer.
➢ The sound waves are sampled at regular time intervals. The
amplitude of the sound cannot be measured precisely, so approx
values are stored.
➢ Sampling Rate - no. of samples per second
➢ Bit depth - no. of bits used to represent each clip (sampling
resolution)
➢ Bit rate - no. of bits per second of the audio
➢ Using a high sampling resolution:
+ -

Better dynamic range Produces larger file size

Less sound distortion Takes longer to be


transmitted/downloaded

Better quality Required greater processing


power
➢ Sampling Rate:
■ Higher the sampling rate, higher the sound quality as ups
and downs of the sound waves can be recorded more clearly
■ Unit - Hertz
■ Each sample represents amplitude
➢ Bit Depth
■ A CD has a bit depth of 16 bits whilst a DVD has one of 24
bits.
❖ Representation of (bitmap) Images
➢ Bitmap images are made up of pixels (picture elements): an image
is made up of a two-dimensional matrix of pixels.
➢ Pixels are the smallest addressable unit in a raster image, each
pixel can be represented through a binary number and can take
different shapes.
➢ Black an white images only require 1 bit per pixel; each pixel can be
1 or 0 corresponding to one of those 2 colors.
➢ 2^n=Colour depth
➢ No. of bits used to represent each color is called depth.
➢ Modern computers have a 24 bit color depth - over 16 millions
different can be represented with x pixels, 2^x colors can be
represented as a generalization.
➢ Increasing color depth also increases the size of the file when
storing an image.
➢ Low resolution = low detail
➢ High resolution = increase in detail, no. of pixels and thus file size
➢ This impacts the amount of images that can be stored and the time
to download an image from the internet or transferring images
from device to device.
➢ A certain amount of reduction in resolution of an image is possible
until the loss of quality becomes noticeable.
❖ Measurement of Data Storage
➢ A bit is the basic unit of all computing storage terms and is either 1
or 0.
➢ A byte is the smallest unit of memory in a computer. 1 byte consists
of 8 bits and half a byte is called a nibble (4 bits).

1 kilobyte 1 000 bytes

1 megabyte 1 000 000 bytes

1 gigabyte 1 000 000 000 bytes

1 terabyte 1 000 000 000 000 bytes

1 petabyte 1 00 000 000 000 bytes


000

1 exabyte 1 000 000 000 000 bytes


000 000
1 kibibyte 2^10 1024 bytes

1 mebibyte 2^20 or 1024 x 1024 bytes


etc.

1 gibibyte 2^30 bytes

1 tebibyte 2^40 bytes

1 pebibyte 2^50 bytes

1 exbibyte 2^60 bytes

❖ Calculation in File Size


➢ Image resolution = pixels x color depth (bits)
➢ Mono sound file = sample(in hz) x sample resolution(bits) x length
of sample (secs)
➢ Stereo sound file = aforementioned formula for mono sound file x2
➢ Bit rate(sound) = sampling rate x bit depth x channels

❖ Data Compression
➢ Lossy file compression algorithm eliminates unnecessary data
from the file. The original can’t be reconstructed.
➢ Results in some loss of detail.
➢ Applying lossy file compression to
■ An image - reduce resolution &/or color/bit depths
■ A sound file - may reduce sampling rate and/or resolution

➢ Lossy files are smaller than lossless files which is of great benefit
considering storage and data transfer requirements.
➢ MP3 Files:
■ Playing music on computer/mobile phones
■ Reduces the size of a normal music file by 90%
■ Satisfactory quality even if not better than CDs or DVDs
■ Removal of sounds which are played simultaneously - only
the louder one can be heard and thus the softer one is
removed. This is called perpetual music shaping.
■ MP4 allows the storage of multimedia files rather than just
sound, this is a lossy file compression whilst still retaining
an acceptable quality of sounds and video.
➢ JPEG Files:
■ Lossy file compression algorithm used for bitmap images
■ Human eyes can’t detect differences in color shades quite as
well as they detect differences in image brightness
■ By separating pixel colors from brightness, images can be
split into 8x8 pixel blocks, for example, which enable certain
information to be discarded from the image without causing
any real deterioration in quality.
➢ With lossless file compression, all the data from the original
uncompressed file can be reconstructed. This is particularly
important for files where any loss of data would be disastrous.
➢ Lossless file compression is designed so that none of the original
detail from the file is lost.
❖ RLE ( Run-length encoding) can be useful for lossless compression of a
number of different file formats
➢ Form of lossless/reversible file compression
➢ Reduces the size of a string adjacent, identical data
➢ A repeated string is encoded in two values:
● The first value represents the no. of identical data
items
● The second value represents the code of the data item
➢ RLE is only effective when this is a long run of repeated units/bits

Chapter 2
❖ Data packet - a small part of a message/data that is transmitted over a
network; after transmission all the data packets are reassembled to from
the original message/data
❖ Typically 64 Kib, each packet can be sent along a different route to its
destination.
❖ Beneficial if a particular transmission route is busy/inactive
❖ Disadvantageous due to the need to reassemble data when it reaches it’s
destination
❖ Packet Structure:

Header Payload Trailer

Contains the IP Actual data being Indicates the end of


address of the sender carried in a data the data packet and
and receiver, and packet (usually 64 KiB) the cyclic redundancy
includes packet error check
number and size
enabling the
reassembly of the
data packets
❖ Cyclic Redundancy - An error-checking method in which all the 1-bits on
the data packet payload are added and the total is stored in the packet
trailer; the same calculation is repeated at the receiving station.
❖ Checks the value against one sent in the trailer - if it is identical, then no
transmission errors have occurred otherwise the packet needs to be
re-sent.
❖ Packet-switching - a method of transmission in which a message is
broken into many data packets which can be sent along pathways
independently of each other.
❖ Node - stages in a network which receive and transmit data packets (ex.
routers)

1. Each packet will follow its own path after being assigned an IP address.
2. Router determines the route of each packet
3. Routing selection depends on the no. of packets waiting to be processed
at each node
4. Shortest available path is always selected
5. Packets can reach in a different order to that in which they were sent

Pros Cons

No single communication line Packets can be lost and need to be


resent
Re-routing packets More prone to errors (with
real-time streaming)

Easy to expand Delay at destination whilst


packets are being reordered

High data transmission rate is


possible

3 factors to be considered when transmitting data:


1. Direction of Transmission
2. Method of Transmission
3. Data Synchronisation

❖ Simplex Data Transmission - can send data in one direction only (ex.
Computer to print)
❖ Half-duplex transmission - both directions but not simultaneously (Ex.
broadband internet connection)
❖ Full-duplex transmission - both directions and simultaneously

❖ Serial Data Transmission - data is sent one bit at a time over a single
wire/channel
❖ Parallel data transmission - several bits of data (usually one byte) are
sent down several channels/wires simultaneously
Serial Parallel

Less risk of external interference Faster rate of data transmission


(due to fewer wires) than serial

More reliable transmission over Works well over shorter


long distances distances(used in internal
pathways on computer circuit
boards)

Transmitted bits won't have the Since several channels/wired


risk of being skewed (out of used to transmit data, the bits can
synchronization) arrive out of
synchronization(skewed)
Used if the amount of data being Preferred method when speed is
sent is relatively small as important
transmission rates are slower
than parallel

Used to send data over long If data is time-sensitive, parallel is


distances the most appropriate
transmission method

Less expensive than parallel due Parallel ports require more


to fewer hardware requirements hardware , making them more
expensive to implement than
serial ports

Easier to input/output operations


when parallel is used

❖ Universal Serial Bus (USB) is a form of serial data transmission -


allowing both half-duplex and full-duplex data transmission.
❖ Wires for power (red and black) Wires for transmission (white and
green)

1. The computer automatically detects a device is present


2. The appropriate device driver software is loaded up so that the computer
and device can communicate effectively.
3. If the device driver is not available, the user is prompted to download the
suitable driver software.

Pros Cons

Devices plugged into the computer Standard USB supports a max


are automatically detected and length of 5 m(USB hub is required
device drivers are automatically for greater lengths)
loaded up

Connections can only fit one way Even though USB is backward
preventing incorrect connections compatible, very early USB
being made standards may not always be
supported by the latest computers

Industry standard - considerable Slow data transfer rates


support is available

Can support different


transmission rates (1.5 Mbps to 5
Gps)

No need for external power source


since cable supplies +5 v power

USB protocol notifies the


transmitter to re-transmit data is
andy errors are detected thus
there is error-free data
transmission

Relatively easy to add more USB


ports by using USB hubs

USB is backward compatible (older


versions are still supported)

Errors can occur during data transmission due to:


❖ Interference (electrical interference - data can be corrupted/lost)
❖ Problems during packet switching (dats loss or gain)
❖ Skewing of data (occurs during parallel data transmission and can cause
data corruption if the bits arrive out of synchronization).

❖ Parity Checks - a method used to check if data has been transmitted


properly, it makes use of even parity (even number of 1-bite) or odd parity
(odd number of 1-bits)
❖ Parity bit - a bit (either 0 or 1) added to a byte of data in the most
significant bit position; ensures that the byte follows the correct even
parity or odd parity protocol.
❖ Parity byte - ab extra parity byte of data sent at the end of a parity block;
composed of the parity bits generated from a vertical parity check of the
data block.
❖ Parity block - a horizontal and vertical parity check on a block of data
being transmitted

Checksum
❖ A verification method used to check if data transferred has been altered
or corrupted; calculated from the block of data being sent;mthe
checksum value is sent after each data block.
Process
1. When a block of data is about to be transmitted, the checksum is
calculated from the block of data
2. The calculation is done using an agreed algorithm (this algorithm
has been agreed by the sender and the receiver)
3. The checksum is then transmitted with the block of data
4. At the receiving end, the checksum is recalculated by the computer
using the block of data (the shred algorithm is used to find
checksum)
5. The recalculated checksum is then compared to the checksum sent
with the data block
6. If the two checksums are the same, then no transmission errors
have occurred otherwise a request is made to resend the block of
data.

Echo Check
❖ A method used to check if data has been transferred correctly; data is
sent to the receiver and then immediately sent back to the sender; the
sender then checks if the received data matches the sent data.

Check Digit
❖ An additional digit appended to a number to check if the entered number
is error-free; check digit is a data entry check and not a data transmission
check. Ex. ISBN (International Standard Book Numbers) and Vehicle
Identification Numbers (VIN)
❖ Two common methods:
➢ ISBN 13
➢ Modulo-11

❖ Automatic repeat request - a method of checking transmitted data


for errors; it makes use of acknowledgement and timeout to
automatically request re-sending of data if the time-interval
before positive acknowledgment is too long.
❖ ARQ is often used by mobile phone networks to guarantee data
integrity.
❖ Acknowledgment - a message sent to the receiver indicating that
data has been received correctly (used in ARQ error detection
method)
❖ Timeout - the time interval allowed to elapse before
acknowledgement is received.

❖ Encryption - the process of making data meaningless using encryption


keys; without the correct decryption key the data can’t be decoded.
❖ Eavesdropper - another name for a hacker who intercepts data being
transmitted on a wired/wireless network.
❖ Plaintext - the original text/message before it is put through and
encryption algorithm
❖ Ciphertext - encrypted data that is the result of putting plaintext
message through an encryption algorithm.
❖ Encryption Algorithm - a complex piece of software that takes plaintext
and generates an encrypted string known as ciphertext.
❖ Symmetric Encryption - a type of encryption in which the same
encryption key is used to decrypt and encrypt a message and hence an
issue of security is present.
❖ Asymmetric Encryption - a type of encryption that uses public keys and
private keys to ensure data is secure.
❖ Quantum computer - a computer which can perform quick calculations.].
\

You might also like