guildenstern Posted December 7, 2002 Share Posted December 7, 2002 Does anyone know binary arithmatic? n_n If you do, you would be an amazing help! I've got this final exam in my computers class, see, and I have to know how to add *big* binary numbers - heck, I can't even count to 2. ¬_¬ I need to add these numbers: 01010101 + 00010111 + 000111011=? Who wants to be a hero?? ;_; Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 7, 2002 Share Posted December 7, 2002 I'll help. Now, are these just unsigned binary numbers, or are they in some signed form, like 1's complement or 2's complement? And does it matter how you get the answer, just so long as you get it right, or do you have to show work? Link to comment Share on other sites More sharing options...
guildenstern Posted December 7, 2002 Author Share Posted December 7, 2002 It's multiple choice, so all I need is the answer. And as for the first thing you said... what? O_o ^_^ Thank you so much for helpin' me out! Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 7, 2002 Share Posted December 7, 2002 OK... Try 10100111 (167). That should be right if you are doing unsigned binary addition. Link to comment Share on other sites More sharing options...
Wacky_Baccy Posted December 7, 2002 Share Posted December 7, 2002 *blink* Where've I seen this before...? Hmmmz... O.o Link to comment Share on other sites More sharing options...
Jabba The Hunt Posted December 7, 2002 Share Posted December 7, 2002 binary addition is easy this is how to do it 01010101 00010111 + _________ 01101100 _________ 1 111 ok heres how it works one 1 just right the 1 in the answer two 1's carry the 1 but put a 0 in the answer three 1's carry the 1 and put a 1 in the answer now just let me check that on a calculator... yep im right. (use bin mode in windows calculator) Link to comment Share on other sites More sharing options...
Nitro Posted December 7, 2002 Share Posted December 7, 2002 I think the question we really need to be asking ourselves, is why the heck is --g learning binary? Link to comment Share on other sites More sharing options...
Commander 598 Posted December 7, 2002 Share Posted December 7, 2002 Originally posted by Jabba The Hunt binary addition is easy this is how to do it 01010101 00010111 + _________ 01101100 _________ 1 111 ok heres how it works one 1 just right the 1 in the answer two 1's carry the 1 but put a 0 in the answer three 1's carry the 1 and put a 1 in the answer now just let me check that on a calculator... yep im right. (use bin mode in windows calculator) WRONG! Now go sit in the corner! And put the dunce cap on! Link to comment Share on other sites More sharing options...
Nitro Posted December 7, 2002 Share Posted December 7, 2002 Agreed. 167. Link to comment Share on other sites More sharing options...
Flying Beastie Posted December 7, 2002 Share Posted December 7, 2002 Originally posted by Nitro I think the question we really need to be asking ourselves, is why the heck is --g learning binary? Ever seen Reboot: Daemon Rising? Remember the Binary Suicide CodeTM? . . . oh-one-one-one-oh-oh-one-one-oh-one-oh-oh-one-one-one. --Oh! *head explodes* Link to comment Share on other sites More sharing options...
Lujayne Posted December 8, 2002 Share Posted December 8, 2002 Originally posted by Nitro I think the question we really need to be asking ourselves, is why the heck is --g learning binary? ... ¬_¬ And why shouldn't I be? To Beastie: Oh yeah! And thanks for all the answers! n_n Link to comment Share on other sites More sharing options...
Jabba The Hunt Posted December 8, 2002 Share Posted December 8, 2002 I would be interested to know why I'm wrong? Link to comment Share on other sites More sharing options...
Commander 598 Posted December 8, 2002 Share Posted December 8, 2002 *Hits Jabba over the head with a ruler* Did I say you could talk?! Link to comment Share on other sites More sharing options...
Lujayne Posted December 9, 2002 Share Posted December 9, 2002 K, I'm just gonna do some silmpe ones to make sure I understand; can someone tell me if these are right? O_o 1000 1111 +1111 +1111 ______ ______ 10111 11110 :? Oui? Link to comment Share on other sites More sharing options...
Lujayne Posted December 9, 2002 Share Posted December 9, 2002 Oh my goodness, kill me. I just realised I posted the wrong number to be added. -_- I put an extra 0 at the start of the 3rd number. Does that make a difference? It should be this: 01010101 +00010111 +00111011 *NOT* 000111011 -_- Let's see if I can do it. __________ 0111 - uh... what do you do when you have to add 4 zeros? O_o Cuz that would = 100, ne? But you can't carry 2 numbers... oh, poop. Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 9, 2002 Share Posted December 9, 2002 You are correct on those two. And leading zeros make no difference. Now, if it doesn't matter how you get the answers, why not just convert them to decimal, add, and then convert back, if you find it difficult to add in binary? But, here we go: 01010101 00010111 00111011 ________ ________ OK, add 1, 1, and 1. You get 11. Put down 1 and carry the 1: ______1 01010101 00010111 00111011 ________ _______1 Now add 1, 0, 1, and 1. You get 11. Put down 1 and carry the 1: _____11 01010101 00010111 00111011 ________ ______11 Same deal again: ____111 01010101 00010111 00111011 ________ _____111 Now add 1 and 1 and get 10. Put down 0 and carry the 1: ___1111 01010101 00010111 00111011 ________ ____0111 Now add those four 1s. What do you get? 100. So, put down the zero, and carry the 1 and 0 in their respective columns: _101111 01010101 00010111 00111011 ________ ___00111 The next step is obvious: _101111 01010101 00010111 00111011 ________ __100111 As is the next: 1101111 01010101 00010111 00111011 ________ _0100111 And the final step: 1101111 01010101 00010111 00111011 ________ 10100111 So, if you have a multiple digit carry, carry them into two different columns. If you have another carry that needs to be added to one of those, just add them. Just like in decimal addition. Link to comment Share on other sites More sharing options...
Gold leader Posted December 9, 2002 Share Posted December 9, 2002 While we're at it, could someone explain hexadecimal addition as well? Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 9, 2002 Share Posted December 9, 2002 Turn each hex digit into four binary digits and go to town Seriously - what's with the questions about adding numbers in different bases? Addition is addition. Adding in binary is exactly the same as adding in decimal. Why should the meaning or procedure of addition change depending on what base you express the numbers in? Link to comment Share on other sites More sharing options...
Gold leader Posted December 9, 2002 Share Posted December 9, 2002 Well, I didn't know that each hex digit represented 4 binary digits. But I suppose multiplication with binary numbers differs a bit from the decimal base procedures. Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 9, 2002 Share Posted December 9, 2002 Why? It's still multiplication. It's exactly the same. As for the hex thing, that's just a shortcut - you can do it the normal way. Didn't you ever wonder why computers are so confortable with hex? Because it's just binary, basically. Same with any base that's a power of two. An octal (base eight) digit can be viewed as three binary digits, for example. A hex example: In hex: 45D6 In binary: 0100010111010110 See, just break up the binary into chunks of four to see each group of four can be viewed as a hex digit: 0100 = 4 0101 = 5 1101 = D 0110 = 6 Link to comment Share on other sites More sharing options...
Gold leader Posted December 9, 2002 Share Posted December 9, 2002 Thanks! I confess I had to do a small search to find why 1101 = D, but it's actually pretty logical for a base 16. Never thought much about mathematics with other bases than a decimal base, or why computers like hex. It was never a subject in one of my math classes. I think it's a bit of a shame, even though it has little to do with aerospace engineering. Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 9, 2002 Share Posted December 9, 2002 No, I imagine not. But it has everything to do with computer engineering. I am actually more comfortable with hex and binary than decimal now! Sometimes when I'm in some math class or something now, and 1 + 1 comes up in an equation, I replace it by 10. And get the problem wrong, obviously Link to comment Share on other sites More sharing options...
Rogue Nine Posted December 9, 2002 Share Posted December 9, 2002 I dub thee, Keyan Farlander, the resident math geek. Link to comment Share on other sites More sharing options...
Keyan Farlander Posted December 9, 2002 Share Posted December 9, 2002 Cool. *Does funky dance* Link to comment Share on other sites More sharing options...
Jabba The Hunt Posted December 9, 2002 Share Posted December 9, 2002 Commander 598 I know im right, I think your interpreting the binary number differently to me. Hex is also easy as its just base 16, times each digit by 16 and then add that on remeber than if its greater than 9 to add it in the other column. Then simply do the dec maths and if convert it back (doing the opposite of before). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.