fundamentals of data representation Flashcards

You may prefer our related Brainscape-certified 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
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
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
25
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

26
Q

describe Unicode

A

-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

27
Q

character codes are commonly grouped and run in sequence within encoding tables

A

-

28
Q

define character sets

A

a collection of characters that a computer recognises from their binary representation

29
Q

describe the purpose of Unicode

A

to represent characters from all languages and special symbols

30
Q

advantages of Unicode over ASCII

A

-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

31
Q

what is a pixel?

A

-picture element
-a single coloured point in an digital bitmap image
-represented by a binary number

32
Q

describe how pixels relate to an image and the way images are displayed

A

the more pixels and image has, the higher its resolution (clearer picture)

33
Q

describe image size

A

the size of an image is expressed directly as:
width of image in pixels by height of image in pixels
(width x height)

34
Q

what is a bitmap?

A

a format in which images are stored in computer

35
Q

describe colour depth

A

number of bits used to represent each pixel

36
Q

what is the colour depth formula (how many colours can be made)

A

total number of colours = 2ⁿ
(n = number of bits per pixel)

37
Q

describe how a bitmap represents an image using pixels and colour depth

A

-bitmaps are made up of pixels to display an image
-the colour depth determines the range of colours each pixel can display

38
Q

describe using examples how the number of pixels and colour depth can affect the file size of a bitmap image

A

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

39
Q

file size formula

A

file size = width x height (image size) x colour depth (bit)

file size = width x height x colour depth / 8 (bytes)

40
Q

sound is analogue so it must be converted to a digital form for storage and processing in a computer

A

-

41
Q

how do you analogue sound waves?

A
  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
42
Q

what is the device that converts analogue signals into digital data?

A

Analogue-to-Digital Converter (ADC)

43
Q

define a sample

A

a measure of amplitude at a point in time

44
Q

describe sampling rate

A

the number of samples taken per second (1Hz = 1 sample per second)

45
Q

describe sample resolution

A

the number of bits used to store a sample

46
Q

sound file size formula

A

sound file size = sample rate(Hz) x sample resolution x length(s)

47
Q

bit rate formula

A

bit rate = sample rate x sample resolution

48
Q

describe how increases the sample rate and resolution of a sound changes the file size

A

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

49
Q

explain what data compression is

A

-a method of making file sizes smaller
-and trying to keep the compressed file as true to the original as possible

50
Q

why is data compressed?

A

-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

51
Q

describe lossy compression

A

-permanently removes data from the file
-this limits number of bits in the file
-therefore reduces file size

52
Q

describe lossless compression

A

-temporarily removes data to store the file
-then restores it to its original state when opened

53
Q

advantages of lossy compression

A

-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

54
Q

disadvantages of lossy compression

A

-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

55
Q

advantages of lossless compression

A

-data removed temporarily: no reduction in quality
-files can be decompressed (turned back to original file)
-can be used on text and software files

56
Q

disadvantages of lossless compression

A

-small reduction of file size: still takes up a lot of space

57
Q

examples of file types where lossy compression can be used

A

MP3 (audio)
JPEG (image)

58
Q

examples of file types where lossless compression can be used

A

GIF
PNG (image)
PDF

59
Q

explain how data can be compressed using Huffman coding

A

-data that appears MORE frequently
-so assigned SHORTER binary codes
so they take up a SMALLER number of bits
-therefore reducing files size

60
Q

how to calculate the number of bits required to store a piece of uncompressed data in ASCII

A

total bits = number of character x 7

61
Q

explain how data can be compressed using run length encoding (RLE)

A

-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

62
Q

how do you represent data in RLE as frequency/data pairs

A

0000011100000011 can become 5 0 3 1 6 0 2 1