Hello. I am Dalant117 from the Redstone Development Foundation, And I wanted to give a "class" on BInary!
Lesson 1: Counting in Binary
As most of you may know, Binary is the language of computers. It is a string of 1's and 0's. But those 1's and 0's can actually mean something. After these lessons, You could be as skilled as me, Where you don't even need a converter!
If you think of it this way, it can be quite simple.
Say you have a sting of numbers: (Color to make it easier to see different numbers.)
64 32 16 8 4 2 1
You see that the numbers double themselves from right to left. Out of these numbers you can make any other number from 0 to 127 just by adding any combo of the numbers above.
If you wanted to make a 3, You would add the 1 and 2. The numbers you add turn into 1's and the ones you leave out become 0's. The outcome would be: 0000011
Say you wanted 21.
The outcome would be: 0010101 or 0+0+16+0+4+0+1
Lesson 2: Binary Tables!
To make it easier for you, I whipped up a binary table to help you learn binary!
Hopefully the chart above can help you. But I can hear you yelling:
"But Dalant! What about letters!"
That, My friend, Is a great question! You see, Binary can't run a computer by telling the computer: 124345432532625
That just doesn't work. But with only 1's and 0's, Wouldn't letters have the same binary number as... Well... Real numbers? Well... Yes and No...
That's for the next lesson!
Lesson 3: Binary Letters! Thanks to veloxsouth
Binary is just a way to encode numbers, so if you need an alphabet to be represented, you need a way toencode all of these letters to specific, unique numbers. The easiest and quite common encoding scheme is ASCII encoding, found here. http://www.asciitable.com/
On the website I have linked, the Dec column represents the normal numbers you are familiar with.
For example: If you want to encode something like the Uppercase 'M', look up its "Dec" number in the table. 'M' is 77. Convert 77 to binary and you will get 1001101. 1001101 Lesson 4: What does Minecraft have to do with this?
Well, Have you ever built a 2 bit "binary" adder? It's pretty much an XOR hooked to another XOR on one side and the other being the carry in. In a 2 bit adder, You have 3 output lines. 2 of them come from the XOR's and the last one is the carry out of the last XOR.
Notice that when you add some numbers, it comes out on those lines. It comes out in binary! So if you add 1 and 2, it will output 011! Just like it should. Which is a binary 3. If you don't know how to read binary, That could make absolutely no sense! But you have just read this. So you should know! That wraps up the class for today, (Bell rings) I hope to see you all tomorrow for the next lesson!
Binary is just a way to encode numbers, so if you need an alphabet to be represented, you need a way to encode all of these letters to specific, unique numbers. The easiest and quite common encoding scheme is ASCII encoding, found here. http://www.asciitable.com/
On the website I have linked, the Dec column represents the normal numbers you are familiar with.
For example:
If you want to encode something like the Uppercase 'M', look up its "Dec" number in the table.
'M' is 77.
Convert 77 to binary and you will get 1001101.
1001101
The range of decimal values for a 7 digit binary number is from 0 to 127, not 1 to 98.
Your binary table is incomplete, and would be excessively long for a 7 digit binary number. If you want to count from 0 to 9, as you would if you were using BCD (Binary Coded Decimal) for seven segment displays, you'd want a table resembling something more like this:
Your character 'a' is codified as a decimal 97 in ASCII I believe. As for what this means in Redstone, this fact is highly irrelevant unless you've built a Redstone computer with an input system that must understand ASCII text.
Logic circuits are outside the scope of learning to count in binary. Yes, you do need to know what binary is in order to understand logic circuits, but you haven't done that yet.
Would anybody be interested in an introduction to logic circuits given by myself? I would go over base systems, (decimal, binary, octal, hexadecimal, and how to convert between different bases) logic gates, boolean algebra, K-mapping, AOI logic circuits, and NAND and NOR gate universality. If that goes well I might continue with sequential logic. (Latches, flip-flops, counters, analyzing state machines, building state machines with excitation tables, and advanced sequential logic blocks. [Registers, shift registers, and load-shift-registers]) I would start my own topic, but I've never been able to gauge this forum's interest in logic-circuits. Redstuff architects don't seem to realize how much more in common Redstone has with logic circuits and electrical engineering than computer science. (I happen to be studying electrical engineering.)
Lesson 1: Counting in Binary
As most of you may know, Binary is the language of computers. It is a string of 1's and 0's. But those 1's and 0's can actually mean something. After these lessons, You could be as skilled as me, Where you don't even need a converter!
If you think of it this way, it can be quite simple.
Say you have a sting of numbers: (Color to make it easier to see different numbers.)
64 32 16 8 4 2 1
You see that the numbers double themselves from right to left. Out of these numbers you can make any other number from 0 to 127 just by adding any combo of the numbers above.
If you wanted to make a 3, You would add the 1 and 2. The numbers you add turn into 1's and the ones you leave out become 0's. The outcome would be: 0000011
Say you wanted 21.
The outcome would be: 0010101 or 0+0+16+0+4+0+1
Lesson 2: Binary Tables!
To make it easier for you, I whipped up a binary table to help you learn binary!
Hopefully the chart above can help you. But I can hear you yelling:
"But Dalant! What about letters!"
That, My friend, Is a great question! You see, Binary can't run a computer by telling the computer: 124345432532625
That just doesn't work. But with only 1's and 0's, Wouldn't letters have the same binary number as... Well... Real numbers? Well... Yes and No...
That's for the next lesson!
Lesson 3: Binary Letters! Thanks to veloxsouth
Binary is just a way to encode numbers, so if you need an alphabet to be represented, you need a way toencode all of these letters to specific, unique numbers. The easiest and quite common encoding scheme is ASCII encoding, found here. http://www.asciitable.com/
On the website I have linked, the Dec column represents the normal numbers you are familiar with.
For example:
If you want to encode something like the Uppercase 'M', look up its "Dec" number in the table.
'M' is 77.
Convert 77 to binary and you will get 1001101.
1001101
Lesson 4: What does Minecraft have to do with this?
Well, Have you ever built a 2 bit "binary" adder? It's pretty much an XOR hooked to another XOR on one side and the other being the carry in. In a 2 bit adder, You have 3 output lines. 2 of them come from the XOR's and the last one is the carry out of the last XOR.
Notice that when you add some numbers, it comes out on those lines. It comes out in binary! So if you add 1 and 2, it will output 011! Just like it should. Which is a binary 3. If you don't know how to read binary, That could make absolutely no sense! But you have just read this. So you should know! That wraps up the class for today, (Bell rings) I hope to see you all tomorrow for the next lesson!
Binary is just a way to encode numbers, so if you need an alphabet to be represented, you need a way to encode all of these letters to specific, unique numbers. The easiest and quite common encoding scheme is ASCII encoding, found here. http://www.asciitable.com/
On the website I have linked, the Dec column represents the normal numbers you are familiar with.
For example:
If you want to encode something like the Uppercase 'M', look up its "Dec" number in the table.
'M' is 77.
Convert 77 to binary and you will get 1001101.
1001101
The range of decimal values for a 7 digit binary number is from 0 to 127, not 1 to 98.
Your binary table is incomplete, and would be excessively long for a 7 digit binary number. If you want to count from 0 to 9, as you would if you were using BCD (Binary Coded Decimal) for seven segment displays, you'd want a table resembling something more like this:
Your character 'a' is codified as a decimal 97 in ASCII I believe. As for what this means in Redstone, this fact is highly irrelevant unless you've built a Redstone computer with an input system that must understand ASCII text.
Logic circuits are outside the scope of learning to count in binary. Yes, you do need to know what binary is in order to understand logic circuits, but you haven't done that yet.
Would anybody be interested in an introduction to logic circuits given by myself? I would go over base systems, (decimal, binary, octal, hexadecimal, and how to convert between different bases) logic gates, boolean algebra, K-mapping, AOI logic circuits, and NAND and NOR gate universality. If that goes well I might continue with sequential logic. (Latches, flip-flops, counters, analyzing state machines, building state machines with excitation tables, and advanced sequential logic blocks. [Registers, shift registers, and load-shift-registers]) I would start my own topic, but I've never been able to gauge this forum's interest in logic-circuits. Redstuff architects don't seem to realize how much more in common Redstone has with logic circuits and electrical engineering than computer science. (I happen to be studying electrical engineering.)