2023 YIJC P1 Question Paper
Uploaded by Kozak327 · 8 September 2026
Preview
Text from the first pagesYISHUN INNOVA JUNIOR COLLEGE JC 2 PRELIMINARY EXAMINATION Higher 2 CANDIDATE NAME CG INDEX NO COMPUTING 9569/01 Paper 1 Written 13 Sep 2022 3 hours Additional Materials: Answer Sheet READ THESE INSTRUCTIONS FIRST Write your name, index number and class clearly on the cover page. Write in dark blue or black pen on the writing paper provided. You may use an HB pencil for any diagrams, graphs, tables or rough working. Do not use staples, paper clips, glue or correction fluid. Answer all questions. Approved calculators are allowed. The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 100 This document consists of 11 printed pages and 1 blank page.
2 © YIJC 1 A digital handheld device is used to scan vehicle number s and the data will be sent to the server using a six -bit binary encoding method. The characters in the data, comprising numbers from 0 to 9 and l etters A to Z, are represented by the binary numbers as shown in the following table: Character Denary Number Binary Number ‘0’ 0 000000 ‘1’ 1 000001 ‘2’ 2 000010 ‘3’ 3 000011 ‘4’ 4 000100 ‘5’ 5 000101 ‘6’ 6 000110 ‘7’ 7 000111 ‘8’ 8 001000 ‘9’ 9 001001 ‘A’ 10 001010 to to to ‘Z’ 35 100011 (a) State the number of other characters that can be represented besides 0 to 9 and A to Z using the six-bit binary encoding method. [1] (b) Explain the benefit of using this six-bit binary encoding method to represent 0 to 9 and A to Z. [2] (c) Express the number representing the letter ‘X’ as: (i) a six-bit binary number [1] (ii) a hexadecimal number [1]
3 © YIJC [Turn over A Media Access Control (MAC) address is a twelve-digit hexadecimal number assigned to each device connected to the network. An example of a MAC address is as follows: 3A-34-52-C4-69-B8 (d) Give two reasons why hexadecimal numbers are used in computing. [2] (e) Convert the above MAC address to: (i) a 48-bit binary number [2] (ii) an octal number [2]
4 © YIJC 2 A large online store has a team of Customer Service Officers (CSO) to assist customers regarding their online purchases over the phone. When a customer calls, the CSO can use the phone number appearing on a Caller-ID device to retrieve the customer’s details from the store’s database. Since the customer’s registered phone number is unique, it can be used as a primary key to retrieve the customer’s data. The programmer c an either use a sorted array or a hash table to store and retrieve customers’ data. (a) Describe the process of storing customers’ data in an array and performing a binary search to retrieve a customer’s data using the registered phone number. [4] (b) (i) Give one disadvantage of using an array to store customers’ data sorted by the phone numbers. [1] (ii) Give two advantages of using a hash table to store customers’ data. [2] A hash table of size 10 is used to store the following customers’ data according to the order in which the online purchases are made. Order Number Customer Name Phone Number 62423 Aileen Goh 84621039 72525 Benjamin Teo 85269413 73536 Charlie Lee 96348217 74511 Damian Wong 84903216 83472 Elsa Ng 83209547 93642 Fatimah Siti 89321065 96262 Gerald Lim 82345917
5 © YIJC [Turn over The hash value for the phone number 84621039 can be found using the following algorithm: hash('84621039') = (8 + 4 + 6 + 2 + 1 + 0 + 3 + 9) % 10 = 33 % 10 = 3 The hash value for the phone number will be used as the index position to store the customer’s data in the hash table. All collisions are resolved using the Linear Probing (Closed Hashing) technique. (c) The customer’s data for Aileen Goh has been inserted into the hash table for your reference. Complete the following hash table in the Answer Sheet. [3] (d) The programmer uses a searching algorithm to retrieve customers’ data from the hash table completed in part (c). It prints the customer’s data if found; Otherwise, it prints ‘Customer data not found’. Explain the process in which the algorithm searches for the following phone numbers: (i) 89321065 [1] (ii) 87951032 [1] (iii) 90381485 [1] Index Hash Value Customer’s Data (Order Number, Name, Phone Number) 0 1 2 3 3 62423, Aileen Goh, 84621039 4 5 6 7 8 9
6 © YIJC 3 An airline sells both Business Class and Economy Class tickets. The customers buying the tickets are either members or non-members of the airline. All members are eligible for a 10% discount. Members will be given an additional 10% discount for the off-peak Business Class tickets. Non- members will only receive 10% discount for the off-peak Business Class tickets. (a) Create a decision table showing all the possible conditions and actions. [4] (b) Simplify your decision table by removing redundancies. [4] (c) With reference to your answer in part (b), w rite a function using pseudocode. The function will prompt the customer to indicate the membership, the type of flight ticket and the travelling period (Peak or Off-Peak). Use the following variable names in your pseudocode: The function should print one of the following outputs: • “20% discount” • “10% discount” • “No discount” [5] Name Use Membership True for member; Otherwise, False. Ticket_Type “Economy” or “Business” Period “Peak” or “Off-Peak”
7 © YIJC [Turn over The members are issued membership cards with unique seven -digit m embership numbers. The last digit is a check digit generated using the Luhn algorithm. The validity of a membership number can be checked with the following steps : 1. Starting with the first digit from the left, double the value for each digit in the even positions (2nd, 4th and 6th): a. if the doubled value is smaller than 10, do not change the doubled value; Otherwise, deduct 9 from it b. sum all the doubled values 2. Sum all the values of the digits in the odd positions (1st, 3rd, 5th and 7th) 3. Find the total by adding the values obtained in steps 1b and 2 4. The membership number is valid if the total is divisible by 10; Otherwise, it is invalid. (d) Determine if the following two membership numbers are valid: • 2316214 • 2543543 [6] (e) The use of check digits is one of the validation techniques. (i) State the purpose of validation. [1] (ii) State two types of error that a check digit usually detects. Explain by demonstrating how the Luhn algorithm is used for each type of error. [4] (f) (i) State the purpose of verification. [1] (ii) State two methods of verification. [2]
8 © YIJC 4 A fitness company Just-Fitness provides a phone application (“app”) for customers to book their training sessions and enter the gym. The company recently updated its app to reward customers who jog actively. The app will access the phone’s location and time to compute the speed and distance covered during the jogging session. Reward points will be awarded if the speed is above a certain minimum requirement. The reward points earned can be used to pay for the membership fee or other merchandise in the gym. After updating the app, the c ustomers will receive the following notification each time they want to use the app: New Feature Unlocked! Earn reward points while you exercise. I accept the use of my personal data for the purposes of the current marketing promotions, for profiling, and or market analysis activities aimed to receive promotion, discounts and targeted communications based on the provided data. Access your location while using the “Just-Fitness” app. If a customer does not allow the phone location to be accessed, the app will not be loaded. (a) Give two reasons why the above notification is required under the Personal
Content continues in the PDF. Download PDF
Related notes
- 2024 ACJC Computing PromoExam Papers · 2024
- 2023 ACJC Promo QPExam Papers · 2023
- 2022 ACJC Computing Promo Paper 2Exam Papers · 2022
- 2021 ACJC Computing Promo Paper 2Exam Papers · 2021
- 1992 AJC Computing QPExam Papers · 1992
- 2023 YIJC P2 Question PaperExam Papers · 2023
- 2023 RVHS P2 CombinedExam Papers · 2023
- 2023 RI P2 Question PaperExam Papers · 2023
- 2023 RI P1 Question PaperExam Papers · 2023
- 2023 NYJC-VJC-TJC P2 Question PaperExam Papers · 2023
- 2023 NJC P2 Question PaperExam Papers · 2023
- 2023 JPJC P2 SolutionsExam Papers · 2023
- See all H2 Computing notes

