MHB Adding Binary #s, (Sign and Magnitute Addition)

  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Addition Binary
AI Thread Summary
The discussion focuses on understanding the addition of eight-bit 2's complement binary numbers and how to handle carry-outs during the addition process. The original poster is confused about how to incorporate carry-outs when adding binary digits, especially when both numbers are positive. A participant clarifies that when adding two binary digits, if the sum exceeds 1, the result is 0 with a carry of 1 to the next column. They provide a step-by-step breakdown of the addition process, demonstrating how to handle carry-outs correctly and encouraging the original poster to complete the addition. The conversation highlights the challenges of learning binary arithmetic and the need for clear examples.
shamieh
Messages
538
Reaction score
0
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.
 
Technology news on Phys.org
shamieh said:
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?
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top