Photo AI

5.1 Binary and hexadecimal systems are two number systems used in computing - NSC Information Technology - Question 5 - 2022 - Paper 2

Question icon

Question 5

5.1-Binary-and-hexadecimal-systems-are-two-number-systems-used-in-computing-NSC Information Technology-Question 5-2022-Paper 2.png

5.1 Binary and hexadecimal systems are two number systems used in computing. 5.1.1 What is the base number of the binary number system? 5.1.2 Give ALL the digits/cha... show full transcript

Worked Solution & Example Answer:5.1 Binary and hexadecimal systems are two number systems used in computing - NSC Information Technology - Question 5 - 2022 - Paper 2

Step 1

What is the base number of the binary number system?

96%

114 rated

Answer

The base number of the binary number system is 2.

Step 2

Give ALL the digits/characters that the hexadecimal number system consists of.

99%

104 rated

Answer

The hexadecimal number system consists of the digits 0-9 and the letters A-F.

Step 3

When does it become necessary to use an array instead of a variable?

96%

101 rated

Answer

It becomes necessary to use an array instead of a variable when working with a large number of values, as an array can store multiple values, while a variable can only hold one value.

Step 4

Motivate why the names and ages cannot be stored in the array provided.

98%

120 rated

Answer

The names and ages cannot be stored in the provided array because an array can only store values of one specific data type. In this case, names are strings and ages are integers, thus requiring different data types.

Step 5

Write an algorithm using a loop to insert an additional value of 92 at index position 6 in the arrNum array.

97%

117 rated

Answer

Loop k from 10 down to 6
    arrNum[k] ← arrNum[k-1]
arrNum[6] ← 92

Step 6

State whether the following statements are TRUE or FALSE: (a) A toString method is used to change the value of an attribute to a string for display purposes.

97%

121 rated

Answer

FALSE

Step 7

(b) It is possible to instantiate an object without writing/creating your own constructor method for the object class.

96%

114 rated

Answer

TRUE

Step 8

(c) The number of parameters received in a constructor must be equal to the number of attributes of the object class.

99%

104 rated

Answer

FALSE

Step 9

Differentiate between an accessor method and a mutator method.

96%

101 rated

Answer

An accessor method returns the value of an attribute of an object, whereas a mutator method changes the value of an attribute of an object.

Step 10

Complete the trace table for the code provided above if the value of 4 is entered for Number.

98%

120 rated

Answer

NumberFactorLoopNumber mod LoopFactor = 1Output
400---
4020False4 is NOT a prime number
4131True4 is a prime number
4240False4 is NOT a prime number

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;