There are two ways to solve your problem: If you are willing to type \NC[1] etc., then the following works
\newcommand{\NC}[1][]{{\def\NCexponent{#1}%
\ifx\NCexponent\empty{\ensuremath{\mathbf{NC}}}\else
\ensuremath{\mathbf{NC^{#1}}}\fi}}
Here, the \ifx\exponent\empty tests whether the optional argument was present and then uses \mathbf{NC^{#1}} if the argument was there and \mathbf{NC} otherwise. This makes both \NC and \NC[1] work as expected. (The extra layer of braces {{...}} is there to prevent the auxiliary macro \NCexponent from leaking outside this macro.)
As for all TeX macros, spaces after a macro are swallowed by TeX, so you need to use constructions like \NC\ and\NC[1] to get a space after \NC.
If you insist to be able to type \NC as well as \NC1, this can also be done, but the solution is more complicated. Here is a complete example:
(updated to use \noexpand#2 as suggested by @egreg)
\documentclass{article}
\def\NC{\NCa{}}
\def\NCa#1#2{\def\next{\NCa{#1#2}}%
% test whether #2 is a digit:
\if0\noexpand#2\else\if1\noexpand#2\else\if2\noexpand#2\else
\if3\noexpand#2\else\if4\noexpand#2\else\if5\noexpand#2\else
\if6\noexpand#2\else\if7\noexpand#2\else\if8\noexpand#2\else
\if9\noexpand#2\else
\def\next{\NCb{#1}#2}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\next}
\def\NCb#1{{\def\exponent{#1}\ifx\exponent\empty
\ensuremath{\mathbf{NC}}\else\ensuremath{\mathbf{NC^{#1}}}\fi}}
\begin{document}
There is \NC, \NC1, \NC 2\ and \NC345, as well as \NC a and again
\NC.
\end{document}
This version of the macro \NC checks all the following tokens: as long as they are digits, they are incorporated into the exponents, the first non-digit stops the argument. To achieve this, two auxiliary macros are used. \NCa constructs the exponent; it takes two arguments, the exponent constructed so far (#1) and the next token in the input stream (#2). If the next token is equal to 0, 1, ..., 9, we call \NCa again, with #2 added to the exponent. Otherwise, we call \NCb for typesetting (testing for empty exponents as above) and put back #2 into the input stream behind the expansion of \NCb (by writing \NCb{#1}#2).
One quirk of the second solution is, that all spaces encountered by \NCa are swallowed by the TeX parser. Thus, \NC 1 2 3 is the same as \NC123.
\NC: either with or without argument(s). With the second one, you need to write\NC[1]. – Qrrbrbirlbel Feb 12 at 17:05\newcommand{\NC}didn't work (due to an already-defined\NC), then any other\newcommand{\NC}would also not work. You could redefine it using\renewcommand, or plain ol'\def. Perhaps provide more context so we can help you better. – Werner Feb 12 at 17:13\newcommand{\NC}[1][]{\ensuremath{\mathbf{NC^{#1}}}}, then you could use either\NCand\NC[x]. – Claudio Fiandrino Feb 12 at 17:16\NCand\NC[x]works for me, but I still need the\phantom{0}or it eats up the following space if I write\NC circuitsfor example. – vh4x0r Feb 12 at 17:21\NC\ some textsufficient? – Claudio Fiandrino Feb 12 at 17:32