Organisation and structure of data #4 Flashcards

1
Q

What are the 3 different counting systems in computers?

A

Denary
Binary
Hexadecimal

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

How does denary work?

A

also known as the base₁₀ counting system. the digits 0₁₀ 1₁₀ 2₁₀ 3₁₀ 4₁₀ 5₁₀ 6₁₀ 7₁₀ 8₁₀ 9₁₀ are used to represent umbers.

eg. 138₁₀ means
1 ‘hundred’
3 ‘tens’
8 ‘units’

giving the total number 138

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

How does binary work?

A

‘B’inary digI’Ts’, also known as BITs

a BIT is either a 1₂ or 0₂

you may think of this as a light switch, where if the switch is on, it is stored as the digit 1
if the switch is off, its stored as the digit 0

IT IS BASE 2 COUNTING SYSTEM

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

How does hexadecimal work?

A
  • Also known as the base₁₆ counting system.

the digits 0₁₆ 1₁₆ 2₁₆ 3₁₆ 4₁₆ 5₁₆ 6₁₆ 7₁₆ 8₁₆ 9₁₆ represent 1-9

the characters A₁₆ B₁₆ C₁₆ D₁₆ E₁₆ F₁₆ represent 10-15

e.g. 8A₁₆ means
8 ‘sixteens’
10 ‘units’

giving the total number 138

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

How to perform Denary to binary?

A

Create a base 2 table
(somewhat ok representation)

128|64|32|16|8|4|2|1|
[ ][ ][ ][ ][ ][ ][ ][ ]

To convert 198₁₀ into binary, it’ll just look like this

128|64|32|16|8|4|2|1|
1 1 0 0 0 1 1 0

11000110₂

Hopefully self explanatory, like they all add up 198

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

How to perform Denary to hexadecimal?

A

Create a base 16 table
(somewhat ok representation)

256|16|1
[ ][ ][ ]

To convert 198₁₀ think about the hexadecimal digits and characters

256|16|1
0 C 6

Adds up to 198 and also it would be C6₁₆

(you should have a calculator, now its just all up to your maths skills)

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

How to perform Binary to denary?

A

Create base 2 table
(insert the binary in table)

00100011₂

128|64|32|16|8|4|2|1|
0 0 1 0 0 0 1 1

and ye thats 35₁₀

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

How to perform Binary to hexadecimal?

A

Create base 2 table
(insert the binary in table)

00101011₂

128|64|32|16|8|4|2|1|
0 0 1 0 1 0 1 1

Split it to 4-bit base 2 tables

128|64|32|16—————–8|4|2|1|
0 0 1 0——————1 0 1 1
=
8|4|2|1|—————-8|4|2|1|
0 0 1 0——————-1 0 1 1

Think about hexadecimal digits and characters
= 2B₁₆

256|16|1
0 2 B

”-“ = fuuuuuucking space

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

How to perform Hexadecimal to denary?

A

Create base 16 table
(insert hexadecimal in table)

C6₁₆

256|16|1
0 C 6

Then multiply each heading

C(12) x 16 = 192₁₀
6 x 1 = 6₁₀

192₁₀+6₁₀
= 198₁₀

^^^^ the denary number

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

How to perform hexadecimal to binary?

A

Create 2 4-bit base 2 tables

8|4|2|1|————– 8|4|2|1|
[] [] [] [] ————— [] [] [] []

Convert hexadecimal number 2B₁₆
start with 2

8|4|2|1|—————-8|4|2|1|
0 0 1 0 —————- [] [] [] []

then B (think about hexadecimal digits and characters)

8|4|2|1|————— 8|4|2|1|
0 0 1 0 —————–1 0 1 1

connect 4-bit tables as 8-bit table

128|64|32|16|8|4|2|1|
0 0 1 0 1 0 1 1

Binary = 0010101₂

”-“ = space, fucking space

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

What are arithmetic shift functions?

A

Manipulations of bit patterns for 8-bit registers

(think of it as like x10 or /10)

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

Arithmetic shift right 01000000₂ by 2

A

01000000₂

00010000₂

You need workings out for the mark sooo idk
write down og denary number to new denary number

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

Arithmetic shift left 01111001₂ by 1

A

01111001₂

11110010₂

You need workings out for the mark sooo idk
write down og denary number to new denary number

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

Explain binary addition

A

0₂ + 0₂ = 0₂
1₂ + 0₂ = 1₂
1₂ + 1₂ = 10₂ (which is 0 and a carry of 1)

