binary addition

Thread Starter

CyborgBunny

Joined May 29, 2009
43
help me please , i have (01101)+(10111) , how can i add them , i mean <1+1=0 and carry one i know> , but when we reach the rest , what do we do ? , i know that the answer is 10100 but how did this come ? :confused:
 

ATM

Joined Oct 8, 2009
31
If you're unsure. Just convert each expression into it's denary equivalent, add them like normal, then convert back to binary.

01101 = 13
10111 = 23

13 + 23 = 36

36 in Binary = 100100
 

Ratch

Joined Mar 20, 2007
1,070
CyborgBunny,

Your information is incomplete in that you did not specify the word width. This affects things like overflow. If you had asked about subtraction, then we would have to know if it was 1's or 2's complement. If you asked about multiplication or division, then we would have to know about whether the word represented a signed or unsigned number. As it was, everyone assumed a width greater than 5.

Ratch
 
Top