Computer Science Mock Cards Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

1a) Kofil uses his computer to record an audio file of himself playing his guitar.
Outline what happens when the computer converts the music into a file.

A

To convert from an analogue recording into digital data we sample the amplitude of the waves at regular intervals, and we store it in binary.

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

1b) Kofil increases the sample rate his computer is using to record his guitar.

Explain 2 effects this will have on Kofil’s recording.

A

1) The Digital Data will be better quality/Resemble the original.
2) The File Size will increase.

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

2a) Order the following from smallest to largest:
* GB
* bit
* PB
* byte
* nibble
* MB

A

bit, nibble, byte, MB, GB, PB

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

2b) Convert the decimal number 191 into an 8 bit binary number.

A

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

= 10111111

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

2c) Convert the hexadecimal number 3E into a decimal number. You must show your working.

A

3E
Find the Value of E:
E = 14

Now Convert 3 to Binary:
2 1
1 1

And Convert E(14) to Binary:
8 4 2 1
1 1 1 0

Merge both Binary Values together:
111110

Lastly Convert the Binary Value to Denary:
32 16 8 4 2 1
1 1 1 1 1 0

Add the Digits Together:
Answer: 32 + 16 + 8 + 4 + 2 = 62.

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

2di) Add together the following two 8 bit binary numbers. Express your response in an 8 bit binary form.

01101010 + 10010110

A

+ 01101010
10010110 =
100000000

Convert to an 8 bit binary number:
00000000.

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

2dii) Identify the problem this addition has created.

A

It caused an overflow.

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

3a) Complete a 2 place right shift on the binary number 11001011.

A

Remove last 2 Bits:

00110010

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

3b) Complete the truth table for the Boolean statement p = NOT (A AND B)

A
A          B             P
False   False      True 
False   True        True
True     False      True
True     True        False     

Remember: In test Both answers are TRUE.

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

4a) Johnny is writing a program to create usernames. The first process he has developed is shown in the flowchart in Fig. 1.

E.g. using the process in Fig. 1, Tom Ward’s user name would be TomWa.

State, the username for Rebecca Ellis.

A

RebEl
as it says (in Fig.1) reduce first name to first 3 letters
and reduce the surname to first 2 letters.

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

4b) Johnny has updated the process used to create usernames as follows:
* If the person is male, then their username is the last 3 letters of their surname and the first 2 letters of their first name.

What would be the username for a male called Fred Biscuit using this updated process

A

uitfr

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

4b) Write an algorithm for Johnny to output a username using the updated process.

A
Written in Pseudocode:
INPUT firstName, surname, gender
IF gender = 'male' THEN
    Username  = RIGHT (surname, 3)
                        \+ LEFT (firstName, 2)
ELSE
     Username = LEFT (firstName, 3)
                       \+ LEFT (surname, 3)
ENDIF
OUTPUT username
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

5i) Identify a data type that could be used to store the number of minutes in this array.

A

An integer

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

5ii) State why this data type is the most approptiate.

A

It is a whole number.

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

6a) Willow has created a hangman program that uses a file to store the words the program can select from. A sample of this data is shown in Fig. 3.

Crime Bait Fright Victory Nymph Loose - Fig. 3.

Show the stages of a bubble sort when applied to the date shown in Fig. 3.

A
Go through a pass and swap names if they aren't in ascending order:
1st Pass) B, C, F, V, N, L
2nd Pass) B, C, F, N, V, L
3rd Pass) B, C, F, N, L, V
4th Pass) B, C, F, L, N, V

Answer: Bait, Crime, Fright, Loose, Nymph, Victory.

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

6b) Show the stages of a binary search to find the word ‘zebra’ when applied to the data shown in Fig. 4.

Amber House Kick Moose Orange Range Tent Wind Zebra - Fig

A

Find the word in the middle:
Amber House Kick Moose ORANGE Range Tent Wind Zebra

Now get rid of all smaller values including Orange:
Range Tent Wind Zebra

Then find the word in the middle:
Range Tent WIND Zebra

Again get rid of all smaller values including Wind:

Answer: Zebra

17
Q

Questions on the other side of the paper)
A doctor’s surgery stores hundreds of patient’s details on its computer network. The surgery is concerned about the security of its patient’s sensitive medical data.

Staff are already required to use strong passwords to protect systems. Explain, with reference to system security, 3 other ways that the surgery could protect the system.

A
  • Firewalls it shields the computer from malicious network traffic.
  • Anti Malware it detects and blocks viruses.
  • User Access Level it restricts user access to some parts of the computer network.
18
Q

A school has all of its computers in a local area network (LAN)

Explain two measures which the school will need to take to ensure the security of the network.

A
  • Passwords they are the first defense against unauthorised access.
  • Encryption it encodes data to make it hard to read.
19
Q

Fig. 1. is a circuit diagram

Complete the truth table for (NOT p) AND q.

A
P    Q       (NOT p) AND q
0    0                 0
1     0                 0
0     1                 0
1      1                  1
20
Q

The names of students are sorted into these boxes.

Complete the following diagram to show the stages an insertion sort would take to complete this task.

Rob Anna Huw Emma Patrice Iqbal

A

Complete this in ascending order:

1st Pass) Anna Rob Huw Emma Patrice Iqbal
2nd Pass) Anna Huw Rob Emma Patrice Iqbal
3rd Pass) Anna Emma Huw Rob Patrice Iqbal
4th Pass) Anna Emma Huw Patrice Rob Iqbal

Final Pass/Answer: Anna Emma Huw Iqbal Patrice Rob

21
Q

The following names of students are stored in an array with the identifier studentnames.

studentnames - Rob Anna Huw Emma Patrice Iqbal

Describe the steps that a linear search would do to find Anna in student names.

A

Rob Anna Huw Emma Patrice Iqbal
1st Pass) Rob compared to Anna in ‘studentnames’ - not found

2nd Pass/Answer) Anna compared to Anna in ‘studentnames’ - found

22
Q

State what is meant by the term metadata.

A

It is data that describes other data.

23
Q

Give one example of metadata that could be stored alongside the logo.

A

Resolution

24
Q

b) The following logo is stored as a bitmap image. Each box represents one pixel, with three different colours being used in the image.

Calculate the fewest number of bits that could be used to store the logo as a bitmap image. You must show your working.

A

Resolution/Colour Depth

90/3 = 30 = 11110

25
Q

c) Give two ways that the file size of the image could be reduced.

A

1) Decrease image resolution

2) Compress File Format

26
Q

Give two reasons why computer scientists use hexadecimal to represent numbers instead of binary.

A

1) Large Binary numbers can be written in a few digits.

2) It is easier to understand than Binary.

27
Q

Convert the denary value 105 into an 8 bit binary number.

A

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

= 01101001

28
Q

Convert the binary value 1110 0011 into hexadecimal.

A

8 4 2 1
1 1 1 0 = 14

8 4 2 1
0 0 1 1 = 3

Answer = E3

28
Q

The ASCII code for the character J is the denary number 74.

Write the 8-bit binary number for the ASCII character J in the following boxes:

A

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

As an 8 bit binary number:
01001010

29
Q

Give the hexadecimal number for the ASCII character K.

Show your working.

A

K in Denary: 75

Convert 75 into Binary:
64 32 16 8 4 2 1
1 0 0 1 0 1 1

Split the table in half:
4 2 1
1 0 0 = 4

8 4 2 1
1 0 1 1 = 11 =B

The Answer is: 4B

30
Q

End of Test Paper.

A