Remember this

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

Solve
1₂+11₂= ?

A

Calculations:
____1₂
+ 1 1₂

Start from right then left

1₂ + 1₂ = 10₂ = 0₂ carry 1

Last digit is 0

Next column becomes:

0₂ + 1₂ + 1₂ due to the carried 1

0₂ + 1₂ + 1₂ = 10₂ = 0₂ carry 1

Next digit is 0 but then since theres no other column, 1 remains which is the last digit

answer = 100₂

”-“ = fuckign space

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

Solve
1010₂ + 11₂ = ?

A

Calculations:
1 0 1 0₂
+ 1 1₂

First column:
0₂ + 1₂ = 1₂
Last digit = 1

Second column:
1₂ + 1₂ = 0₂ carry 1
Next digit = 0₂

Third column:
0₂ + 0₂ + 1₂ = 1₂ (due to carried 1)
Next digit = 1₂

Final column:
1₂ + 0₂ = 1₂ <– final digit

answer = 1101₂

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

Now solve
100101₂ + 10101₂ = ?

(this time no calculations so idk use a paper)
(u cba to use paper, so u winging this shit)

A

Answer = 111010₂

(Calculations on page 60)

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

What’s different with sound in terms of signals?

A

It is an analogue signal

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

How can sound be stored in a pc?

A

Converts into a digital signal to become processed

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

Whats the method of converting sound into a digital signal?

A

Sampling

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

What is sampling?

A
  • When hardware (microphone)
  • Measures level of sound
  • Many times per second
  • And records it as binary digits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Look at page 61 for diagram of sampling analogue sound

A

Whatever

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

What are the 3 digital audio quality?

A

Sample rate
Bit depth
Bit rate

24
Q

Define sample rate

A

Number of audio samples captured each second

25
Define bit depth
Number of bits available each clip
26
Define bit rate
Number of bits used each second of audio
27
Definition of sampling frequency?
Number of times sound level sampled per second
28
Unit for sampling frequency?
kHz
29
Higher the sampling freq. = ?
Better quality of sound recorded
30
Typical sampling frequency?
44,000 kHz
31
How is an image represented by pixels in binary format?
Look at page 62.
32
How is a colour bitmap image stored?
* Replacing 1s and 0s with longer number * that represents how much red, green and blue (RGB) * required in colour of each pixel (colour depth) Additional info at 62
33
What are vector images in terms of binary?
* Doesn't store data by pixels * Set of instructions for drawing geometric shape
34
2 advantages of vector image?
* Can scale without loss of quality * Use less storage space
35
What is metadata?
It's data about data (info about the data ig?)
36
Why metadata needed for an image file?
* Display key properties for an image * Which is needed for pc to render image correctly
37
3 examples of key properties in an image?
* Height * Width * Colour depth
38
4 examples of a character in terms of binary
* A letter * A digit * A space * A punctuation mark
39
What ASCII stand for?
American Standard Code for Information Interchange
40
What are character sets?
Table thats maps a character with unique binary number
41
1 example of a character set?
ASCII
42
See page 64 for a retarded ass ASCII table
Whatever
43
1 disadvantage of ASCII?
Can only represent 128 different characters (Doesn't have summin like £ cuz american ig?)
44
What is unicode?
Standard character set Originally an extension to ASCII but pretty much contains alotta characters around the world
45
5 data types?
* Integer * Real * Boolean * Character * String
46
Desc and e.g. of Integer
* Whole numbers, positive/negative e.g. 42, 11, 0
47
Desc and e.g. of Real
* Numbers, including fractions/decimal points e.g. 12.9, -17.50, 28.0
48
Desc and e.g. of Boolean
True/false e.g. 1 or 0
49
Desc and e.g. of Character
* Letter, digit, space, punctuation mark, symbol e.g. 'A', 'b', '7', '?'
50
Desc and e.g. of String
* A sequence of characters e.g. 'Computer science', 'The cat sat on the mat'
51
What are data structures?
* Specific way of organising data within memory * So it can be processed efficiently
52
What static data structure do?
* Designed to store known number of data items * Can be changed but mem size fixed
53
Example of static data structure?
Array (I have no idea wtf that is)
54
Advantage and disadvantage of static data structure?
+ Easier to program - Fixed number of data items
55
What dynamic data structure do?
* Designed to allow data structure * To grow/shrink * Can add new elements or remove elements