Chapter 2 - Number System

Comprehensive Questions & Answers for Class 9 Computer Science (Punjab Board)

Class 9 Computer Science Punjab Board
Q1
Answer:

ASCII stands for American Standard Code for Information Interchange. The primary purpose of ASCII encoding is to represent characters, including letters, numbers and Symbols, using a standardized System that computer can understand.

For example:
The ASCII code of the character "n" is 110.

Q2
Answer:
ASCII Unicode
ASCII is an acronym for American Standard Code for Information Interchange. It is an industry standard used to encode text in computers and other devices. Unicode is a character encoding Standard that aims to provide character codes for all the characters used in the World's writing Systems.
ASCII is a 7-bit encoding System that can represent 128 characters. Unicode can represent over a million characters through different forms of encodings.
Q3
Answer:

Unicode assigns a unique numerical value to each character, regardless of the language it belongs to. This allows computers to handle text from various languages consistently. Each character is represented by a specific code point, ensuring compatibility across different Systems and languages.

Example: 
The letter "A" is unicode, represented as: U+0041, is 01000001 in the binary format and occupies 8 bits or 1 byte.

Q4
Answer:

An unsigned 2-byte integer can represent values from 0 to 65,535. This is because each byte has 8 bits, and 2 bytes make up 16 bits, resulting in 216 possible combinations.

Example:
The letter "A" in UTF-16 is equal to 000000001000001 in binary or 65 in decimal (2 bytes).

Q5
Answer:

Negative integers are typically represented using two's complement in binary.

To find the two's complement of a binary number, follow these Steps:

  • Invert all the bits (change 0s to 1s and 1s to 0s).
  • Add 1 to the least significant Bit (LSB).

Example:
Let's convert the decimal number -5 to an 8-bit binary number:

  • Start with the binary representation of 5: 00000101₂
  • Invert all the bits: 11111010₂
  • Add 1: 11111010₂ + 1₂ = 11111011₂

So, -5 in 8-bit two's complement is 11111011₂.

Q6
Answer:

Unsigned integers use all bits to represent positive values only, offering a larger range of positive values compared to signed integers. Unsigned integers are used where negative values are not needed, such as counting or representing memory addresses.

Example / Benefits:

  • Increased Range
  •  Memory Efficiency  
  • Improved Performance  
  • Error Detection  
  • Counting pixels in an image
Q7
Answer:

The number of bits in a binary representation determines the possible range of values that an integer can represent. Each bit can hold a value of 0 or 1.

A 1 byte integer has 8 bits to store values. If all 8 bits are on, it represents the maximum value, 11111111₂, which is 255₁₀. If all bits are off, it represents the minimum value, 00000₂, which is 0₁₀.

Q8
Answer:

Whole numbers are a set of non-negative numbers. They include zero and all the positive integers. W = {0,1,2,3,....}
In Computing, whole numbers are often used to represent quantities that can't be negative.

Examples:

  • The number of students in a school.
  • A person's age in years and grades, provided there are no negative figures such as credit point balance.
Q9
Answer:

The range of a floating-point number is determined by the number of bits used to represent the exponent and mantissa.

For single precision (32 bits), 8 bits are used for the exponent and 23 bits for the mantissa. The exponent can be ranged between -126 and +127.The approximate range of values from 1.4×10⁻⁴⁵ to 3.4×10³⁸

Q10
Answer:

Floating-point numbers (real values) are represented similarly to Scientific notation. A floating-point number = Sign x mantissa x 2^exponent represented as 1.4375×2². Understanding the limitations of floating-point representation in Scientific computing is crucial because computers can only represent real numbers with a limited precision.