All Exams Test series for 1 year @ ₹349 only
Question

A register contains a 3's complement number 10100. If it is divided by 2, find the value of the register.

The correct answer is

01010

Understanding 3's Complement:

In a 3's complement system, we represent negative numbers. To find the 3's complement of a number, we first find its 2's complement and then add 1. Let's assume the register uses a 5-bit representation.

Step 1: Convert from 3's complement to Decimal:

The given 3's complement number is 10100. To find its decimal equivalent, we first find its 2's complement and then negate.

  1. 2's complement of 10100: 01011 +1 = 01100
  2. Decimal equivalent of 01100: \(0 \times 2^4 + 1 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 0 \times 2^0 = 8 + 4 = 12\)
  3. Since it's the 3's complement, the original number is -12.

Step 2: Divide by 2:

-12 / 2 = -6

Step 3: Convert -6 back to 3's complement:

  1. Convert -6 to binary: 6 in binary is 0110. The negative version would be 1010 (if using sign-magnitude) but in 2's complement, we have 1010. To achieve 2's complement, we invert the bits and add 1 (we are assuming that we're working with 5-bit representations.)
  2. Binary representation of 6 is 00110. The 2's complement is 11010.
  3. Adding 1 to get the 3's complement: 11010 + 1 = 11011

This contradicts our given choices. Let's try another approach. Let's assume that 10100 is already in 2's complement.

Alternative Approach (Assuming 2's complement):

  1. The 2's complement number 10100 represents -12 in 5-bit representation.
  2. Dividing -12 by 2 results in -6.
  3. The 2's complement of -6 (using 5-bit representation) is found as follows: 6 is 00110; its inverse is 11001; adding 1 gives 11010.

This value (11010) matches one of the options. Dividing the initial 2's complement number by 2 is not done by simple bit shifting as this would cause errors in the sign.

Why other options are incorrect:

  • 01100: Represents 12 (positive).
  • 00110: Represents 6 (positive).
  • 01010: Represents 10 (positive). This is incorrect as the result must be negative.

Therefore, the correct answer is 11010.

Was this answer helpful?

Important Questions from Number Representations and Computer Arithmetic

  1. Which is the largest unit of storage among the following?

  2. The operations executed on data stored in registers are known as-

  3. What is the binary representation of 35?

  4. The mask logical micro-operation is equivalent to which logical gate?

  5. The IEEE-754 double-precision format to represent floating point numbers, has a length of _____ bits.
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App