11 CS - End of unit 8 test (with Q's on unit 2)

Last updated 6 months ago
12 questions
Answer all the questions.
4

Variables and constants are used for data storage in computer programs.
Discuss the similarities and differences between these data stores. [4]

6

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

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

A computer file, "Message.txt", stores a line of text.
Write an algorithm in pseudocode to display this line of text. [3]

6

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

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

A system uses even parity.
Indicate whether the following bytes would fail or pass an even parity check:
a)
b)
c)

2

Explain the term data packet.

3

Data packets contain a header.
Name three components that you would expect to find in a header.

2

Data packets also have a payload and a trailer.
Explain these two terms.

6

Match the description of transmission taking place with correct term:

Draggable itemCorresponding Item
Data sent 16 bits at a time down 16 wires in both directions simultaneously
Simplex, Serial
Data sent 8 bits at a time down 8 wires in one direction only
Full duplex, Serial
Data sent 16 bits at a time down 16 wires in both directions, but not at the same time
Half duplex, Serial
Data sent one bit at a time down a single wire in both directions simultaneously
Half duplex, Parallel
Data sent one bit at a time down a single wire in one direction only
Full duplex, Parallel
Data sent one bit at a time down a single wire in both directions, but not at the same time
Simplex, Parallel
7

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