Sign magnitude/1's Complement/2's Complement

  • Thread starter Thread starter JWest
  • Start date Start date
  • Tags Tags
    Sign
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 16K views
JWest
Messages
12
Reaction score
0

Homework Statement



a.) What is the lowest number represented by a 12-bit machine using Sign Magnitude?

b.) What is the largest?

c.) What decimal number does the bit pattern "101001010010" represent?

Homework Equations



For a and b:

Signed integer ranges for N bits (I don't know if this is what I need to use):

Lowest: -[2^(N-1) - 1]

Highest: [2^(N-1) - 1]

The Attempt at a Solution



a.) -[2^(N-1) - 1]
-[2^(12-1) - 1]
-[2^(11) - 1]
-[2048 - 1]
-[2047]

b.) [2^(N-1) - 1]
[2^(12-1) - 1]
[2^(11) - 1]
[2048 - 1]
[2047]

c.) Bit pattern: 101001010010
Signed Magnitude: 101001010010b
= -01001010010b
= -[(2^9) + (2^6) + (2^4) + (2^1)]
= -[512 + 64 + 16 + 2]
= -[594]
= -594d
 
Physics news on Phys.org