fundamentals of data representation Flashcards

1
Q

what is decimal (base 10)?

A

-uses 10 digits (0 to 9)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is binary (base 2)?

A

-uses 2 digits (0 and 1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is hexadecimal (base 16)?

A

-uses 16 digits (0 to 15)
-each hex digit equates to a nibble (4 bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what do computer use binary for?

A

-representing all data and instructions
-each pattern represents different types of data (e.g. text, images, sound, integer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

explain why hexadecimal is often used in computer science

A

SHORTER:
-easier to understand and remember than binary
-less chance of input errors
-easier to convert binary –> hex than binary –> decimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how can binary be used to represent whole numbers

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how can hexadecimal be used to represent whole numbers

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how to convert binary to decimal

A
  1. draw a table with binary place values on top (128,64,32,8,4,2,1)
  2. fill in binary number into table
  3. add up the numbers with a 1 in the column
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to convert decimal to binary

A
  1. draw a table with binary place values on top (128,64,32,8,4,2,1)
  2. from left to right subtract the number in each column from running total IF it gives a positive number
  3. put 0 in the column that give a negative number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how to convert hexadecimal to binary

A
  1. find decimal value of each hex digit
  2. draw 2 tables with place values (8,4,2,1)
  3. fill in table with decimal numbers
    4.put nibbles together to make binary number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how to convert binary to hexadecimal

A
  1. split binary number into nibbles (2 parts of 4)
  2. draw 2 tables with place values (8,4,2,1)
  3. fill in table with binary number
  4. add up number in columns with a 1
  5. convert value into hex (0-9, then A-F)
  6. put the hex values together
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

if you can’t split binary number into nibbles, add 0s to the front

A

-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how to convert decimal to hexadecimal

A
  1. draw table with place values (16,1)
  2. from left divide number by 16
  3. divide the remainder by 1
    4.goes from 0-9 then A-F
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how to convert hexadecimal to decimal

A
  1. draw table with place values (16,1)
  2. fill in hex number
  3. multiply the numbers in each column with place values
  4. add up numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is a bit? how is it represented?

A

b
the smallest fundamental unit of information
either a 0 or 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is a byte? how is it represented?

A

B
a group of 8 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what is a nibble?

A

4 bits / half a byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what are the names, symbols, and values of quantities of bytes?

A

kilobyte (kB) - 1,000 bytes (10³)
megabyte (MB) - 1,000 kilobytes (10⁶)
gigabyte (GB) - 1,000 Megabytes (10⁹)
terabyte (TB) - 1,000 Gigabytes (10¹²)

Keep, Growing, Massive, Trees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

how to add binary numbers

A

0 + 0 = 0
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what happens if you binary shift a number to the left?

A

MULTIPLIES NUMBER
every place shifted to the left, number is DOUBLED

e.g. shifted 4 places left = doubled 4 times (multiplied by 2⁴ = 16)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what happens when you binary shift to the right?

A

DIVIDES NUMBER
every place shifted to the right, number is HALVED

e.g. shifted 3 places right = halved 3 times (divided by 2³ = 8)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

describe situations where binary shifts can be used

A

binary shifts can be used to perform simple multiplication/division by powers of 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what does ASCII stand for?

A

American Standard Code for Information Interchange

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

describe 7-bit ASCII

A

-represents characters in the English language
-has a character set of 128 or 256 (8 bits)
-if an extra 0 is added, each character can fit in 1 byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
describe Unicode
-represents characters for all languages in the world -the first 128 Unicode characters are the same as ASCII -uses multiple bytes for each character -allows symbols and emojis
26
character codes are commonly grouped and run in sequence within encoding tables
-
27
define character sets
a collection of characters that a computer recognises from their binary representation
28
describe the purpose of Unicode
to represent characters from all languages and special symbols
29
advantages of Unicode over ASCII
-larger character set: has a larger number of bits to store character codes -supports multiple languages: allows for multilingual text and special characters whereas ASCII only supports English
30
what is a pixel?
-picture element -a single coloured point in an digital bitmap image -represented by a binary number
31
describe how pixels relate to an image and the way images are displayed
the more pixels and image has, the higher its resolution (clearer picture)
32
describe image size
the size of an image is expressed directly as: width of image in pixels by height of image in pixels (width x height)
33
what is a bitmap?
a format in which images are stored in computer
34
describe colour depth
number of bits used to represent each pixel
35
what is the colour depth formula (how many colours can be made)
total number of colours = 2ⁿ (n = number of bits per pixel)
36
describe how a bitmap represents an image using pixels and colour depth
-bitmaps are made up of pixels to display an image -the colour depth determines the range of colours each pixel can display
37
describe using examples how the number of pixels and colour depth can affect the file size of a bitmap image
the better quality an image is, the more pixels it is made out of, therefore width and height of image increases, which increases file size the more colour an image requires, the more bits per pixel is needed, therefore increases the colour depth, which increases the file size
38
file size formula
file size = width x height (image size) x colour depth (bit) file size = width x height x colour depth / 8 (bytes)
39
sound is analogue so it must be converted to a digital form for storage and processing in a computer
-
40
how do you analogue sound waves?
1. analogue sound is recorded by a microphone 2. it is converted into analogue signals 3. the amplitude (height) of wave is sampled at regular intervals 4. rounds the data so data is no longer continuous 5. data is stored as a series of binary numbers
41
what is the device that converts analogue signals into digital data?
Analogue-to-Digital Converter (ADC)
42
define a sample
a measure of amplitude at a point in time
43
describe sampling rate
the number of samples taken per second (1Hz = 1 sample per second)
44
describe sample resolution
the number of bits used to store a sample
45
sound file size formula
sound file size = sample rate(Hz) x sample resolution x length(s)
46
bit rate formula
bit rate = sample rate x sample resolution
47
describe how increases the sample rate and resolution of a sound changes the file size
increasing sample rate means sampling more often and losing less data. the sampled sound will be better quality and a closer match to original recording, will increase file size increasing sample resolution can pick up quieter sounds. the sampled sound will be a closer match to the original recording, will increase file size
48
explain what data compression is
-a method of making file sizes smaller -and trying to keep the compressed file as true to the original as possible
49
why is data compressed? (4)
-to reduce time needed to send a file -so files take up less storage space on devices -so streaming/downloading files from the internet is quicker and takes up less bandwidth -allowing larger files to be sent as an email attachment
50
describe lossy compression
-permanently removes data from the file -this limits number of bits in the file -therefore reduces file size
51
describe lossless compression
-temporarily removes data to store the file -then restores it to its original state when opened
52
advantages of lossy compression
-greatly reduced file size: more files can be stored -files take up less bandwidth: files can be downloaded/streamed quicker -commonly used: lots of softwares can read lossy files
53
disadvantages of lossy compression
-loses data: file cannot go back to its original file -cannot be used of text or software files: these files need to retain all original information -worse quality: data is lost, however is unnoticeable
54
advantages of lossless compression
-data removed temporarily: no reduction in quality -files can be decompressed (turned back to original file) -can be used on text and software files
55
disadvantages of lossless compression
-small reduction of file size: still takes up a lot of space
56
examples of file types where lossy compression can be used
MP3 (audio) JPEG (image)
57
examples of file types where lossless compression can be used
GIF PNG (image) PDF
58
explain how data can be compressed using Huffman coding
-data that appears MORE frequently -so assigned SHORTER binary codes so they take up a SMALLER number of bits -therefore reducing files size
59
how to calculate the number of bits required to store a piece of uncompressed data in ASCII
total bits = number of character x 7
60
explain how data can be compressed using run length encoding (RLE)
-lossless compression done by specifying the number of times a character or pixel colour repeats followed by the value of the character or pixel -creating frequency/data pairs to reduce amount of data stored
61
how do you represent data in RLE as frequency/data pairs
0000011100000011 can become 5 0 3 1 6 0 2 1