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

Express -39 in 8-bit 2's complement form.

The correct answer is

11011001

Understanding 2's Complement Representation

The 2's complement is a mathematical operation used in computer science and digital electronics to represent negative numbers in binary form. It is a fundamental concept for performing arithmetic operations, such as addition and subtraction, with signed integers within digital systems. For an N-bit system, the range of numbers that can be represented typically spans from $-(2^{N-1})$ to $(2^{N-1} - 1)$. In the context of an 8-bit system, this range means numbers from $-(2^{8-1}) = -128$ to $(2^{8-1} - 1) = 127$ can be represented.

To express a negative number in its 2's complement form, a specific sequence of steps must be followed. This method is crucial because it allows standard binary addition logic to be applied for both positive and negative numbers, simplifying hardware design in computers.

Steps to Express -39 in 8-bit 2's Complement

Our goal is to convert the decimal number -39 into its equivalent 8-bit 2's complement binary representation. The process involves three main stages: converting the absolute value to binary, finding its 1's complement, and then finally computing its 2's complement.

1. Binary Representation of the Absolute Value (39)

The first step is to convert the absolute value of -39, which is 39, into its binary equivalent. We do this by repeatedly dividing 39 by 2 and noting the remainders.

Division by 2 Quotient Remainder
$39 \div 2$ 19 1
$19 \div 2$ 9 1
$9 \div 2$ 4 1
$4 \div 2$ 2 0
$2 \div 2$ 1 0
$1 \div 2$ 0 1

By reading the remainders from bottom to top, we get the binary representation of 39: $100111_2$.

2. Pad to 8 Bits for Positive 39

Since we are working with an 8-bit system, we need to ensure that the binary representation of +39 is exactly 8 bits long. We achieve this by adding leading zeros to $100111_2$.

  • 8-bit binary representation of positive 39: $00100111_2$

3. Find the 1's Complement

To find the 1's complement of $+39$, we invert each bit of its 8-bit binary representation. This means every 0 becomes a 1, and every 1 becomes a 0.

  • Original 8-bit binary for +39: $00100111_2$
  • 1's Complement: $11011000_2$

4. Find the 2's Complement

The final step to express -39 in 2's complement form is to add 1 to the 1's complement obtained in the previous step.

  • 1's Complement: $11011000_2$
  • Add 1: $1_2$
  • 2's Complement: $11011000_2 + 1_2 = 11011001_2$

Thus, -39 expressed in 8-bit 2's complement form is $11011001_2$.

Comparing with Options

Let's compare our calculated 8-bit 2's complement value for -39 with the provided options:

  • Option 1: $11011001$
  • Option 2: $01101010$
  • Option 3: $01000101$
  • Option 4: $10101001$

Our calculated value, $11011001_2$, perfectly matches Option 1.

Was this answer helpful?

Important Questions from Number Representation

  1. Which of the following pairs of octal and binary numbers are NOT equal?

  2. The greatest negative number which can be stored in a 8-bit register using 2's complement arithmetic is

  3. Which of the following codes is also known as reflected binary code?

  4. What is the octal equivalent of (F3B1)16?

  5. The 1's complement of binary number 10010 is

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