• +1-617-874-1011 (US)
  • +44-117-230-1145 (UK)
Live Chat
Follow Us:

Program 3 Numbering Systems Conversion

Computer Science Department 
CPCS202, 1st Term 2019 
Program 3:  Numbering Systems Conversion Quiz for High School Students
Faculty of computing and information technology

Problem Description:

Numbering Systems Conversion Quiz for High School Students

Integrating Computer Science in school education is emerging as a new direction in advanced education systems. In a local high school, a technology teacher has taught his students about the numbering systems conversions. Students were taught that a decimal number, which is used in their daily lives, is represented in computers as a binary number. A binary number consists of a sequence of 0s and1s. Students have also learned how to convert a decimal number to a binary number and vice versa. In addition, since binary numbers can be very large and cumbersome, the teacher has explained to the students that hexadecimal numbers are usually used to abbreviate binary numbers. Students have also learned how to convert numbers from decimal to hexadecimal and vice versa

At the end of this learning module on numbering systems, student must take a computerized practice quiz. Your job is to write a program that implements this practice quiz. The quiz consists of 4 parts and in each part, students are asked 2 random questions (Total = 8 questions). The four parts of the quiz are as follows:

1. Convert from Decimal to Hexadecimal (2 questions)

For this part of the quiz, a student is asked two questions. For each question, a random decimal number between 0 and 255 is generated, and the student is asked to enter the equivalent hexadecimal number. 

2. Convert from Decimal to Binary (2 questions)

For this part of the quiz, a student is asked two questions. For each question, a random decimal number between 0 and 255 is generated, and the student is asked to enter the equivalent binary number. 

  1. Convert from Hexadecimal to Decimal (2 questions).

For this part of the quiz, a student is asked two questions. For each question, a random hexadecimal number of 2 digits is generated, and the student is asked to enter the equivalent decimal number.

4. Convert from Binary to Decimal (2 questions)

For this part of the quiz, a student is asked two questions. For each question, a random binary number of 8 bits is generated, and the student is asked to enter the equivalent decimal number.