Results 1 to 7 of 7

Thread: Help Base 2

  1. #1

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Alright fellas, I need some help. I'm horrible at base numbers and I need to add: 11100001 with 101011, where both #'s are base 2. Please Help.

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    in decimal: 268
    in binary: 100001100

    sorry but its been a while since I've done these...chances are they're wrong...someone check me work please

  3. #3
    Lively Member
    Join Date
    Jun 2000
    Posts
    122
    You were right Steve. I am guessing that you guys did this by hand? If so, you can use Windows' calculator program to do the calculations for you. Also, I have this book on Assembly that explains this stuff very well. If you would like me to post it, I would be happy to.

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I guess I kinda peeked at the calculator A few weeks ago many people made some very good programs to do just what you are looking for

  5. #5

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Thanks everyone, I told myself I wouldn't use the calc untill I fully grasped the concepts around the base conversions. Thanks again

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    not really a issue about base convertion, i guess you know how to add up two numbers with base 10, you do:
    Code:
      (1)
       15
    +  16
    ______
       31
    same thing goes for binary addition, except that 2 is considered as 10 and therefore will carry to next decimal.
    Code:
     (1)
       10
    +  11
    ______
      101
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    On the topic of addition, the addition circuit in ALU's (the aritmetic logic unit in cpu) does exactly the same thing. A lookuptable would look like this:
    Code:
    A   B   Carry(in)  Result   Carry(out)
    ___________________________________
    0   0   0              0           0 
    0   0   1              1           0
    0   1   0              1           0
    0   1   1              0           1
    1   0   0              1           0
    1   0   1              0           1
    1   1   0              0           1
    1   1   1              1           1
    So what it does is start with the last bits and looks up the match giving the result bit and the carry bit which is used in the next addition with the next 2 bits
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width