Blaming stress only goes so far. If you're frozen up about how many bits in a byte, this knowledge really isn't implanted very deeply. Anyone can figure out the powers of 2 by doing tedious addition in their head, but if you spend a lot of time programming you tend to have the first 10 or so memorized.
In music performance, stress makes everything harder, but that's not an excuse - you need to practice until the motions are so deeply ingrained that it's practically part of your autonomic nervous system. Coding isn't so different.