Answer all the questions.
Variables and constants are used for data storage in computer programs.
Discuss the similarities and differences between these data stores. [4]
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 |
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]
A computer file, "Message.txt", stores a line of text.
Write an algorithm in pseudocode to display this line of text. [3]
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]
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]
A system uses even parity.
Indicate whether the following bytes would fail or pass an even parity check:
a)
b)
c)
Explain the term data packet.
Data packets contain a header.
Name three components that you would expect to find in a header.
Data packets also have a payload and a trailer.
Explain these two terms.
Match the description of transmission taking place with correct term:
| Stavka koja se može prevući | arrow_right_alt | Odgovarajuća stavka |
|---|---|---|
Data sent one bit at a time down a single wire in both directions, but not at the same time | arrow_right_alt | Simplex, Serial |
Data sent one bit at a time down a single wire in one direction only | arrow_right_alt | Full duplex, Serial |
Data sent 16 bits at a time down 16 wires in both directions simultaneously | arrow_right_alt | Half duplex, Serial |
Data sent 8 bits at a time down 8 wires in one direction only | arrow_right_alt | Half duplex, Parallel |
Data sent 16 bits at a time down 16 wires in both directions, but not at the same time | arrow_right_alt | Full duplex, Parallel |
Data sent one bit at a time down a single wire in both directions simultaneously | arrow_right_alt | Simplex, Parallel |
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 |