Computer Science Mocks Flashcards

1
Q

What is a bit?

A

A binary digit that is a 0 or 1

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

What is a nibble?

A

A group of 4 bits or 1/2 a byte

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

What is a byte?

A

A group of 8 bits that can store 1 of 256 numbers

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

How many bytes in a kilobyte?

A

1000

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

Order of bytes?

A

Bit - Nibble - Byte - Kilobyte - Megabyte - Gigabyte - Terabyte - Petabyte

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

How many kilobytes in a megabyte?

A

1000

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

How many megabytes in a gigabyte?

A

1000

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

How many gigabytes in a terabyte?

A

1000

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

How many terabytes in a petabyte?

A

1000

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

How do overflow errors occur?

A

When binary addition results in a 9 digit number

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

What is a binary shift?

A

A way of multiplying or dividing binary by powers of 2

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

Is a right binary shift multiplying or dividing?

A

Dividing

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

Is a left binary shift multiplying or dividing?

A

Multiplying

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

Why might the size of a file need to be reduced?

A
  • Less storage space required
  • Faster download times for better online experience
  • Faster streaming of video/audio files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Two types of compression?

A
  • Lossy

- Lossless

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

What is lossy compression?

A

When unrequired data is removed from a file

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

An example of lossy compression?

A

MP3s where sound quality may reduce but not enough to notice.

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

What is lossless compression?

A

When data is temporarily removed from a file but added back (rebuilt) when the file is used again

19
Q

An example of lossless compression?

A

Zip files, they need to be extracted before they can be used

20
Q

How do MP3s use lossy compression?

A

Certain frequencies that are not noticeable are removed which reduces data but no noticeable loss of quality

21
Q

How do online chatting and mobile phone networks use lossy compression?

A

Used to ensure only a small amount of bandwidth is used which reduces sound quality but is still understandable by the other person

22
Q

How do images use lossy compression?

A

Details of the image may be lost but not impairing overall quality

23
Q

Why is lossy compression important on websites?

A

Page load speeds can be affected by images that are especially large in size

24
Q

Two types of lossless compression?

A
  • Run Length Encoding

- Dictionary Coding

25
Q

What is the largest number that a byte can hold?

A

255

26
Q

How do you convert hexadecimal to binary?

A

Find the binary value of the first digit, find the binary value of the second digit and put them together

27
Q

How do you convert binary to hexidecimal?

A
  1. Split it into nibbles or add 0’s if you can’t
  2. Draw tables with 8, 4, 2, 1
  3. Fill in the table with the binary numbers
  4. Convert each value into hexadecimal
28
Q

How do you convert hexadecimal to denary?

A
  1. Draw a table with 16 then 1
  2. Put the hexadecimal values into the table
  3. Multiply the first value by 16 and the second value by 1
  4. Add these values together, this is your denary number
29
Q

How do you convert denary to hexadecimal?

A
  1. Draw table with 16 then 1
  2. Divide the denary number by 16
  3. Divide the remainder by 1
  4. Put the first and second value together to get the hexadecimal number
30
Q

Does lossy or lossless compression give a smaller file?

A

Lossy

31
Q

What is machine code?

A

A very low level language that a CPU can understand

32
Q

Examples of machine code?

A

Binary and hexadecimal

33
Q

What is assembly language?

A

Low level language

34
Q

Features of machine code?

A

Hard for humans to write and read

35
Q

Features of assembly language?

A

Easier for humans to write but still difficult`

36
Q

Purpose of high level langauge?

A

Easy to understand and write and can be translated into a language that can be understood by the CPU

37
Q

What are translators?

A

Programs that convert high level language commands into something that the CPU can understand and process

38
Q

What are the three types of translators?

A
  • Compiler
  • Interpreter
  • Assembler
39
Q

What does a compiler do?

A

Converts the whole code into one file which can be run on any computer without a translator, can take a long tim

40
Q

What does an interpreter do?

A

Converts source code into machine code 1 line at a time so is very slow but good for programs in development for programmers to highlight issues

41
Q

What does an assembler do?

A

Converts assembly level language into machine code

42
Q

What is an IDE?

A

Integrated development environment

43
Q

What are the parts of an IDE?

A
  • Source Code Editor
  • Interpreter
  • Automation Tools
  • Debugger
  • Compiler
  • Auto-Documentation