Help with binary

  • Xenocide
    7th May 2011 Former Staff 0 Permalink
    I was taught Binary, Octal and Hexidecimal in school...

    each 1 or 0 is a bit
    4 bits is a nibble
    8 bits is a byte

    11111111 can also be -127 by the way :P

    00010111 -> 027 -> 23 -> 0x17
    2 -> 7 -> 10 -> 16


  • Anmol444
    7th May 2011 Member 0 Permalink
    My head is hurting. I dont understand a single word any one is saying. Could someone say it simply.
  • MasterMind555
    7th May 2011 Member 0 Permalink
    @Anmol444 (View Post)
    Lol
    Do you get the binary concept?

    128-64-32-16-8-4-2-1
    -------------------------------
    0 0 0 0 0 0 0 0 | = 0
    0 0 0 0 0 0 0 1 | = 1
    0 0 0 0 0 0 1 0 | = 2
    0 0 0 0 0 0 1 1 | = 3

    Isn't it

    I like this

  • Xenocide
    7th May 2011 Former Staff 0 Permalink
    heh

    Decimal is a Base10 counting system. That is, we count 0,1,2,3,4,5,6,7,8,9 then +1 to the next column and start again
    10,11,12,13,14,15,16,17,18,19.

    Binary is Base2, meaning we have 0 and 1.

    In computing, things are usually set in Bytes, which is 8 bits which is 00000000.

    same as in decimal, we count upwards from the right adding to the left.
    Counting to Decimal 10 using 4 bits ( a nibble) looks like this:
    0000
    0001
    0010
    0011
    0100
    0101
    0110
    0111
    1000
    1001
    1010

    Decimal counting goes like this: HTU (Hundred, Ten, Unit) which all know well, and each above unit is a multiple of 10.

    Binary counting goes like this: ABCDEFGH
    A is 128 - B is 64 - C is 32 - D is 16 - E is 8 - F is 4 - G is 2 and H is 1
    each one is a power of 2 (2*2 x times, so 2 to the power of 4 is (((2*2)*2)*2) which is 16)

    9 is the highest you can do in decimal, 1 is the highest in binary.


    I'm half asleep so I hope this makes sense lol
  • randalserrano
    7th May 2011 Member 0 Permalink
    @Anmol444
    It is easy. 256 128 64 32 16 8 4 2 1
    ok when you want to turn a number into a binary number, all you have to do is use simple division. lets say you want to turn 18 into a binary number..
    all you would have to do if figure out the smallest number that would go into it. 256 128 64 32 do not go into it. so all of those numbers would be 0. 16 goes into it 1 so you put a 1 there. but you still have 3. 8 and 4 doesn't go into 3 so those would be 0 also but 2 and 1 go into it so they would be 1 so it would look like this.
    256=0
    128=0
    64=0
    32=0
    16=1
    8=0
    4=0
    2=1
    1=1
    000010011=18
  • BudCharles
    7th May 2011 Member 0 Permalink
  • MasterMind555
    7th May 2011 Member 0 Permalink
    @BudCharles (View Post)
    8 minutes??
    Only 3 minutes is necessary lol
  • Uberness
    7th May 2011 Member 0 Permalink
    @randalserrano (View Post)
    For ASCII capital chars:
    01000001 would be A
    01000010 would be B
    01000011 would be C
    so on............
  • MasterMind555
    7th May 2011 Member 0 Permalink
    @UBERNESS (View Post)
    Waitwhat? There is 31 letters in the alphabet?
    Fun with 0s and 1s huh
  • randalserrano
    7th May 2011 Member 0 Permalink
    wait, im not wanting to know binary letters lol