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?
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
I am trying to run an .ipynb file and have installed Miniconda as well as created an environment as such -conda create -n <env_name> python=3.7 ipykernel jupyter I am assuming this is successful as I can activate this environment via the anaconda prompt and following command -conda activate <env_name> Then I downloaded and installed VS code and I am trying to edit an .ipynb file. I want to select a kernel, via VS Code but when I press the button on the upper right corner I am greeted...
Back
Top