(Data Types and Compression) A-Level OCR Computer Science

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/75

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

76 Terms

1
New cards

primitive data type

Basic data types e.g. integer, real, Boolean, string which are used and supported by computer hardware

2
New cards

real/float data type

positive and negative decimal numbers (but real types can be integers)

<p>positive and negative decimal numbers (but real types can be integers)</p>
3
New cards

char data type

single letters and symbols

4
New cards

Boolean data type

whether the instance of a string is true or false

5
New cards

why it is important for data to be stored with the right data type

so the right operations can be performed on it

6
New cards

why a phone number should be stored as a string

if it starts with a 0, which numeric data types e.g. integers would cut off, or if it began with a plus sign for a country code

7
New cards

LSB and MSB

LSB of a binary number is furthest to the right, and MSB is furthest to the left

8
New cards

sign and magnitude

The most basic way to represent negative numbers in binary. 0 is positive, 1 is negative

9
New cards

how to make a number negative using sign and magnitude

the MSB (128) becomes the sign bit and no longer represents a weighted value. write the normal number using a 0 or 1 to indicate whether it is positive or negative

10
New cards

two's complement

the MSB becomes negative, then all 1 columns should add to the negative number. Starting form the first 1 column, flip all the bits from right to left (or flip all the bits and add 1)

11
New cards

the largest and smallest number that can be stored by sign and magnitude binary

+127 and -127

12
New cards

disadvantage of sign and magnitude

a bit is lost as the MSB can no longer hold a value

13
New cards

how to subtract in binary

