Computer Science Assessment Guide
Computer Science Assessment Guide
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:
+ -
❖ 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
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
❖ 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
Pros Cons
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
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