Unit 4: Number Systems - Subjective Questions
CSE111 — Orientation To Computing • Practice Questions with Detailed Answers
20 questions
Define a number system. Explain the meaning of base or radix and the role of positional values with an example.
Number system: A number system is a method of representing numerical values using a set of symbols or digits according to specific rules.
Base or radix: The base of a number system is the total number of distinct digits available in that system. For a base- number system, the permitted digits range from to .
Positional value: The value of a digit depends on both the digit itself and its position. Positions to the left of the radix point have powers , while positions to the right have powers .
For example, in decimal:
Thus, the digit represents , the digit represents , and the digit represents .
Explain the binary number system and demonstrate how the positional value of each bit is determined.
The binary number system is a base- number system used by digital computers. It contains only two digits:
Each binary digit is called a bit. The positional weights, from right to left, are powers of : .
For example:
Computers use binary because electronic circuits can conveniently represent two stable states, such as on/off, high/low, or true/false.
Compare the binary, decimal, octal, and hexadecimal number systems in terms of base, permitted digits, and common use.
| Number system | Base | Permitted digits | Common use |
|---|---|---|---|
| Binary | Internal representation of data and instructions in computers | ||
| Decimal | to | Everyday calculations and human-readable values | |
| Octal | to | Compact representation of binary values; historically used in computing | |
| Hexadecimal | to and to | Memory addresses, machine code, color codes, and compact binary notation |
In hexadecimal, the symbols have the following decimal values:
Binary, octal, and hexadecimal are closely related because and .
Describe the repeated-division method for converting a decimal integer to binary. Use it to convert to binary.
To convert a decimal integer to binary, repeatedly divide the number by and record each remainder. The remainders are then read from bottom to top.
| Division | Quotient | Remainder |
|---|---|---|
Reading the remainders upward gives:
A positional check is:
Convert to decimal by using positional weights. Explain each step.
Each binary digit is multiplied by the corresponding power of , starting with at the rightmost position:
Evaluating the powers gives:
Therefore:
Explain how a decimal integer is converted to octal. Convert to octal using the appropriate method.
A decimal integer is converted to octal by repeatedly dividing it by and recording the remainders.
| Division | Quotient | Remainder |
|---|---|---|
Reading the remainders from bottom to top gives:
Verification:
Convert the octal number to decimal and explain the positional expansion.
In the octal system, each position has a weight that is a power of .
Substituting the positional weights:
Therefore:
The digits are valid because every octal digit must lie between and .
Describe the process of converting a decimal integer to hexadecimal. Convert to hexadecimal.
To convert a decimal integer to hexadecimal, repeatedly divide it by . Remainders from to are represented by to .
| Division | Quotient | Remainder |
|---|---|---|
Reading the remainders from bottom to top gives:
Verification:
Convert the hexadecimal number to decimal. State the decimal values represented by the hexadecimal letters used.
In hexadecimal, and . Expanding the number according to powers of gives:
Therefore:
Explain the direct conversion relationship between binary and octal. Convert to octal and to binary.
Because , each octal digit corresponds to exactly three binary bits.
Binary to octal
Group the bits into sets of three from the radix point toward the left:
Using , , and :
Octal to binary
Replace every octal digit with its three-bit binary equivalent:
Therefore:
This direct grouping method avoids an intermediate conversion to decimal.
Explain how binary and hexadecimal numbers can be converted directly. Convert to hexadecimal and to binary.
Since , one hexadecimal digit corresponds to exactly four binary bits.
Binary to hexadecimal
Divide the binary number into groups of four bits:
Thus:
Hexadecimal to binary
Replace each hexadecimal digit with four bits:
Therefore:
The initial zero may be omitted, giving:
Convert directly to binary and then convert the resulting binary number to hexadecimal. Show all required grouping.
Step 1: Octal to binary
Replace each octal digit with its three-bit binary equivalent:
Therefore:
Step 2: Binary to hexadecimal
Starting from the right, group the binary digits into sets of four. Add leading zeros where necessary:
Thus:
A decimal verification gives , and .
Describe the multiplication-by-base method for converting a decimal fraction to binary. Convert to binary.
The integer and fractional parts are converted separately.
Integer part
Repeated division of by gives:
Fractional part
Repeatedly multiply the fraction by . At each step, record the integer part of the product:
| Multiplication | Integer bit | Remaining fraction |
|---|---|---|
Reading the integer bits from top to bottom gives .
Combining both parts:
Convert the binary fraction to decimal. Explain how negative powers are used for positions after the binary point.
Positions to the left of the binary point use non-negative powers of , while positions to the right use negative powers of .
Evaluating each term:
Therefore:
Distinguish between valid and invalid numbers in binary, octal, decimal, and hexadecimal systems. Give suitable examples.
A number is valid only when all of its digits belong to the permitted digit set of its base.
- Binary: Permitted digits are and .
- Valid:
- Invalid: , because it contains .
- Octal: Permitted digits are through .
- Valid:
- Invalid: , because it contains .
- Decimal: Permitted digits are through .
- Valid:
- Invalid: , because is not a decimal digit.
- Hexadecimal: Permitted symbols are through and through .
- Valid:
- Invalid: , because is not a hexadecimal digit.
The largest single digit in a base- number system has the value .
Why are octal and hexadecimal often used as shorthand forms of binary? Explain with suitable examples.
Long binary numbers are difficult for people to read and write. Octal and hexadecimal provide shorter representations while allowing easy direct conversion to and from binary.
- Since , one octal digit represents three binary bits.
- Since , one hexadecimal digit represents four binary bits.
For example:
For octal, add a leading zero and group into threes:
For hexadecimal, group into fours:
Thus, the same value can be written as:
Hexadecimal is commonly used for memory addresses, machine-level values, debugging output, and color codes because it is compact and closely aligned with groups of four bits.
Derive a general positional formula for converting a number from base to decimal. Apply it to .
For a positional number in base written as:
its decimal value is obtained from:
where each digit satisfies .
For :
Therefore:
This formula can be used for any positional number system, including binary, octal, decimal, and hexadecimal.
Show that , , and represent the same decimal value.
Each number can be converted independently to decimal.
Binary value
Octal value
Hexadecimal value
In hexadecimal, :
Therefore:
This also illustrates how one value may have different representations in different bases.
Explain the significance of leading zeros and trailing zeros in positional number systems. Do they always leave a number unchanged?
Leading zeros placed before the most significant nonzero digit do not change the value of a number.
For example:
Leading zeros are often added to complete fixed-size groups during binary-to-octal or binary-to-hexadecimal conversion.
Trailing zeros after a radix point also do not change the value:
However, a zero added to the right of an integer with no radix point changes its positional value:
but
Similarly, inserting or removing a zero between significant digits can change the value. Therefore, zeros leave the value unchanged only when they are insignificant leading zeros or trailing fractional zeros.
Convert into binary, octal, and hexadecimal. Verify the results by demonstrating the relationships among the three converted forms.
Decimal to binary
Repeated division by gives:
Binary to octal
Add a leading zero and group the binary digits into sets of three:
These groups correspond to , , , and :
Binary to hexadecimal
Add a leading zero and group into sets of four:
The groups correspond to , , and :
Verification
Hence:
Define a number system. Explain the meaning of base or radix and the role of positional values with an example.
Number system: A number system is a method of representing numerical values using a set of symbols or digits according to specific rules.
Base or radix: The base of a number system is the total number of distinct digits available in that system. For a base- number system, the permitted digits range from to .
Positional value: The value of a digit depends on both the digit itself and its position. Positions to the left of the radix point have powers , while positions to the right have powers .
For example, in decimal:
Thus, the digit represents , the digit represents , and the digit represents .
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →