Sign and Magnitude (Hexadecimal and 8-bit

  • Thread starter Thread starter DarkWing
  • Start date Start date
  • Tags Tags
    Magnitude Sign
Click For Summary
SUMMARY

This discussion focuses on the application of sign and magnitude representation for hexadecimal and 8-bit numbers, specifically in the context of homework problems involving addition and subtraction. The user seeks clarification on how to apply sign and magnitude concepts, which are typically explained for binary numbers, to hexadecimal formats. Key examples provided include operations with signed 16-bit and signed 17-bit hexadecimal numbers, emphasizing the importance of recognizing the leading digit to determine the sign. The conclusion drawn is that a leading digit of 0-7 indicates a positive number, while 8-F indicates a negative number.

PREREQUISITES
  • Understanding of hexadecimal number representation
  • Familiarity with sign and magnitude format in binary numbers
  • Basic arithmetic operations (addition and subtraction) with hexadecimal numbers
  • Knowledge of 8-bit and 16-bit number formats
NEXT STEPS
  • Study the conversion of binary sign and magnitude to hexadecimal format
  • Practice addition and subtraction of signed hexadecimal numbers
  • Learn about 2's complement representation for comparison with sign and magnitude
  • Explore the implications of overflow in signed arithmetic operations
USEFUL FOR

Students studying computer science, particularly those focusing on number representation and arithmetic operations in digital systems, as well as educators teaching these concepts in a classroom setting.

DarkWing
Messages
3
Reaction score
0
First off sorry, but I did away with the automatic formatting.

For a homework assignment I need to do a few problems which involved adding and subtracting hexadecimal and 8-bit numbers being added and subtracted. I've done the problems that involve the unsigned numbers fine, but I'm confused as to how to approach the ones that are in sign and magnitude format. The book only explains sign and magnitude for binary numbers which does not help me as I'm already familiar with them, but am not sure how to apply it for hexadecimal and 8-bit decimal numbers.

For instance one of the problems is:
part a: if A = 0D34 and B = DD17
part b: A = BA1D and B = 3617
assume the numbers are signed 16-bit hexadecimal numbers stored in sign and magnitude format. What is the sum of A and B.

now part a: A = BA7c and B = 241A
part b: A = AADF and B= 47BE

What is A-B if they represent signed 17-bit hexadecimal numbers stored in sign and magnitude format.

I'm hoping if I can get down the basics of sign and magnitude with hexadecimal numbers that I'll be fine with the rest of the homework.

I'm not asking for anyone to do the assignment, but rather just a quick lesson in how to implement sign and magnitude using hexadecimal numbers.
 
Physics news on Phys.org
After more research it appears that if the leading digit is 0-7 the number is positive, but if it is 8-F the number is negative. Is this correct?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
11K
  • · Replies 2 ·
Replies
2
Views
13K
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K