asked 65.8k views
3 votes
Find the double word-length 2's complement representation of each of the following decimal numbers:a. 3874

1 Answer

7 votes

Answer:

-3874₁₀ = 1111 1111 1111 1111 1111 1111 1101 1110₂

Step-by-step explanation:

2's complement is a way for us to represent negative numbers in binary.

To get 2's complement:

1. Invert all the bits

2. Add 1 to the inverted bits

Summary: 2's complement = -N = ~N + 1

1. Inverting the number

3874₁₀ = 1111 0010 0010₂

~3874₁₀ = 0000 1101 1101₂

2. Add 1 to your inverted bits

~3874₁₀ + 1 = 0000 1101 1101₂ + 1

= 0000 1101 1110₂

You can pad the most signigicant bits with 1's if you're planning on using more bits.

so,

12 bits 16 bits

0000 1101 1110₂ = 1111 0000 1101 1110₂

They asked for double word-length (a fancy term for 32-bits), so pad the left-most side with 1s' until you get a total of 32 bits.

32 bits

= 1111 1111 1111 1111 1111 1111 1101 1110

answered
User Sudhee
by
8.6k points

Related questions

asked Sep 26, 2019 170k views
Artey asked Sep 26, 2019
by Artey
7.7k points
1 answer
5 votes
170k views
asked Dec 1, 2021 82.2k views
Megaroeny asked Dec 1, 2021
by Megaroeny
8.4k points
1 answer
1 vote
82.2k views
asked Aug 14, 2021 107k views
Jpkroehling asked Aug 14, 2021
by Jpkroehling
8.2k points
1 answer
0 votes
107k views
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.