Binary Addition - 2's Compliment Representation

Click For Summary
SUMMARY

This discussion focuses on binary addition using 2's complement representation. Participants clarify that when adding binary numbers, if the highest bit (sign bit) is 1, the number is treated as negative in 2's complement, while unsigned numbers are added normally. The range for 8-bit unsigned numbers is 0 to 255, and for signed 8-bit numbers, it is -128 to 127. The addition process remains the same for both unsigned and signed numbers, with the key difference being the interpretation of the highest bit.

PREREQUISITES
  • Understanding of binary arithmetic
  • Familiarity with 2's complement representation
  • Knowledge of signed and unsigned number ranges
  • Basic skills in binary addition
NEXT STEPS
  • Study the process of converting binary numbers to 2's complement
  • Learn about overflow detection in binary addition
  • Explore the implications of signed vs. unsigned binary numbers
  • Practice binary addition problems involving both signed and unsigned numbers
USEFUL FOR

Students learning binary arithmetic, computer science enthusiasts, and anyone studying digital systems or computer architecture.

Marcin H
Messages
306
Reaction score
6

Homework Statement


Screen Shot 2016-09-06 at 7.27.10 PM.png


Homework Equations


Binary Arithmetic

The Attempt at a Solution


Is this the right way to do these problems? If I see a binary 1 at the beginning of the binary number do I just do the 2's compliment of that and add them? I am not too sure what it means by assume numbers are represented in 2's compliment. How do I add them exactly?

New Doc 22_1 (1).jpg
 

Attachments

  • New Doc 22_1.jpg
    New Doc 22_1.jpg
    17.6 KB · Views: 580
Physics news on Phys.org
Marcin H said:

Homework Statement


View attachment 105541

Homework Equations


Binary Arithmetic

The Attempt at a Solution


Is this the right way to do these problems?
You did the 2nd part of problem 1. You still need to do the first part of this problem, and both parts of the other four problems.

Marcin H said:
If I see a binary 1 at the beginning of the binary number do I just do the 2's compliment of that and add them? I am not too sure what it means by assume numbers are represented in 2's compliment. How do I add them exactly?
For the 1st parts of the five problems, the assumption is that they are all unsigned numbers, so you would add them as you normally would binary numbers. As an aside, 8-bit unsigned numbers have a range of 0 through 255 in base 10. Signed 8-bit numbers have a range of -128 through 127, base 10.

For the 2nd parts, the assumption is that they are unsigned numbers. A number with a 1 in the highest bit represents a negative number. If the highest bit is 0, the number is positive or maybe zero.
Marcin H said:
 
  • Like
Likes   Reactions: Marcin H
Marcin H said:
If I see a binary 1 at the beginning of the binary number do I just do the 2's compliment of that and add them?
You just add the numbers. The actual addition of unsigned and 2's complement numbers produces the same result, with the only difference in the detection of a carry for unsigned numbers or overflow for signed numbers.
 
  • Like
Likes   Reactions: Marcin H

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 15 ·
Replies
15
Views
4K