Discussion in 'Homework Help' started by CyborgBunny, Oct 11, 2009.

1. CyborgBunny Thread Starter Active Member

May 29, 2009
43
0
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 ?

2. Wendy Moderator

Mar 24, 2008
21,343
2,918
111110 Carry bits
.01101
+10111
100100

1+1+0=10
1+1+1=11

3. ATM Member

Oct 8, 2009
31
0
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

4. Ratch New Member

Mar 20, 2007
1,068
4
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