February 27, 2012 by jvince96 I having a hard time understanding the reason for a particular line of code in the dip_arithmetic lab and I hope that one of you can help explain. I'll start with what I think I know and then with my question: Step 1: Set the PC0 pin as an input DDRC &= ~(1<> PC0; Here is where we setup a1 to be populated with a 1 if the first bit from PINC and PC0 are both set to 1. I get this part... Now - here is where I am confused... a1 = (PINC & (1<> PC0; Why do we need to shift anything back into PC0? Isn’t PC0 the result bit register that comes directly from the input pin? I don't understand why this is necessary... Thanks in advance, Joe That line compares the value in the 1st bit of PINC to 1 and if it is, sets the 1st bit of a1. To break it down... a1= (PINC &(1<> PC0 If PINC = 0b00110111 the value of the 1st bit (bit 0) is 1. (1<>0 Rick I just had a light bulb turn on. What was throwing me off is that we are dividing the int into individual bits and we're trying to set them and them only! I was not originally looking at the a1, a2, & a3 that way. Thanks Rick! Joe