Basic Binary

Discussion in 'Guides' started by SuF, Oct 9, 2009.

Basic Binary
  1. Unread #1 - Oct 9, 2009 at 12:24 PM
  2. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Basic Binary

    Basic Binary
    By SuF​


    What is Binary?

    Binary is a number system that is used mainly in computer systems. It is comparable to the decimal number system that we naturally use with the numbers 0 through 9. Since there are 10 different numbers in the decimal system it is base 10. Binary only has two numbers, 0 and 1, so it is base 2.

    Some examples of binary numbers are:

    101 (5)
    111 (7)
    100001 (33)
    100000011 (259)​

    Counting in Binary

    To understand how to count in binary, let&#8217;s review how to count in the decimal system. You start with a single digit and you count upwards through all 10 digits until you run out at which point you increment the number to the left and restart the counting at 0.

    Example:

    1,2,3,4,5,6,7,8,9,10,11,12&#8230;

    27,28,29,30,31&#8230;

    98,99,100&#8230;

    Now in the binary system, you do the exact same thing except that you only have 2 digits until you have to restart the counting.

    Example:

    0 = 0
    1 = 1
    10 = 2 (We had counted through all the digits so we incremented the place to the left)
    11 = 3
    100 = 4 (This is just like the number &#8216;99&#8217;. Both places were as high as they go so we had to add a third place)
    101 = 5
    110 = 6
    111 = 7
    1000 = 8

    What is explained above is the simplest form of counting in binary, but there is another way which is much easier for bigger numbers.
    In the decimal number system, each place is a power of 10. The first place is 10^0, the second 10^1, the third 10^2 and so on.

    Example

    100 = 10^2
    1000 = 10^3
    2000 = 10^3*2(There is 2 digits in that place)

    This is very useful when it comes to binary, as the same rules apply. The first place is 2^0, the second is 2^1, the third 2^2 and so on.

    Example

    2 = 2^1
    4 = 2^2
    8 = 2^3
    16 = 2^4
    32 = 2^5
    64 = 2^6
    128 = 2^7
    256 = 2^8

    And so on. Notice that with each increasing power, the number doubles. That makes sense because you are multiplying the previous number by 2. This is very useful when trying to find out very large numbers in binary.

    Example:

    Let&#8217;s figure out what the number 150 is in binary.

    Well first we must find what power of 2 is closest without being bigger than the number we are trying to find. In this case this number is 128 or 2^7. Now that we know that, we realize that the number 128 in binary is extremely simple to find as it is a power of two.

    128 = 10000000(Binary)

    The eighth place in a binary number is worth 128 just as the eighth place of the decimal system is worth 10million.

    Now what we must do is take 150 and subtract what we have already, 128 which gives us with 22.

    We now have to repeat the process above until we finish the number.

    16 or 2^4 is closest to 22 which means it is 1 and four 0s, or 1000. Let&#8217;s add that into what we got before (10000000) and we get 10010000. Now we only have 6 left. Highest is 4 or 2^2 or 100 which makes our number 10010100. The 2 left we have is 2^1 or 10 which finally completes our number as 10010110.

    Notice that the place the 1 goes for 2^n is n+1. Example: The place for 2^6 is the 7th place from the right.

    Now try these on your own and check your answers at the bottom of this post.

    1. 203
    2. 450
    3. 789
    4. 1337

    Adding Binary Numbers

    Adding binary numbers is very easy as it follows the exact same steps as adding decimal numbers. Example:

    [​IMG]

    That basic addition is pretty simple yes? You add binary numbers the same way.

    [​IMG]

    As you can see, this is just like decimal addition. When you have two 1s in the same column, it equals a 1 in the column next to it. Example:

    100 = 4
    10 = 2

    Just as is the decimal system, 0s are just place holders and mean nothing. As you can see, each place you go to the left, the value of that place doubles. Another way of looking at 1s and 0s is true or false. Example:

    1001 = 9

    If you were to think of this as:

    TFFT

    Then you see that the 4th place worth 8 is true. The places that are worth 4 and 2 are false and finally the place worth 1 is true. To find the value, you just add all the true values together.

    [​IMG]

    Now in this problem you see some places with three 1s. No problem. This just means that there is 3 times the value of that place, just like when you have two 1s it&#8217;s worth 2 times the value of that place. So you just carry over two of them to the next left place and keep one where it is.

    What if there are more than three 1s? If there are 4, you carry over two 1s, and then deal with that place as you would normally. If it has 5, you carry 2 and leave one where it is. This is just like adding in the decimal system, but it is more confusing since you do not use binary every day.

    Now try these problems on your own and check your answers at the end of the post.

    5. 110 + 111
    6. 10100 + 11101
    7. 10011 + 100101 + 1010011
    8. 1111 + 11001 + 11111 + 1010

    Multiplying Binary Numbers

    Just like addition, multiplying binary numbers works just like multiplying decimal numbers. Example:

    [​IMG]

    That&#8217;s like third grade math? Binary is the same thing, except you get a ton of 0s. Just like in the decimal system, if you multiply anything by 0, you get zero. So, the only time you get a 1 is when you do 1x1. The only hard part about this is that you get a ton of zeros and you have to keep the number of zeros you add to the beginning correct. Example:

    [​IMG]

    Notice now you only get two 1s out of that entire problem. Try these on your own and check your answers at the bottom.

    9. 1001 * 1010
    10. 1110 * 10011
    11. 10101 * 10110
    12. 110011 * 111011

    Answers

    1. 11001011
    2. 111000010
    3. 1100010101
    4. 10100111001
    5. 1101
    6. 110001
    7. 10001011
    8. 1010001
    9. 1011010
    10. 100001010
    11. 111001110
    12. 101111000001
     
  3. Unread #2 - Oct 20, 2009 at 5:22 PM
  4. ioioio175
    Joined:
    Aug 22, 2008
    Posts:
    242
    Referrals:
    1
    Sythe Gold:
    0

    ioioio175 Active Member

    Basic Binary

    =o thats quite a bit to remember but i guess its possible =\
     
  5. Unread #3 - Oct 22, 2009 at 6:02 PM
  6. cowseatcows
    Joined:
    Jan 23, 2009
    Posts:
    1,148
    Referrals:
    0
    Sythe Gold:
    0

    cowseatcows Guru
    Banned

    Basic Binary

    :O, in your sig, you have 10100111001. Is this some binary you want us to decode? :p Thanks for teaching this, I always wanted to know how to write binary. This is gonna take a while to remember.
     
  7. Unread #4 - Oct 30, 2009 at 11:32 PM
  8. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Basic Binary

    I did have that. No one understood it obviously. Binary is easy. Just remember

    2,4,8,16,32,64,128,256,512,1024,2048 etc... Then its easy. And a calculator is nice.
     
  9. Unread #5 - Nov 1, 2009 at 12:32 AM
  10. Looney429
    Joined:
    Oct 11, 2009
    Posts:
    206
    Referrals:
    2
    Sythe Gold:
    0

    Looney429 Active Member
    Banned

    Basic Binary

    Yea I know binary and this is confusing me...
     
  11. Unread #6 - Sep 12, 2012 at 9:21 AM
  12. Just selling accs
    Joined:
    Jul 27, 2012
    Posts:
    460
    Referrals:
    0
    Sythe Gold:
    0

    Just selling accs Forum Addict
    Banned

    Basic Binary

    Interesting... Ima learn Binary just for the hell of it.
     
  13. Unread #7 - Sep 13, 2012 at 5:48 PM
  14. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Basic Binary

    Concise, easy to understand and correct - what more can you ask for? Thanks for this ^_^
     
  15. Unread #8 - Sep 18, 2012 at 12:36 AM
  16. BrawckX
    Joined:
    Aug 7, 2012
    Posts:
    210
    Referrals:
    0
    Sythe Gold:
    0

    BrawckX Active Member
    Banned

    Basic Binary

    Oh binary, we meet again. Good guide ^^ Already knew it all though.
    01000010 01101001 01101110 01100001 01110010 01111001 00100000 01101001 01110011 00100000 01100110 01110101 01101110 00100000 01101111 01101110 01100101 00100000 01010011 01111001 01110100 01101000 01100101 00100001
     
  17. Unread #9 - Sep 20, 2013 at 1:24 PM
  18. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Basic Binary

    Bump.
     
  19. Unread #10 - Jul 14, 2014 at 1:29 AM
  20. FEAR1
    Joined:
    Aug 20, 2005
    Posts:
    113
    Referrals:
    0
    Sythe Gold:
    1

    FEAR1 Active Member

    Basic Binary

    I read the guide before and forgot what it's all covering but I just want to add:

    when you get to 2^10 as in 1024, afterwards you just go 1K, 2K, 4K, 8K, 16K and it's same thing basically.

    Therefore 2^20 is just 1K * 1K = 1MB

    And 2^16 is same as 1K * 2^6 which is 64 equalling 64KB
     
  21. Unread #11 - Dec 21, 2014 at 6:50 PM
  22. Voxxel
    Joined:
    Dec 9, 2014
    Posts:
    207
    Referrals:
    0
    Sythe Gold:
    0

    Voxxel Active Member
    $5 USD Donor New

    Basic Binary

    Great guide, I used to be interested in binary code because it looks so confusing, but you've made it look easy, thank you!

    Question: What is binary used for exactly?
     
  23. Unread #12 - Jan 26, 2015 at 9:04 AM
  24. NightSkyStorm
    Joined:
    Jan 23, 2015
    Posts:
    42
    Referrals:
    0
    Sythe Gold:
    0

    NightSkyStorm Member

    Basic Binary

    Binary is a language understood by the computer and it's mostly important for programmers to understand.
     
  25. Unread #13 - Mar 20, 2015 at 10:16 PM
  26. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Basic Binary

    Binary is a number system. Instead of having 10 symbols (0,1,2,3,4,5,6,7,8,9) it has 2 (0,1) which makes computer very easy to make. One means high current zero means low current.
     
< Getting around a CMD Lock | How to get a 99c custom printed mousepad >

Users viewing this thread
1 guest


 
 
Adblock breaks this site