Computer Science notes
Computer Science notes
1. Binary System:
o Binary is a base-2 number system using digits 0 and 1.
o Computers use binary because they work with transistors that can be on (1)
or off (0), making binary an efficient representation for data.
2. Denary System:
o Denary is a base-10 system, commonly used by humans, with digits ranging
from 0 to 9.
3. Conversions:
o Binary to Denary: Convert binary values (e.g., 101 in binary) into their
decimal (denary) equivalent. (Draw a table)
o Denary to Binary: Convert decimal numbers (e.g., 5 in decimal) into binary.
(Successive division of 2)
o Hexadecimal to Binary: Convert hex values (e.g., A in hexadecimal) to
binary. (Use tables and convert)
o Binary to Hexadecimal: Convert binary numbers (e.g., 101 in binary) to hex.
(Divide in chunks, each with 4 binary digits, then use table).
o Denary to Hexadecimal: Convert decimal values into hex.
o Hexadecimal to Denary: Convert hex values into decimal. (Successive
division with 16 or first convert to binary, then to hexa).
o Examples provided for each conversion type with correct solutions. (Multiply
with powers of 16)
2. IP Address:
o An IP (Internet Protocol) address identifies devices on a network and allows
them to communicate. It is typically assigned temporarily and can change
over time.
3. Data Packets:
o Data is split into small chunks (packets) to be sent across the network,
improving efficiency and reducing congestion.
o Each packet contains header information (destination address, data length)
and payload (the actual data).
o We also have trailer that detects errors, and ensures data accuracy.
4. Packet switching: data is broken down into packets, each packet could take a
different route, at each stage in the transmission, there are nodes that contain a router
Compression:
1. Lossy Compression:
o Lossy compression reduces file size by permanently removing data (e.g.,
JPEG, MP3, MPEG).
o The benefit is greater compression and faster loading times, but the
drawback is loss of data and quality.
2. Lossless Compression:
o Lossless compression reduces file size without losing any data, making it
reversible (e.g., PNG, GIF, ZIP).
o It does not degrade quality, but the compression ratio is typically lower than
lossy compression.
2. Sampling Resolution:
o Sampling resolution refers to the number of bits used for each sample. Higher
resolution means more accurate representation of the sound, but it increases
the file size.
3. Colour Depth:
o Colour depth is the number of bits used to represent the colour of each pixel in
an image.
o Higher colour depth means more colours are possible, resulting in richer
image quality, but it also increases file size.
4. Resolution:
o Resolution refers to the number of pixels in an image. Higher resolution
improves image quality by capturing more detail but also increases the file
size.