Variables and constants are used for data storage in computer programs.
Discuss the similarities and differences between these data stores. [4]
6 points
6
Question 2
2.
A programmer is writing a program that stores data about items stored in a warehouse. Suggest suitable data types for:
String
Integer
Boolean
Item name
Manufacturer
Description
Number in stock
Reorder level
Whether the item is on order or not
6 points
6
Question 3
3.
Write a short pseudocode algorithm to input a password, check that it has exactly 8 characters in it, check that all the letters are upper case, and output the message "Password meets the rules" if both these conditions are true. [6]
3 points
3
Question 4
4.
A computer file, "Message.txt", stores a line of text.
Write an algorithm in pseudocode to display this line of text. [3]
6 points
6
Question 5
5.
a) Describe the purpose of each statement in this algorithm. [2]
b) Identify, using pseudocode, another loop structure that the algorithm in part a could have used. [1]
c) Write an algorithm, using pseudocode, to input a number between 0 and 100 inclusive. The algorithm should prompt for the input and output an error message if the number is outside this range. [3]
4 points
4
Question 6
6.
Explain why programmers find library routines useful when writing programs. Include in your answer with two examples of library routines that programmers frequently use. [4]
3 points
3
Question 7
7.
A system uses even parity.
Indicate whether the following bytes would fail or pass an even parity check:
a)
b)
c)
2 points
2
Question 8
8.
Explain the term data packet.
3 points
3
Question 9
9.
Data packets contain a header.
Name three components that you would expect to find in a header.
2 points
2
Question 10
10.
Data packets also have a payload and a trailer.
Explain these two terms.
6 points
6
Question 11
11.
Match the description of transmission taking place with correct term:
Draggable item
arrow_right_alt
Corresponding Item
Data sent 16 bits at a time down 16 wires in both directions simultaneously
arrow_right_alt
Simplex, Serial
Data sent 8 bits at a time down 8 wires in one direction only
arrow_right_alt
Full duplex, Serial
Data sent 16 bits at a time down 16 wires in both directions, but not at the same time
arrow_right_alt
Half duplex, Serial
Data sent one bit at a time down a single wire in both directions simultaneously
arrow_right_alt
Half duplex, Parallel
Data sent one bit at a time down a single wire in one direction only
arrow_right_alt
Full duplex, Parallel
Data sent one bit at a time down a single wire in both directions, but not at the same time
arrow_right_alt
Simplex, Parallel
7 points
7
Question 12
12.
Indicate which statements about USB are True and which statements are False:
True
False
USBs use a protocol that allows for error-free data transmission between device and computer
USBs can support any cable length between device and computer
USBs use serial data transfer
USB connections can transfer data using half-duplex or full-duplex
It is difficult to add more USB ports to a computer using USB hubs
USB data transfer rates are much faster than, for example, Ethernet connections
There is no need for devices to have a power source because USB cable supplies 5V of power