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

The 2's complement representation of the number (-100)10 in an 8 bit computer is

The correct answer is

10011100

Understanding 2's Complement for Negative Numbers

The question asks for the 2's complement representation of the number $(-100)_{10}$ in an 8-bit system. The 2's complement is a standard way computers represent negative numbers.

Step 1: Convert the Absolute Value to Binary

First, we find the binary representation of the absolute value of the number, which is $(100)_{10}$.

  • Divide 100 by powers of 2:
    • $100 \div 64 = 1$ remainder $36$
    • $36 \div 32 = 1$ remainder $4$
    • $4 \div 16 = 0$ remainder $4$
    • $4 \div 8 = 0$ remainder $4$
    • $4 \div 4 = 1$ remainder $0$
    • $0 \div 2 = 0$ remainder $0$
    • $0 \div 1 = 0$ remainder $0$
  • Reading the remainders from bottom up is incorrect. A better method is direct conversion:
    • $100 = 64 + 32 + 4$
    • $100 = 1 \times 2^6 + 1 \times 2^5 + 0 \times 2^4 + 0 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 0 \times 2^0$
  • So, the binary representation of $(100)_{10}$ is $1100100_{2}$.

Step 2: Represent in 8 Bits

Since we need an 8-bit representation, we pad the binary number $1100100_{2}$ with leading zeros to make it 8 bits long.

The 8-bit representation of $(+100)_{10}$ is $01100100_{2}$.

Step 3: Find the 1's Complement

To find the 2's complement, we first find the 1's complement by inverting all the bits (changing 0s to 1s and 1s to 0s).

Original 8-bit binary number for +100: 01100100

Invert the bits to get the 1's complement: 10011011

Step 4: Calculate the 2's Complement

Next, we add 1 to the 1's complement to get the 2's complement representation.

1's Complement: 10011011

Add 1:
10011011
+ 1
------------------
10011100

Therefore, the 2's complement representation of $(-100)_{10}$ in an 8-bit system is 10011100.

Step 5: Match with Options

Comparing our result with the given options:

  1. 10011011 (This is the 1's complement)
  2. 01100100 (This is the 8-bit representation of +100)
  3. 11100100 (Incorrect)
  4. 10011100 (This matches our calculated 2's complement)

The correct option is 10011100.

Was this answer helpful?

Important Questions from Number Representation

  1. What is the full form of EBCDIC?

  2. Consider the values A = 2.0 × 1030, B = -2.0 × 1030 C = 1.0. Assume, that the floating point numbers are represented with 32 bits. What are the values of X and Y, when the following sequence of operations are executed on a computer?

    X = A + B

    Y = A + C

    X = X + C

    Y = Y + B

  3. The 32-bit IEEE 754 single precision representation of a number is 0xC2710000. The number in decimal representation is ________. (rounded off to two decimal places)
  4. With 4 - bit 2's complement arithmetic, which of the following additions will result in overflow ?
    (i) 1100 + 0100
    (ii) 1100 + 1111
    (iii) 0101 + 0100
    (iv) 1010 + 1100
  5. Which of the following pairs of octal and binary numbers are NOT equal?

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