All a computer can understand is "on" and "off" (or yes/no, passing/not passing, whatever/not whatever) because it uses some sort of switches that block the current or block it. Depending on whether the current passes or not, each "switch" reads either a 1 or 0
<!--QuoteBegin--Mr. Headcrab+Jul 2 2003, 11:50 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Mr. Headcrab @ Jul 2 2003, 11:50 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> there are 10 types of people: those who understand binary and those who dont... <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> Who had that as their sig once?
Why is metric base 10 anyway? American measurment was meant to be retarded I thnk. But metrics was actually thought out scientifically, so why base10? base8 makes more sense because dividing by 2 doesent go into fractions of numbers until you divide below 1 and even then, the math is much more simplified.
starting with 8 (wich is now 10 mind you) and dividing by 2... 10 > 4 > 2 > 1 > 0.4 > 0.2 > 0.1 > 0.04 > 0.02 > 0.01 ....and so on ito infinity
well...thats my stupid thought for the day <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
<!--QuoteBegin--[p4]Samwise+Jul 3 2003, 03:44 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([p4]Samwise @ Jul 3 2003, 03:44 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->What did you use for digits?<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd--> We used the normal decimal system, but placed commas between the digits. One million would be 4,37,46,40. See if you can figure out what 22,17 is.
we have to learn all binary, adding, subtracting, 2`s complinamnet and bit sign all in binary.
but at least me all undertsand it <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
coilAmateur pirate. Professional monkey. All pance.Join Date: 2002-04-12Member: 424Members, NS1 Playtester, Contributor
edited July 2003
Easiest way to think about Base-X counting systems (binary = base 2; hexadecimal = base 16, octal = base 8, decimal = base 10) is that whatever X is, that number is now 10. Additionally, "X" does not exist as X in that numbering system! For instance, you will never write "8" in octal - you will write 6, 7, 10, 11. You do write "16" in hexadecimal, but 16 in hex = 22 in decimal.
Binary: 00, 01, 10. 10 = 2. Octal: 0, 1, 2, 3, 4, 5, 6, 7, 10. 10 = 8. Decimal: 0 1 2 3 4 5 6 7 8 9 10. 10 = 10. Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F 10. 10 = 16.
Don't think of 10 as a number, but as two place values. In any numbering system, you can break down each place value into an exponent.
In binary, 1010 = 1x2^3 + 0x2^2 + 1x2^1 + 0x2^0 translation: 8+0+2+0 = 10. 1010 in binary = 10 in decimal.
In hex, 3A8 = 3x16^2 + 10x16^1+8x16^0 (remember, A = 10 in decimal) translation: 768+160+8 (because 16^0 = 1) = 936.
Now, look at decimal, which is base 10.
6384 = 6x10^3 + 3x10^2 + 8x10^1 + 4x10^0 translation: 6000 + 300 + 80 + 4... hmm... looks pretty familiar! 6384, which is exactly what we started with (since we were "converting" decimal to decimal!).
KungFuSquirrelBasher of MuttonsJoin Date: 2002-01-26Member: 103Members, NS1 Playtester, Contributor
<!--QuoteBegin--Parasite+Jul 3 2003, 04:14 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Parasite @ Jul 3 2003, 04:14 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> American measurment was meant to be retarded I thnk. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> Hey, bucko, we didn't invent it. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Don't blame us.
Anyway. It's really fun to do the whole "base greater than 10" thing when you're creating your own language and symbols. Not that I've ever spent time doing that. Nope, no reason I'd be doing anything like that at all. *whistles innocently, wondering if that last bit will go unnoticed*
Just wondering, since I study computer engineering, that is there different binary codecs for, say; microchips and other hardware? In another words: does the software binary differ from hardware binary? <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
yes it does say something.... <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd--> thank you doom for that helpful tutorial...
that is what he said....
this is very fun stuff to me.. i actually enjoy binary... anyone here have to do Logic? like Logic gates and such? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> Yes, sort of. Well, we covered it in Foundations of Computer Science 151, but we aren't making chips or anything.
I wanna be able to comprehend too! Seems like the popular thing to do <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
<!--QuoteBegin--Tails+Jul 3 2003, 08:23 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Tails @ Jul 3 2003, 08:23 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Just wondering, since I study computer engineering, that is there different binary codecs for, say; microchips and other hardware? In another words: does the software binary differ from hardware binary? <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
<!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html/emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> The beauty of software is that layers of abstraction are easy to pile on. Machine code has to speak the same language as the hardware it's running on (ie, the bits in the machine code match up with things that the CPU is hardwired to know how to process), but anything higher-level doesn't need to bother with binary. When you're writing C code, for example, you don't need to worry about how a floating-point number is represented by the hardware - you just type "float pi = 3.14" and your compiler turns it into the appropriate machine code representation. It's magic!
Or is that not what you meant by "binary codecs"? I haven't studied hardware that much...
<!--QuoteBegin--[p4]Samwise+Jul 3 2003, 02:19 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([p4]Samwise @ Jul 3 2003, 02:19 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> The beauty of software is that layers of abstraction are easy to pile on. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> Indeed.
I think what Dubbilex was asking was if for different CPU architectures whether different instructions are called by the cpu, and the answer would be yes.
<!--QuoteBegin--Pjofsky+Jul 3 2003, 11:16 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Pjofsky @ Jul 3 2003, 11:16 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->DOOManiac, do something useful and host us a DOOM server, ja?<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd--> What, you don't think a thorough explanation of something as truly geek-oriented as conversing in binary is useful? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
Sadly, I'll probably never escape binary as I rarely get the luxury of being able to code in a nice language like C/C++.
Programming a microcontroller, for example, is typically done at the machine/assembly-language level. Electronics design is the same way - there's only two states a contact can have (<i>well three, if you want to be really picky</i>).
While you <i>can</i> do microcontroller programming in C and then use a translator, it's basically the same thing as doing a website with Dreamweaver - it gets the job done, but there's an insane amount of bloated code that takes up far too much space.
<!--QuoteBegin--[p4]Samwise+Jul 4 2003, 03:11 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([p4]Samwise @ Jul 4 2003, 03:11 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> For a long time, assembly was my favorite language.
You still don't really need to deal with binary, though, do you? I mean, doesn't the assembler handle most of those details? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd--> It's typically assembly for the instructions, and binary for configuring the control registers.
Of course, if anything goes wrong (and it typically does), it's sometimes necessary to get a bitstream output, and then troubleshoot the code <i>in binary</i>. This, as I'm sure you can imagine, is the most tedious and frustrating part of the job. <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
"Frustrating." I'd say boring as hell. If our class has to do a few more lab exams like that.... <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo-->
010100010010100001001001110000100110100 tell me what that says plz <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
NarfwakJoin Date: 2002-11-02Member: 5258Members, Super Administrators, Forum Admins, NS1 Playtester, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, Subnautica PT Lead, NS2 Community Developer
Whoever can explain the differences between signed and unsigned binary (as well as the different methods used to represent signed binary) gets a cewkie and a cool point in my book. I'd do it, but I can't remember and I don't want to go hunting for my CSII book.
It's done with two's compliment (might vary with implementation, of course). We had to know how to do two's compliment binary addition for Foundations of Computer Science 151. It's very simple. To convert from normal to two's compliment:
1: Flip all the bits. Make all the 1s 0s and all the 0s 1s. (One's compliment) 2: Add one.
Two's compliment of the number is its negative version, so then you just add the numbers. Voila, subtraction. It actually works, too.
8 - 5 = 3
8 = 1000 5 = 0101
One's compliment of 5: 1010
Two's compliment of 5 (add one): 1011
Now add them (ignore the carry out): ..1000 +1011 =0011
And guess what? 0011 is 3.
That's just for integers. IEEE floating point stores negative numbers differently. But this is how subtraction is actually computed, no matter how the information is actually stored.
<!--QuoteBegin--KungFuSquirrel+Jul 3 2003, 03:47 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (KungFuSquirrel @ Jul 3 2003, 03:47 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin--Parasite+Jul 3 2003, 04:14 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Parasite @ Jul 3 2003, 04:14 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> American measurment was meant to be retarded I thnk. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd--> Hey, bucko, we didn't invent it. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Don't blame us.
Anyway. It's really fun to do the whole "base greater than 10" thing when you're creating your own language and symbols. Not that I've ever spent time doing that. Nope, no reason I'd be doing anything like that at all. *whistles innocently, wondering if that last bit will go unnoticed* <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd--> NOPE yer caught...and dun worry, Im a Yank also <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
I have done that....sad really heheh, but fun nerd stuff. Anyway my language and the numbers are one in the same and its all base8 (Or Octal as Coil clarified <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->) I also thought up a magic system, construction style, hierarchy and government system for the race that created created the language...yes...I am the uber dork. The truly ironic thing is that I dont read books and dont play D&D...just video games and movies.
Comments
all a computer can do is add 1+1 really, really, really fast. Technically it can't even subtract (just adds multiplicitive inverse).
Who had that as their sig once?
yes it does say something.... <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
thank you doom for that helpful tutorial...
that is what he said....
this is very fun stuff to me.. i actually enjoy binary... anyone here have to do Logic? like Logic gates and such?
starting with 8 (wich is now 10 mind you) and dividing by 2...
10 > 4 > 2 > 1 > 0.4 > 0.2 > 0.1 > 0.04 > 0.02 > 0.01 ....and so on ito infinity
as opposed to...
10 > 5 > 2.5 > 1.25 > 0.625 > 0.3125 > 0.15625 > 0.078125 > 0.0390625 > 0.01953125 ...and blah blah blah
well...thats my stupid thought for the day <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
We used the normal decimal system, but placed commas between the digits.
One million would be 4,37,46,40.
See if you can figure out what 22,17 is.
And now you've made my brain bleed again.
0000001101001011101000010110000100000011100110110111100100000010010010010011101101100011011
0000100000011010100111010101110011011101000010000001110101011100110110010100100000011011010
1111001001000000111001101110101011100000110010101110010001000000110001001101001011011100110
0001011100100111100100100000011101000111001001100001011011100111001101101100011000010111010
0011001010111001000100001001000010010000100100001001100010110111101101110011001010110111101
1011100110010100100001011001010110110001100101011101100110010101101110
but at least me all undertsand it <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Binary: 00, 01, 10. 10 = 2.
Octal: 0, 1, 2, 3, 4, 5, 6, 7, 10. 10 = 8.
Decimal: 0 1 2 3 4 5 6 7 8 9 10. 10 = 10.
Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F 10. 10 = 16.
Don't think of 10 as a number, but as two place values. In any numbering system, you can break down each place value into an exponent.
In binary, 1010 = 1x2^3 + 0x2^2 + 1x2^1 + 0x2^0
translation: 8+0+2+0 = 10. 1010 in binary = 10 in decimal.
In hex, 3A8 = 3x16^2 + 10x16^1+8x16^0
(remember, A = 10 in decimal)
translation: 768+160+8 (because 16^0 = 1) = 936.
Now, look at decimal, which is base 10.
6384 = 6x10^3 + 3x10^2 + 8x10^1 + 4x10^0
translation: 6000 + 300 + 80 + 4... hmm... looks pretty familiar! 6384, which is exactly what we started with (since we were "converting" decimal to decimal!).
Hey, bucko, we didn't invent it. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Don't blame us.
Anyway. It's really fun to do the whole "base greater than 10" thing when you're creating your own language and symbols. Not that I've ever spent time doing that. Nope, no reason I'd be doing anything like that at all. *whistles innocently, wondering if that last bit will go unnoticed*
<!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html/emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif'><!--endemo-->
yes it does say something.... <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
thank you doom for that helpful tutorial...
that is what he said....
this is very fun stuff to me.. i actually enjoy binary... anyone here have to do Logic? like Logic gates and such? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Yes, sort of. Well, we covered it in Foundations of Computer Science 151, but we aren't making chips or anything.
Oh I dunno, maybe cause we have 10 fingers?
What the hell.....
I wanna be able to comprehend too! Seems like the popular thing to do <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
<!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html/emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
The beauty of software is that layers of abstraction are easy to pile on. Machine code has to speak the same language as the hardware it's running on (ie, the bits in the machine code match up with things that the CPU is hardwired to know how to process), but anything higher-level doesn't need to bother with binary. When you're writing C code, for example, you don't need to worry about how a floating-point number is represented by the hardware - you just type "float pi = 3.14" and your compiler turns it into the appropriate machine code representation. It's magic!
Or is that not what you meant by "binary codecs"? I haven't studied hardware that much...
Indeed.
I think what Dubbilex was asking was if for different CPU architectures whether different instructions are called by the cpu, and the answer would be yes.
What, you don't think a thorough explanation of something as truly geek-oriented as conversing in binary is useful? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
Sadly, I'll probably never escape binary as I rarely get the luxury of being able to code in a nice language like C/C++.
Programming a microcontroller, for example, is typically done at the machine/assembly-language level. Electronics design is the same way - there's only two states a contact can have (<i>well three, if you want to be really picky</i>).
While you <i>can</i> do microcontroller programming in C and then use a translator, it's basically the same thing as doing a website with Dreamweaver - it gets the job done, but there's an insane amount of bloated code that takes up far too much space.
I do not envy your job Sycophant. Though I hope for your sake you get big bucks to compensate for such mind shattering work :)
You still don't really need to deal with binary, though, do you? I mean, doesn't the assembler handle most of those details?
You still don't really need to deal with binary, though, do you? I mean, doesn't the assembler handle most of those details? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
It's typically assembly for the instructions, and binary for configuring the control registers.
Of course, if anything goes wrong (and it typically does), it's sometimes necessary to get a bitstream output, and then troubleshoot the code <i>in binary</i>. This, as I'm sure you can imagine, is the most tedious and frustrating part of the job. <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
1: Flip all the bits. Make all the 1s 0s and all the 0s 1s. (One's compliment)
2: Add one.
Two's compliment of the number is its negative version, so then you just add the numbers. Voila, subtraction. It actually works, too.
8 - 5 = 3
8 = 1000
5 = 0101
One's compliment of 5:
1010
Two's compliment of 5 (add one):
1011
Now add them (ignore the carry out):
..1000
+1011
=0011
And guess what? 0011 is 3.
That's just for integers. IEEE floating point stores negative numbers differently. But this is how subtraction is actually computed, no matter how the information is actually stored.
Hey, bucko, we didn't invent it. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> Don't blame us.
Anyway. It's really fun to do the whole "base greater than 10" thing when you're creating your own language and symbols. Not that I've ever spent time doing that. Nope, no reason I'd be doing anything like that at all. *whistles innocently, wondering if that last bit will go unnoticed* <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
NOPE yer caught...and dun worry, Im a Yank also <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
I have done that....sad really heheh, but fun nerd stuff. Anyway my language and the numbers are one in the same and its all base8 (Or Octal as Coil clarified <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->) I also thought up a magic system, construction style, hierarchy and government system for the race that created created the language...yes...I am the uber dork. The truly ironic thing is that I dont read books and dont play D&D...just video games and movies.