Computer Science Worksheet 01
October 2023 - Edexcel
Name : ………………………………………………………………………………
Admission Number : …………………………. Date : …………………………
Q1. What is an algorithm?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q2. What are the three constructs used in an algorithm?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q3. What are the three points to consider when deciding whether an
algorithm is successful or not?
__________________________________________________________________
__________________________________________________________________
Page 1 of 27 Prepared by DHR for Lyceum International School
__________________________________________________________________
Q4. Name three ways that an algorithm can be expressed with?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q5. What is a variable and what is a literal?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q6. What is a constant?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 2 of 27 Prepared by DHR for Lyceum International School
Q7. Write an algorithm in written description to make a cup of instant coffee.
It should be annotated to show where sequence, selection and iteration
have been used.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 3 of 27 Prepared by DHR for Lyceum International School
Q8. Write an algorithm in written description to check the username and
password of a user when it is entered. It should be annotated to show
where sequence, selection and iteration have been used.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 4 of 27 Prepared by DHR for Lyceum International School
Q9. The cost of sending a parcel by courier varies according to the weight of
the parcel:
If a parcel weighs <= 3kg, the cost is $3
If a parcel weighs > 3kg, the cost is $3 + $4 x excess weight.
Draw a flowchart for calculating the cost of sending parcels.
Page 5 of 27 Prepared by DHR for Lyceum International School
Q10. Draw a flowchart to calculate the average from 25 exam scores.
Page 6 of 27 Prepared by DHR for Lyceum International School
Q11. Examine the flowchart given and answer the questions.
A) State the function of this algorithm.
__________________________________________________________________
__________________________________________________________________
Page 7 of 27 Prepared by DHR for Lyceum International School
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
B) State the minimum amount a customer has to spend to receive a
discount.
__________________________________________________________________
__________________________________________________________________
C) State the percentage discount a customer receives if they spend the
minimum amount or more.
__________________________________________________________________
__________________________________________________________________
D) Calculate how much a customer would have to pay if the amount spent
was $150.
__________________________________________________________________
__________________________________________________________________
Page 8 of 27 Prepared by DHR for Lyceum International School
Q12. Write an algorithm in pseudo-code which asks the user to enter a
number between 1 and 10 and then states if it is higher, lower or equal to 5.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 9 of 27 Prepared by DHR for Lyceum International School
Q13. Write an algorithm in pseudo-code that will print out a times table for
any number entered by a user. The table should run from times 1 to 12.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q14. Write an algorithm in pseudo-code for the following description.
A bowling alley gives a 5% reduction in charge if there are five or more
people on a lane and a further 20% reduction if they are members.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 10 of 27 Prepared by DHR for Lyceum International School
Q15. Write an algorithm in pseudo-code that will count all the even
numbers up to a user defined stopping point.
For example, say we want to see the first 5 even numbers starting from 0. well, we
know that evens numbers are 0, 2, 4, etc.
The first 5 even numbers are 0, 2, 4, 6, 8.
The first 8 even numbers are 0, 2, 4, 6, 8 ,10 ,12, 16
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 11 of 27 Prepared by DHR for Lyceum International School
Q16. Write an algorithm in pseudo-code that tells a user that the number they
entered is not a 5 or a 6.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 12 of 27 Prepared by DHR for Lyceum International School
Q17. Why computers use binary to represent data?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q18. What is a denary system?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q19. What is the difference between denary and binary system?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q20. Write two differences between digital and analog signal?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 13 of 27 Prepared by DHR for Lyceum International School
Q21. What are transistors?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q22. What is an overflow error?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q23. What is most significant bit?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q24. Write 2 disadvantages of sign and magnitude?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 14 of 27 Prepared by DHR for Lyceum International School
Q25. Write three binary representations that are used for signed numbers?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q26. What are the three types of binary shifts?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q27. State a common use of hexadecimal numbers?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q28. What is a binary number system?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 15 of 27 Prepared by DHR for Lyceum International School
Q29. Write a program in a high level language to store following birds’ names
in a list. Print items in the list one after the other.
Birds’ names = Eagle, Owl, Parrot, Crow, Sparrow, Peacock, Ostrich, Hen
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q30. Write a program in a high level language to print odd numbers from 0
to 101.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 16 of 27 Prepared by DHR for Lyceum International School
Q31. Write a program in a high level language that will print out a times
table for any number entered by a user. The table should run from times 1 to
12.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Q32. Write a program in a high level language that asks a user to enter a start
number and an end number and then outputs the total of all the numbers in
the range. For example, if the start number was 1 and the end number was 9,
the total would be 45. (1+2+3+4+5+6+7+8+9)
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 17 of 27 Prepared by DHR for Lyceum International School
Q33. Convert the 8 bit binary number 0100 1100 to denary.
__________________________________________________________________
Q34. Convert the 8 bit binary number 0111 1110 to denary.
__________________________________________________________________
Q35. Convert the 8 bit binary number 1101 1010 to denary.
__________________________________________________________________
Q36. Convert the denary 245 into 8 bit binary number.
__________________________________________________________________
Q37. Convert the denary 79 into 8 bit binary number.
__________________________________________________________________
Q38. Convert the denary 150 into 8 bit binary number.
__________________________________________________________________
Q39. 0111 1011 is a signed number. Is this a negative number or a positive
number?
__________________________________________________________________
Q40. 1101 1011 is a signed number. Is this a negative number or a positive
number?
__________________________________________________________________
Page 18 of 27 Prepared by DHR for Lyceum International School
Q41. What is the largest positive number represented by a byte with MSB?
__________________________________________________________________
Q42. What is the largest positive number represented by a byte without an
MSB?
__________________________________________________________________
Q43. Find 1s complement of 0101 1011.
__________________________________________________________________
Q44. Find 1s complement of 1101 0001.
__________________________________________________________________
Q45. Find 2s complement of 1101 0001.
__________________________________________________________________
Q46. Find 2s complement of 1101 0001.
__________________________________________________________________
Q47. Find 2s complement of -145
__________________________________________________________________
Q48. Find 2s complement of -98
__________________________________________________________________
Q49. Find 2s complement of -215.
__________________________________________________________________
Page 19 of 27 Prepared by DHR for Lyceum International School
Q50. Showing your working, carry out the binary addition of 87+(-115)
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 20 of 27 Prepared by DHR for Lyceum International School
Q51. Showing your working, carry out the binary addition of (-25)+78
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 21 of 27 Prepared by DHR for Lyceum International School
Q52. Showing your working, carry out the binary addition of 53+(-43)
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 22 of 27 Prepared by DHR for Lyceum International School
Q53. Showing your working, carry out the binary addition of (-88)+46
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
Page 23 of 27 Prepared by DHR for Lyceum International School
Q54. Perform binary addition. 1011 0110 + 111 0001
__________________________________________________________________
Q55. Perform binary addition. 10 0100 + 1001
__________________________________________________________________
Q56. Perform binary addition. 1111 0110 + 1001 0001
__________________________________________________________________
Q57. Perform binary addition. 110 + 1001
__________________________________________________________________
Q58. Perform binary addition. 1011 0110 + 1110 0011
__________________________________________________________________
Q59. Perform binary shift on unsigned integer 0011 1100 * 24. State what shift
to use.
__________________________________________________________________
Q60. Perform binary shift on unsigned integer 1011 1000 / 23. State what shift
to use.
__________________________________________________________________
Q61. Perform binary shift on unsigned integer 1011 1100 / 21. State what shift
to use.
__________________________________________________________________
Page 24 of 27 Prepared by DHR for Lyceum International School
Q62. Perform binary shift on unsigned integer 0001 0100 * 22. State what shift
to use.
__________________________________________________________________
Q63. Perform binary shift on signed integer 0011 1100 * 24. State what shift to
use.
__________________________________________________________________
Q64. Perform binary shift on signed integer 1011 1000 / 23. State what shift to
use.
__________________________________________________________________
Q65. Perform binary shift on signed integer 1011 1100 / 21. State what shift to
use.
__________________________________________________________________
Q66. Perform binary shift on signed integer 0001 0100 * 22. State what shift to
use.
__________________________________________________________________
Q67. Perform cyclic or circular right shift on integer 0001 0100 by 3 positions.
__________________________________________________________________
Q68. Perform cyclic or circular left shift on integer 1101 0100 by 2 positions.
__________________________________________________________________
Page 25 of 27 Prepared by DHR for Lyceum International School
Q69. Fill the following table and answer the questions given.
Number Hexadecimal B1 B2 B3 B4
Page 26 of 27 Prepared by DHR for Lyceum International School
a. Convert binary 0110 1100 to hexadecimal
__________________________________________________________________
b. Convert binary 1000 1010 to hexadecimal
__________________________________________________________________
c. Convert binary 1111 1110 to hexadecimal
__________________________________________________________________
d. Convert binary 1101 0100 to hexadecimal
__________________________________________________________________
e. Convert hexadecimal 7E to binary
__________________________________________________________________
f. Convert hexadecimal DF to binary
__________________________________________________________________
g. Convert hexadecimal 98 to binary
__________________________________________________________________
h. Convert hexadecimal C9 to binary
__________________________________________________________________
***End of Worksheet***
Page 27 of 27 Prepared by DHR for Lyceum International School