What is the 2s complement of 0x3D9E?

  • Thread starter Tjvelcro
  • Start date
In summary, 2s complement is a mathematical operation used to represent negative numbers in computer systems by inverting all the bits in a binary number and adding 1 to the result. Hexadecimal is a number system that uses 16 different digits to represent numbers, making it a convenient way to represent binary numbers. 2s complement with hex is used in computers for arithmetic operations and allows for more efficient storage and manipulation of negative numbers. However, it can only represent integers and has limitations on the range of numbers it can represent. Converting between binary and hexadecimal formats may also be confusing for some people.
  • #1
Tjvelcro
18
0

Homework Statement



Which is 2s complement of 0x3D9E

a) BD9F
b) BDA0
c) C262
d) 3D9E

Homework Equations



I believe I subract each digit from F

The Attempt at a Solution



FFFF
-3D9E
______
C261

Someone in my class said the answer was c) but do I still add one? I remember the saying "reverse the bits and and one" does that still apply?

Tjvelcro
 
Physics news on Phys.org
  • #2
You are computing 16's complement, not twos complement. And yes, you add 1 at the end to get the answer.
 

FAQ: What is the 2s complement of 0x3D9E?

What is 2s complement with hex?

2s complement is a mathematical operation used in computer systems to represent negative numbers. It involves inverting all the bits in a binary number and then adding 1 to the result. Hexadecimal (hex) is a number system that uses 16 different digits to represent numbers, making it a convenient way to represent binary numbers in a shorter format.

How is 2s complement with hex used in computers?

2s complement with hex is used in computers to perform arithmetic operations on binary numbers, including addition, subtraction, and multiplication. It is also used to convert negative numbers into their binary representation.

What is the advantage of using 2s complement with hex?

The main advantage of using 2s complement with hex is that it allows for more efficient storage and manipulation of negative numbers in computer systems. It also simplifies the process of performing arithmetic operations on binary numbers.

Can 2s complement with hex be used to represent all numbers?

2s complement with hex can only be used to represent integers, meaning whole numbers without any decimal places. Floating-point numbers, which include decimal numbers, require a different representation method.

Are there any limitations to using 2s complement with hex?

One limitation of using 2s complement with hex is that it can only represent numbers within a certain range, depending on the number of bits used. For example, an 8-bit binary number using 2s complement can represent values from -128 to 127. Additionally, using 2s complement with hex can be confusing for some people, as it involves converting between binary and hexadecimal formats.

Back
Top