2 Lecture

CS302

Midterm & Final Term Short Notes

Number Systems

Number systems are a set of symbols and rules used to represent and manipulate quantities. The most common number systems are decimal, binary, octal, and hexadecimal. Understanding number systems is crucial in various fields, especially in compu


Important Mcq's
Midterm & Finalterm Prepration
Past papers included

Download PDF
  1. Which number system uses base 2? A) Decimal B) Binary C) Octal D) Hexadecimal Answer: B

  2. How many digits are there in binary system? A) 8 B) 10 C) 2 D) 16 Answer: C

  3. What is the base of the octal number system? A) 2 B) 8 C) 10 D) 16 Answer: B

  4. Which number system uses the digits 0-9 and letters A-F? A) Decimal B) Binary C) Octal D) Hexadecimal Answer: D

  5. What is the value of the binary number 1101 in decimal form? A) 5 B) 7 C) 9 D) 13 Answer: D

  6. What is the value of the octal number 73 in decimal form? A) 47 B) 57 C) 63 D) 83 Answer: B

  7. What is the value of the hexadecimal number AC in decimal form? A) 170 B) 172 C) 174 D) 176 Answer: B

  8. Which number system is used to represent colors in HTML? A) Decimal B) Binary C) Octal D) Hexadecimal Answer: D

  9. What is the process of converting a decimal number to a binary number? A) Repeatedly dividing the decimal number by 10 B) Repeatedly dividing the decimal number by 2 C) Repeatedly dividing the decimal number by 8 D) Repeatedly dividing the decimal number by 16 Answer: B

  10. What is the process of converting a binary number to a decimal number? A) Multiplying each digit of the binary number by 2 and summing the products B) Multiplying each digit of the binary number by 8 and summing the products C) Multiplying each digit of the binary number by 10 and summing the products D) Multiplying each digit of the binary number by 16 and summing the products Answer: A



Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included

Download PDF
  1. What is a number system? Answer: A number system is a set of symbols and rules used to represent and manipulate quantities.

  2. What is the decimal number system? Answer: The decimal number system is a base-10 number system that uses ten symbols (0-9) to represent quantities.

  3. What is the binary number system? Answer: The binary number system is a base-2 number system that uses two symbols (0 and 1) to represent quantities.

  4. What is the octal number system? Answer: The octal number system is a base-8 number system that uses eight symbols (0-7) to represent quantities.

  5. What is the hexadecimal number system? Answer: The hexadecimal number system is a base-16 number system that uses sixteen symbols (0-9 and A-F) to represent quantities.

  6. Why is understanding number systems important in computer science? Answer: Understanding number systems is important in computer science because digital data is stored and processed using binary numbers.

  7. How can you convert a binary number to a decimal number? Answer: To convert a binary number to a decimal number, you can multiply each digit of the binary number by its corresponding power of 2 and then sum the products.

  8. How can you convert a decimal number to a binary number? Answer: To convert a decimal number to a binary number, you can repeatedly divide the decimal number by 2 and then record the remainders.

  9. What is the process of converting a decimal number to an octal number? Answer: To convert a decimal number to an octal number, you can repeatedly divide the decimal number by 8 and then record the remainders.

  10. What is the process of converting a decimal number to a hexadecimal number? Answer: To convert a decimal number to a hexadecimal number, you can repeatedly divide the decimal number by 16 and then record the remainders, substituting any remainders greater than 9 with letters A-F.

Number systems are essential in computer science, as computers work with binary numbers, which are made up of just two digits: 0 and 1. There are several other number systems used in mathematics, including decimal, octal, and hexadecimal. Each of these number systems has its own base, or radix, which refers to the number of digits used in the system. The decimal number system, which is used in everyday life, is a base-10 system that uses ten digits (0-9) to represent quantities. In contrast, the binary number system is a base-2 system that uses only two digits (0 and 1). The octal number system is a base-8 system that uses eight digits (0-7), while the hexadecimal system is a base-16 system that uses sixteen digits (0-9 and A-F). Conversion between number systems is a critical skill in computer science. Converting a decimal number to a binary number involves dividing the decimal number by 2 repeatedly and writing down the remainders. The remainders, read from bottom to top, represent the binary number. For example, the decimal number 10 is converted to the binary number 1010 (10 divided by 2 is 5 with a remainder of 0, and 5 divided by 2 is 2 with a remainder of 1, and 2 divided by 2 is 1 with a remainder of 0, and 1 divided by 2 is 0 with a remainder of 1). Converting between different number systems can be more complicated, but the basic principle is the same. For example, to convert a binary number to a decimal number, you can multiply each digit of the binary number by its corresponding power of 2 and then sum the products. Converting a decimal number to an octal or hexadecimal number involves dividing the decimal number by 8 or 16 and recording the remainders, which are then substituted with the corresponding digits or letters in the octal or hexadecimal system. In summary, number systems are essential in computer science, and understanding the basics of different number systems and how to convert between them is crucial for working with digital data.