Because computers use binary to represent all data and instructions
5
New cards
Why do we use hexadecimal?
* Large numbers can be represented using fewer digits e.g. colour values and MAC addresses * Easier for humans to understand than binary
* Simpler to write and check than binary
6
New cards
How can binary be used to represent whole numbers?
In the binary system, each bit represents an increasing power of 2, with the rightmost bit representing 1, the next representing 2, then 4, and so on, thus the value of a binary number is the sum of the powers of 2 represented by each "1" bit
7
New cards
How can hexadecimal be used to represent whole numbers?
In the hexadecimal system, each bit can be digits from 0 to 9, or six alphabetic characters from A to F, which are used to represent decimal values from 10 to 15
8
New cards
How do you convert binary to decimal?
* Write out the powers of 2 * Add up the powers that have a 1 in their binary place value
9
New cards
How do you convert decimal to binary?
* Write out the powers of 2 * Working from the largest value downwards, select the powers that add up to make the required number * Insert a 1 in their binary place value if used, a 0 if not
10
New cards
How do you convert binary to hexadecimal?
* Separate the binary number up into nibbles (groups of 4) * Convert each nibble into decimal * Convert each decimal number into hexadecimal * Concatenate the hexadecimal numbers
11
New cards
How do you convert hexadecimal to binary?
* Separate the hexadecimal number into individual values * Convert each hexadecimal number into decimal * Convert each decimal number into binary nibbles (groups of 4) * Concatenate the binary numbers
12
New cards
How do you convert decimal to hexadecimal?
* Convert the decimal number to binary * Separate the bits into nibbles (groups of 4) * Convert each nibble back into decimal * Convert each decimal number into hexadecimal
13
New cards
How do you convert hexadecimal to decimal?
* Convert each hexadecimal number into decimal * Convert each decimal number to binary * Concatenate the binary numbers * Convert the binary number into decimal
14
New cards
What is a bit?
The fundamental unit of information
15
New cards
How many bits in a byte?
8
16
New cards
How many bytes in a kilobyte?
1000
17
New cards
How many kilobytes in a megabyte?
1000
18
New cards
How many megabytes in a gigabyte?
1000
19
New cards
How many gigabytes in a terabyte?
1000
20
New cards
How do you add binary numbers?
0 + 0 = 0
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
21
New cards
What does a right binary shift do?
Divides by 2
22
New cards
What does a left binary shift do?
Multiplies by 2
23
New cards
Where can binary shifts be used?
To perform simple multiplication/division by powers of 2
24
New cards
What is a character set?
A table of data that links a character to a number, allowing the computer system to convert text into binary
25
New cards
What is 7-bit ASCII?
A 7-bit character set used for representing English keyboard characters, giving a character set of 128 characters
26
New cards
What is Unicode?
A 16-bit character set widely used on the internet, giving a character set of over 65,000 characters
27
New cards
How are character sets used in programming?
They are commonly grouped and run in sequence within encoding tables
28
New cards
Why is Unicode better than ASCII?
* Can have representation of a greater range of characters. * More languages or all modern languages can be represented in one character set * Improved portability of documents in Unicode as each character has a unique representation in Unicode
29
New cards
Unicode uses the same codes as ASCII up to..?
127
30
New cards
What is pixel short for?
Picture element
31
New cards
What is a pixel?
A single point in an image
32
New cards
What is image size?
Width of the image in pixels by the height of the image in pixels i.e. width x height
33
New cards
What is colour depth?
The number of bits used to represent each pixel.
34
New cards
How does a bitmap represent an image using pixels and colour depth?
A grid can be set out and the pixels can be coloured
35
New cards
How can the number of pixels and colour depth affect the file size of a bitmap image?
Higher numbers of pixels and higher colour depths can increase file size
36
New cards
How do you calculate bitmap image file sizes based on the number of pixels and colour depth?
File size = W x H x D
W = image width
H = image height
D = colour depth in bits
37
New cards
How do you convert binary data into a bitmap image?
A simple black and white image only needs to store two colours, black and white, and so an image could store the colours as a simple binary sequence where 0 is white and 1 is black
38
New cards
How do you convert a bitmap image into binary data?
In the image, there are four different colours, each represented by 2 binary digits, thus each colour can be converted into its binary
39
New cards
Why is sound converted?
Because sound is analogue and must be converted to a digital form for storage and processing in a computer
40
New cards
How is sound conversion done?
Analogue signals are sampled to create the digital version of sound
41
New cards
What is a sample?
A measure of amplitude at a point in time
42
New cards
What is sampling rate?
The number of samples taken in a second, usually measured in hertz
43
New cards
What is sampling resolution?
The number of bits per sample
44
New cards
How do you calculate sound file sizes based on the sampling rate and the sample resolution?
File size = rate x res x secs
rate = sampling rate
res = sample resolution
secs = number of seconds
45
New cards
What is data compression?
A method of reducing file sizes, particularly in digital media such as photos, audio and video
46
New cards
Why may data be compressed?
Because large files require lots of storage space, and, because of their size, are difficult to transmit
47
New cards
How can data be compressed using Huffman coding?
It is a form of lossless compression which makes files smaller using the frequency with which characters appear in a message, working particularly well when characters appear multiple times in a string as these can then be represented using fewer bits, reducing the overall size of a file
48
New cards
How do you calculate the number of bits required to store a piece of data compressed using Huffman coding?
Total bits = bits to store each character x frequency of each character
49
New cards
How do you calculate the number of bits required to store a piece of uncompressed data in ASCII?
Bits = number of characters x 7
50
New cards
How can data be compressed using run-length encoding (RLE)?
RLE goes through the text and counts the number of consecutive occurrences of each character, called a run, then the run of the character and the character itself is stored in pairs, reducing the number of bits used to the set of data