Topic 3 Data Flashcards

1
Q

What is Binary?

A

A system of data representation which uses only 1’s and 0’s. 1 represents on/yes/true and 0 represents off/no/false. This relates directly to transistors in the CPU which can be on or off.

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

What is a bit?

A

A single 1 or 0 in Binary.

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

What is a byte?

A

8 bits in Binary (8 zeros or ones)

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

What is a nibble?

A

4 bits in Binary (half a byte)

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

List the column headings for a full byte.

A

128, 64, 32, 16, 8, 4, 2, 1

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

What is the highest number that can be represented in one full byte?

A

255

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

What is Denary?

A

Also called Decimal number system. Standard system we use using digits 0 - 9.

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

What is an overflow error?

A

An error in a calculation which requires more bits than are available.

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

In Binary, what are the answers to the following: 0 + 0 1 + 0 1 + 1 1 + 1 + 1

A

0 + 0 = 0 1 + 0 = 1 1 + 1 = 10 (the binary code for 2) 1 + 1 + 1 = 11 (the binary code for 3)

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

What effect does a logical shift left have on a Binary number?

A

Multiplies a number by powers of 2. One left shift x 2^1 Two left shifts x 2^2 Three left shifts x 2^3 etc…

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

What effect does a logical shift right have on a Binary number?

A

Divides a number by powers of 2. One right shift / 2^1 Two right shifts / 2^2 Three right shifts /2^3 etc…

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

Describe the sign and magnitude method of representing negative numbers in Binary.

A

The Most Significant Bit (MSB - furthest left) is not used to represent a number, but is used for the sign. 1 means negative. 0 means positive.

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

Why is sign and magnitude not used by computers?

A
  • Zero could be represented as both positive or negative. - Causes errors with binary addition.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe the twos complement method of representing negative numbers in Binary.

A

The Most Significant Bit (MSB - furthest left) is used to represent the negative equivalent of that number. For example in a single byte the columns headings would be: -128, 64, 32, 16, 8, 4, 2, 1

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

When are arithmetic shifts used?

A

Arithmetic shifts are used instead of logical shifts for signed numbers. Left to multiply, right to divide.

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

What is different about carrying out an arithmetic shift as opposed to a logical shift.

A

Arithmetic shifts are used for signed numbers (+ / -) so the MSB must remain the same as the original to

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

Describe the Hexidecimal system or data representation.

A
18
Q

Explain how to convert an 8 bit Binary number directly into Hexidecimal (without first converting to Denary).

A
19
Q

List four uses of Hexidecimal.

A

Used to help humans cope with long strings of binary digits, as Hex numbers are shorter.

Errors codes are usually given as Hex values.

Used to represent numerical values in assembly language.

20
Q

In most computers, how are characters and text represented?

A
21
Q

Describe ASCII code.

A
22
Q

What is meant by a character set?

A
23
Q

How many characters can be represented using standard ASCII code?

A
24
Q

If the ASCII code for the character ‘C’ is 67, how could you work out the ASCII code for the character ‘M’.

A

As the codes are consecutive you can work out the number of characters between C and M, and then add this number to 67 to work out the code for M.

Answer = 77

25
Q

How can you calcate the file size of an image?

A

This depends on the image size (WxH) and the colour depth (D):

The calculation is W x H x D

The better the image quality, the higher the file size.

26
Q

A 24 bit image has the dimensions 200 x 300. Construct an expression to calculate the size of the image in MB.

A

(200 x 300 x 24 ) / 8 / 1024 / 1024

Dividing by 8 converts bits to bytes.

Dividing by 1024 once converts bytes to KB

Dividing by 1024 again converts KB to MB

27
Q

What is sound sampling?

A

Sound is an analogue form of data. To convert it to digital you need to take a sample of the sound at particular intervals called the sample frequency. The higher the sample frequency, the higher the quality of the digital sound.

28
Q

Construct an express to calculate the size of an audio file.

A

Sample frequency x bit depth x recording length in seconds

29
Q

Construct an expression to calculate the size in MB of a digital audio file of 4 minutes with a sample frequency of 44.1 KHz and a resolution of 24 bits.

A

Sample frequency x resolution x recording length in seconds

( 44100 x 24 x 240 ) / 8 / 1024 / 1024

30
Q

How are binary digits represented inside the computer?

A

A computer processor uses billions of transistors acting as switches. These can either be ON (1) or OFF(0).

31
Q

Describe lossless compression and give examples of its use.

A
  • Reduces file size without deleting any data
  • Nothing is lost
  • Works by looking for redundancy where same data is stored many times
  • Used for text files, or smaller graphic files
  • Not so good for audio files or larger image files
32
Q

Describe lossy compression and give examples of its use.

A
  • Reduces the file size by deleting some data
  • The original can never be reconstructed
  • It works in image files by analysing the image to find areas with slight differences which are given the same value to reduce the number of bits
  • It works in audio files by removing small differences in frequency, tone and volume
  • Not so good for text files
33
Q

Convert the string below using run-length encoding. What is the file size before and after?

ggggfffoooooyyeeee

A

After RLE the string is:

4g3f5o2y4e

Before RLE file size is 18 bytes

After RLE file size is 10 bytes

34
Q

What is the purpose of encryption?

A

Encryption scrambles sensitive data to ensure only authorised people can read it.

35
Q

What is symmetric encryption?

A

Encryption methods which use the same key to both encrypt and decryt the data.

36
Q

Describe asymmetric encryption.

A

Asymmetric encryption used two different keys to encrypt and decrypt the message.

A message encrypted with a public key, can only be decypted by the corresponding private key (and vice versa).

37
Q

Describe the Caeser Cipher method of encryption.

A

Each character in a message is replaced by another character by shifting each by a number known as the key.

38
Q

How is data encrypted on the internet?

A

By using the HTTPS protocol.

This is the HTTP protocol with the SSL/TLS protocol added to it.

39
Q

Describe the following terms used in databases:

  1. Attribute
  2. Table
  3. Primary Key
  4. Entity
  5. Foreign Key
A
  1. Attribute - a property / fieldname of an entity (eg Surname of STUDENT)
  2. Table - Representation of an entity. (eg STUDENT table contains fieldname and records about students)
  3. Primary Key - Unique identified for each record in a table
  4. Entity - An object/thing represented in a database (eg STUDENT, CLASSROOM, CAR, REG-NO etc)
  5. Foreign Key - A primary key from another table inserted into another table as a link in a relational database
40
Q
A