September 09, 2011 by dgikuljot Hey guys, So lately i have been taking time to return to learning c programming for mcu's. I have finally understood how to read binary numbers and all that. And i understand the fact that lets say if i wanted to pb4 as an output that the binary number for this would be 00000100. And that I have to do left/ right shifts to turn pins high and low, but where my confusion lies is that if lets say on portb pb4 is not high or low(floating), how is that represented in Binary. When i am doing lets say a left shift but was the original value of that register in binary, so i can know how much to shift by? I am sorry if the qustion is confusing but after this clarification microcontroller programming will start making sense to me . Essentially all i am asking is what is the binary represenatation of a floating pin. Thanks, Kuljot Dhami Also guys i was wondering why all the c tutorials and books for avr use hexadecimal instead of binary. I just learned Binary and dont know anything about Hexadecimal. Is there any advantage of using hexadecimal over binary, is it the industry standard? Thanks, Kuljot Dhami Actually to make Port B4 an output with all other Port B pins inputs, you would have to do: ``````DDRB = 0b00001000; `````` If you only want to make PB4 an output without effecting the other PortB pins, you would do: ``````DDRB |= (1<