Converting Signed Hex to Decimal: What is the Correct Solution for -8230?

  • Thread starter Thread starter Sumaya
  • Start date Start date
  • Tags Tags
    Convert
Click For Summary
SUMMARY

The correct conversion of the signed hexadecimal value -8230 to decimal is -32208. The process involves calculating the two's complement of the hexadecimal value. The correct steps are to first find the one's complement of 8230, which is 7DCF, and then add 1, resulting in 7DD0. This value converts to 32208 in decimal, confirming that the final answer should be -32208, not -32214 as initially calculated.

PREREQUISITES
  • Understanding of hexadecimal and decimal number systems
  • Knowledge of two's complement representation
  • Familiarity with binary arithmetic operations
  • Basic programming skills for implementing conversions (optional)
NEXT STEPS
  • Study the process of converting hexadecimal to decimal using two's complement
  • Learn about binary arithmetic operations, specifically one's and two's complement
  • Explore programming libraries or tools for hexadecimal conversions, such as Python's built-in functions
  • Review common pitfalls in number base conversions to avoid similar mistakes
USEFUL FOR

Students in computer science, software developers working with low-level programming, and anyone needing to perform hexadecimal to decimal conversions accurately.

Sumaya
Messages
29
Reaction score
0

Homework Statement



convert signed hex to decimal, 8230

Homework Equations





The Attempt at a Solution




i first make 2's complement of 8230 bcz it is negative

then i convert it to decimal

ffff-8230=7dcf+1=7dd6
7dd6=32214 in decimal

my answer is -32214

but i checked the solution on the book ,it was different .. -32208
i want to know where is my mistake ?
did i do the steps of the converstion right ?


thanx a lot ...
 
Physics news on Phys.org
Sumaya said:

Homework Statement



convert signed hex to decimal, 8230

Homework Equations





The Attempt at a Solution




i first make 2's complement of 8230 bcz it is negative

then i convert it to decimal

ffff-8230=7dcf+1=7dd6
The above has a mistake.
The ones' complement of 8230 is 7DCF. Adding 1 gives you 7DD0, which is 32208 in base-10.
Sumaya said:
7dd6=32214 in decimal

my answer is -32214

but i checked the solution on the book ,it was different .. -32208
i want to know where is my mistake ?
did i do the steps of the converstion right ?


thanx a lot ...
 
thnx a lot
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
Replies
2
Views
1K
Replies
11
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
17K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
10K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K