# Add16 and input bits seem inverted, why?

4 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Add16 and input bits seem inverted, why?

 I don't understand how the Add16 inputs work. In my mind these two things are equivalent: `b=0000000000000001`and `b[15]=true`Am I correct? So if I do `Add16(a=false, b[15]=true, out=out);`then I would expect the result to be `0000000000000001`but instead it is `1000000000000000`To get the right result, I have to do `b[0]=true`Why the inversion? I know my Add16 is valid because it passes the tests, I'm trying to implement Inc16 from Add16 chips.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Add16 and input bits seem inverted, why?

 The 16 bits are indexed right-to-left. When bit 15 is a 1, and the rest are 0, you have 1000000000000000.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Add16 and input bits seem inverted, why?

 Administrator In reply to this post by wetFence The rationale for numbering hardware bits from right to left is so that bit n is the 2n-weighted bit of the binary number on the bus. --Mark