Welcome to our community

Be a part of something great, join today!

Adding Binary #s, (Sign and Magnitute Addition)

shamieh

Active member
Sep 13, 2013
539
Can someone explain to me step by step what's going on here? The book acts like a 3rd grader should be able to just look at the model and be able to decipher what's going on, but this is very confusing material.

Perform the following operations involving eight-bit 2's complement numbers and indicate whether arithmetic overflow occurs. Check your answers by converting to decimal sign and magnitude representation.

a) 00110110
+ 01000101
_____________

How do I solve this? I know that these are both positive because they start with 0.

I also know that;
0 + 0 = 00
0 + 1 = 01
1 + 0 = 01
1 + 1 = 10

so I know how to add those together BUT I don't understand how to add the "carry-outs" like if I have:

01
+01
____

would I say

1 + 1 = 0 , carry the 1. Then say 0 + 0 = 00 + 1 = ? 001? I'm just confused on how we evaluate the numbers with the carry outs for this particular problem. Also, suppose I have an eight bit number and one is unsigned or -? (Starts with a 1). How will the solving process then change? I can't find any good examples on google, and my book is disorganized and all over the place with terrible examples that don't clarify anything, or show any steps. If anyone can point me in the direction of a good explanation or can explain that would be great.
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,904
Can someone explain to me step by step what's going on here? The book acts like a 3rd grader should be able to just look at the model and be able to decipher what's going on, but this is very confusing material.

Perform the following operations involving eight-bit 2's complement numbers and indicate whether arithmetic overflow occurs. Check your answers by converting to decimal sign and magnitude representation.

a) 00110110
+ 01000101
_____________

How do I solve this? I know that these are both positive because they start with 0.

I also know that;
0 + 0 = 00
0 + 1 = 01
1 + 0 = 01
1 + 1 = 10

so I know how to add those together BUT I don't understand how to add the "carry-outs" like if I have:

01
+01
____

would I say

1 + 1 = 0 , carry the 1. Then say 0 + 0 = 00 + 1 = ? 001?
Close. Let me show you.
1+1=0, carry the 1.
0+0+1=1, no carry.

Code:
 01
+01
____
 10
a) 00110110
+ 01000101
_____________

0+1=1, no carry
1+0=1, no carry
1+1=1, carry 1
0+0+1=1, no carry

Code:
a)  00110110
  + 01000101
_____________
   .....1111
Perhaps you can finish it?