How can I map bits in a byte to turn on or off a pin?
Of course you can do this without functions. Just write the code that accomplishes what you want. I suppose you could use a table but I can't imagine how or why.

In C, you manipulate bits and bit fields using the &amp; bitwise-AND, | bitwise-OR, ^ bitwise XOR, and &lt;&lt; &gt;&gt; bitwise shift operators.