PDA

Click to See Complete Forum and Search --> : Help Base 2


Lethal
Feb 12th, 2001, 08:13 PM
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.

SteveCRM
Feb 12th, 2001, 09:57 PM
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 :)

Cybrg641
Feb 12th, 2001, 10:10 PM
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.

SteveCRM
Feb 12th, 2001, 10:59 PM
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 :D

Lethal
Feb 12th, 2001, 11:42 PM
Thanks everyone, I told myself I wouldn't use the calc untill I fully grasped the concepts around the base conversions. Thanks again

kedaman
Feb 13th, 2001, 09:38 AM
not really a issue about base convertion, i guess you know how to add up two numbers with base 10, you do:

(1)
15
+ 16
______
31

same thing goes for binary addition, except that 2 is considered as 10 and therefore will carry to next decimal.

(1)
10
+ 11
______
101

kedaman
Feb 13th, 2001, 09:50 AM
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:

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