where can I learn binary code?

Discussion in 'Community' started by phreakout13, Feb 20, 2004.

  1. phreakout13 macrumors 6502

    phreakout13

    Joined:
    Jan 4, 2004
    Location:
    South Eastern MA
    #1
    Does anyone have any good links? I wanna learn it sooo bad! Thanks:)
     
  2. Sun Baked macrumors G5

    Sun Baked

    Joined:
    May 19, 2002
    #2
    Are you insane?

    At least learn how to code in assembly instead on binary.

    It's a bit easier than binary... though knowing how to twiddle bits does help.

    It's not like we use punchcards and paper tape anymore.
     
  3. HexMonkey Administrator

    HexMonkey

    Staff Member

    Joined:
    Feb 5, 2004
    Location:
    New Zealand
    #3
    Try http://www.learnbinary.com

    I'm not sure how much you already know, but I'll give a brief overview of the basics.

    Our counting system is base 10, because it has 10 digits, 0..9. In this system, numbers are represented in powers of 10, eg 123 = 1x10^2 + 2x10^1 + 3x10^0
    Binary is a base 2 system, because it has just 2 digits, 0 and 1. Hence they are represented as powers of 2. eg 101 = 1x2^2 + 0x2^1 + 1x2^0.

    In this way any integer can be converted to binary. On computers, each character has a value from 0 to 255 (or to 65355 in unicode) that can then be represented in binary. Eg 'a' is represented by 97=64+32+0+0+0+0+1=1100001 in binary.
     
  4. phreakout13 thread starter macrumors 6502

    phreakout13

    Joined:
    Jan 4, 2004
    Location:
    South Eastern MA
    #4
    I don't want to learn it fluently, I just wanna get the jist of it. It would be good to know.
     
  5. Sun Baked macrumors G5

    Sun Baked

    Joined:
    May 19, 2002
    #5
    There's usually a quick guide/tutorial part of many computer departments that swings people through binary numbers, logic, bit manipulation and the basics of how the numbers are stored in memory.

    Somebody should know where an on-line instant course is.
     
  6. jefhatfield Retired

    jefhatfield

    Joined:
    Jul 9, 2000
    #6
    unless you are uncle sam and the funds are not there for getting new machines and replacing longtime workers who keep such an old system intact...they also have vacuum tube stuff which surprises people when they see it

    ...but being a longtime guitar player, electric guitar player especially, i know what a 6L6 and EL34 tube are:p
     
  7. Coca-Cola macrumors 6502

    Joined:
    Dec 10, 2002
    Location:
    WA
    #7
    0 is for power off, and 1 is for power on. There ya go.
     
  8. scem0 macrumors 604

    scem0

    Joined:
    Jul 16, 2002
    Location:
    back in NYC!
    #8

    that's pretty much the jist of it.

    I don't know why binary would help you or why you want to learn it. It is really no fun at all.

    The simplest explanation I can give you is this:
    There are 8 bits in a byte. a bit is represented by a 0 or a 1. Each bit has a value which is a power of 2 and are typically arranged in counter-numeric order:
    (notice that there are eight numbers below:)
    2^7---------------2^0
    128 64 32 16 8 4 2 1

    The smallest number in binary would be
    128 63 32 16 8 4 2 1
    0 0 0 0 0 0 0 0
    which would be (suprise suprise ;)) 0.

    A 1 siginifies that the number that that bit represents represents part of the value of that number.

    For example

    128 63 32 16 8 4 2 1
    0 0 0 0 0 0 0 1
    means 1 because 128-2 is off, but the 1 'slot' is on, so the 1 'counts'.

    128 63 32 16 8 4 2 1
    0 0 0 0 0 0 1 1
    would not be 2, but 3. The 1 and 2 are 'on' and so they would be added together.

    Therefore

    128 63 32 16 8 4 2 1
    1 1 1 1 1 1 1 1

    would be 256, because 128 + 63 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

    So it is simple and easy enough to work backwards with this logic.

    0 0 0 0 0 1 0 1

    If I saw this number I'd know the 1 and 4 slots are on, so i'd know the number was 5.

    But typically that number would omit the 0's on the left hand side and would be written: 101

    you get to know what different numbers are just by looking at them. I don't have to think to know 1010 is 10, or that 11111111 is 255, etc.

    So it is really quite simple. 0 = off, 1 = on, any number between 0 and 255 in a byte, and that is equal to 256 different values (notice 256 just happens to be a power of 2). Add the numbers. Boom, your done.

    Hopefully that helps.

    scem0
     
  9. phreakout13 thread starter macrumors 6502

    phreakout13

    Joined:
    Jan 4, 2004
    Location:
    South Eastern MA
  10. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #10
    Now somebody can explain how to do floating-point calculations in binary.

    Warning: Not for the faint of heart. I sense somebody's brain exploding :eek:
     
  11. raiderz182 macrumors regular

    Joined:
    Oct 17, 2003
    Location:
    north philly
  12. Krizoitz macrumors 6502a

    Krizoitz

    Joined:
    Apr 26, 2003
    Location:
    Wakayama, Japan
    #12
    Whats really confusing is when you deal with proccesors and low-endian and high-endian where they put the significant bit on different ends.
     
  13. Dale Sorel macrumors 6502a

    Dale Sorel

    Joined:
    Jan 12, 2003
    #13
    Re: where can I learn binary code?

    Can you count to one?

    ;)
     
  14. agreenster macrumors 68000

    agreenster

    Joined:
    Dec 6, 2001
    Location:
    Walt Disney Animation Studios
    #14
    Too late. I think my head already 'sploded.

    I think I'll stick to Maya. Way easier.
     
  15. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #15
    cool thing is to know your age in binary :)

    like for example i'm 14, so the binary equivalent would be 1110.
     
  16. KC9AIC macrumors 6502

    KC9AIC

    Joined:
    Jan 31, 2004
    Location:
    Tokyo, Japan or Longview, Texas
    #16
    I learned to use binary, hex, and octal from my math textbook and some old mac books. Hex is useful in ResEdit.

    My age in binary goes to 5 digits.
     
  17. jefhatfield Retired

    jefhatfield

    Joined:
    Jul 9, 2000
    #17
    uber is 4, you are 5, and i am 6 digits

    and desertrat, who frequents the political forums and served in the war in korea, is a staggering 7 digits

    but i don't know if there is anyone who has reached 8 digits..the oldest confirmed person, at least in the united states, that i have heard of was a 121 year old son of a former slave who was in a timex ad

    sometimes i hear of people considerably older than 100 in the news but who has ever reached 128 years old?
     

Share This Page