add the negative version of a number (two's complement) to the other

14
New cards

how to convert B7E to denary

(11x16² )+ (7x16) + 14 = 2942

15
New cards

how to convert B7E to binary

convert each hex digit to a binary nibble and combine the nibbles

16
New cards

floating point binary

a method of representing real numbers in binary using a binary point, mantissa and an exponent

17
New cards

why floating point numbers are normalised

to ensure they are as precise as possible in a given number of bits

18
New cards

how to represent positive and negative numbers in floating point binary

starts with 01 for positive numbers, and 10 for negative numbers

19
New cards

Unicode versus ASCII

Unicode uses more bit, so is able to represent more characters for more languages including European symbols, Egyptian hieroglyphics and emojis

20
New cards

a character set

A collection of characters and their unique binary codes which are represented by computers

21
New cards

unsigned binary is used to

represent positive binary numbers

22
New cards

an advantage of sign and magnitude

makes it possible to represent negative numbers

23
New cards

binary borrowing

a method of subtraction to use when x > y

24
New cards

The binary codes of ASCII uppercase letters begin with

01

25
New cards

The binary codes of ASCII lowercase letters begin with

011

26
New cards

The binary codes of ASCII symbols begin with

001

27
New cards

AND bitwise operation

allows you to copy a subset of bits from a binary sequence

28
New cards

Bitwise operations

allows you to check, set, clear and toggle bits

29
New cards

OR bitwise operation

allows you to set a subset of bits in a binary sequence

30
New cards

XOR bitwise operation

allows you to toggle a subset of bits in a binary sequence; where the mask is not applied, bits are copied

31
New cards

ASCII uppercase alphabet

65 to 90

32
New cards

ASCII lowercase alphabet

97 to 122

33
New cards

Why encryption matters

It is used to keep data secure when it is being transmitted

34
New cards

How encryption works

An algorithm is used to scramble data to make it incomprehensible without the use of a key, then this data is transmitted and can be deciphered with the use of the key at its intended destination.

35
New cards

Symmetric encryption

The faster one

36
New cards

The key used in symmetric encryption

The same key is used to encrypt and decrypt the data

37
New cards

Public and private keys are

Mathematically linked

38
New cards

Compression is used to reduce file size

So they are quicker to transfer, so more can be transferred in a given time

39
New cards

Compression is used to reduce bandwidth in order to

make the best use of available bandwidth for data transfers and streaming over the internet

40
New cards

Compression is used to reduce storage requirements

as more files can be stored with the same amount of storage space

41
New cards

Compression is used to reduce download times

as downloading a compressed version of a file is faster than downloading the full version , as the file size is smaller

42
New cards

Compression

The process used to reduce the storage space required by a file, meaning you can store more files with the same amount of storage space

43
New cards

Lossy compression

The size of the file is reduced through the loss of information which cannot be recovered upon decompression

44
New cards

Effects of lossy compression in an image

Grouping similar colours in an image could result in a more pixelated image. This is noticeable

45
New cards

Effects of lossy compression in a video

Loss of similar frames. Not noticeable

46
New cards

Effects of lossy compression in a n audio file

Loss of frequencies in the sound which humans cannot hear. Not noticeable

47
New cards

Lossless compression

The size of the file is reduced through the simplification of information which can be recovered upon decompression

48
New cards

Lossy standards

JPEG, MPEG, MP3

49
New cards

The importance of lossy compression

Test files, executable programs need to have all information recovered upon decompression to be understood

50
New cards

total number of bits

available bits x characters = total number of bits

51
New cards

Lossless standards

ZIP, PNG, GIF

52
New cards

A loss of data results in a

reduction of quality

53
New cards

Run Length Encoding (RLE)

A compression algorithm that represents an image in terms of the length of runs of contiguous and identical pixels

54
New cards

A disadvantage of RLE

it relies on consecutive pieces of data being the same so if there's little repetition, does not offer a great reduction in file size.

55
New cards

Compress AAAAAABBBBBCCC using RLE frequency/data pairs

A6B5C3

56
New cards

Dictionary encoding

Frequently occurring pieces of data are replaced with an index, and compressed data is stored alongside a dictionary which matches this data to an index.

57
New cards

Why the compressed data must be sent alongside the dictionary

So the original data can be restored

58
New cards

How dictionary encoding reduces file size

Any occurrence of the data stored in the dictionary is replaced with its index which reduces the size of the original passage

59
New cards

fixed point binary

a way to represent fractional numbers using a fixed number of bits (the position of the binary point is defined in a fixed position)

60
New cards

the exponent in floating point binary

determines where the position of the binary point will be

61
New cards

the mantissa in floating point binary

the main number, which contains the binary point after the MSB

62
New cards

- it can represent a wide range of numbers, including fractions and integers which is good if you don't know what the range of your calculation results will be

- it can represent both very large and very small numbers by adjusting the binary point

Why floating point is better than fixed

63
New cards

an increased number of bits allocated to the mantissa means

greater precision of the number

64
New cards

an increased number of bits allocated to the exponent means

a larger range of numbers can be represented

65
New cards

when the exponent is negative, the point is moved to the ______ and spaced are infilled with _______

left, spaces are infilled with 1s

66
New cards

when the exponent is positive, the point is moved to the ______ and spaced are infilled with _______

right, spaces are infilled with 0s

67
New cards

salts are used only for

password systems

68
New cards

metadata and hash value

this information affects the hash value that is generated

69
New cards

lossless compression and streaming

it causes buffering and decreases bandwidth as the file size is larger

70
New cards

the sign but does not

affect the original number

71
New cards

the main problem with symmetric encryption

it uses the same key between sender and recipient, and it is this same key that is transmitted over the internet. it also must be kept secure, alongside encrypted data.

72
New cards

the disadvantages of asymmetric encryption

it is computationally expensive, and takes longer

73
New cards

how asymmetric/symmetric encryption can be used together (SSL/TLS)

asymmetric encryption is used to establish a secure session between a client and a server, and then symmetric encryption is used to exchange data within that session.

74
New cards

asymmetric encryption is used to

securely exchange keys

75
New cards

symmetric encryption is used to

encrypt and decrypt data

76
New cards

Not studied (75)

You haven't studied these terms yet.