If it is a pass-or-fail test then the number of failures is binomially distributed. The forward problem is easy to state: if a fraction, p, of your chips would fail the test then in any sample of N chips, the number of failures is n~B(N,p) (n, distributed according to a binomial distribution with N trials and a failure rate of p, if you are unfamiliar with statistical notation). That means that you would expect Np failures, with a standard deviation of \sqrt{Np(1-p)}.
You are more interested in the inverse problem: given the number of failures that I have, what is the fraction p? And how many do I have to test to be confident in the number?
The first question is easy. If you test N chips and n fail, your best estimate for p is \widehat{p}=n/N. The best estimate for the standard deviation in that figure is, as usual, the standard error of the distribution divided by the square root of (N-1): \widehat{\sigma}=\sqrt{Np(1-p)/(N-1)} - but you don't know p, so you have to use \widehat{p} instead.
Your estimate of p, \widehat{p},
is normally distributed. You can look up the critical values for a normal distribution easily enough. What you do is take your target, t, ("I want to be sure that my failure rate is less than 1%" would mean t=0.01) and calculate z=(t-\widehat{p})/\widehat{\sigma}. Then look up that number in the critical table (
http://www.statsoft.com/textbook/distribution-tables/#z", for example) and add 0.5 (so if z=0.12, you would look in the second row, third column and read off 0.0478 and add 0.5; if z is negative, ignore the minus sign, look up the value in the same way, and subtract it from 0.5). This is your confidence that the failure rate is below the target (54.78%, in the example, which is very poor).
You can then use your \widehat{p} in the forward problem: in any batch of N chips, you expect N\widehat{p} defectives, plus-or-minus \sqrt{N\widehat{p}(1-\widehat{p})}. Or, more formally, you can use the binomial distribution to work out the probability of zero defectives, one defective, two defectives, etc (the probability of r defectives is C^{N}_{r}p^{r}(1-p)^{N-r}) and cumulate until you reach 0.99: if this happens at three defectives, you are 99% confident that the batch will contain three or fewer defectives.
I've skipped a step, which is how to work out how big N needs to be. Work backwards from the confidence that you want: 99% confidence means z=2.33 (looking through the table for 0.4900 and reading off). That means that 2.33=(t-\widehat{p})/\widehat{\sigma}. Sub in expressions for the estimators and solve for N; you'll need a guesstimate of p to get n. This is likely to be an iterative process: you have some idea of the failure rate from your experience; this allows you to propose an N, then you can refine your idea of the failure rate; rinse and repeat.
What if you find no failures? Then you need to note that the binomial distribution tells you that the probability of zero failures in N trials is p^N. Find the p that gives you 99% (or your preferred confidence threshold) chance of giving you zero failures (i.e., \widehat{p}=0.99^{1/N}).
Does that make sense?