Picking up where Arther left off, assuming independence between samples, the completely saturated (most general) model for this type of data is to assign a different probability to each possible outcome $p_{00}, p_{10}, p_{01}$ and $p_{11}$ as defined by Arthur. Notice that the only restriction on what these values may take is
$p_{00}+p_{01}+p_{10}+p_{11}=1$
These probability could be estimated from your data simply by counting up the frequencies. Because of the constraint imposed, and the nature of the problem, the set of 4 probability estimates would be drawn from a Dirichlet distribution.
Now, in your case you are only interested in the two conditional probabilities $p_{1|1} = P(B|A=1)$ and $p_{1|0}=P(B|A=0)$. We can write down the likelihood function for these, given your data, as follows:
$P(p_{1|1} | \{n_{ij}\}) \propto p_{1|1}^{n_{11}} (1-p_{1|1})^{n_{10}}$
If we differentiate this with respect to $p_{1|1}$ then we find
$\frac{\partial L}{\partial p_{1|1}} =
n_{11} p_{1|1}^{n_{11}-1} (1-p_{1|1})^{n_{10}} - n_{10} p_{1|1}^{n_{11}} (1-p_{1|1})^{n_{10}-1} = 0$
$n_{11} (1-p_{1|1}) = n_{10} p_{1|1}$
$p_{1|1} = \frac{n_{11}}{n_{11} + n_{10}}$
Which is the maximum likelihood expression given by Arthur
Assuming a non-informative prior then notice that the expression for $P(p_{1|1} | \{n_{ij}\})$ is a beta distribution (see http://en.wikipedia.org/wiki/Beta_distribution) with $\alpha = n_{11}+1$ and $\beta=n_{10}+1$
The mode of the beta distribution is the expression as given by Arthur, but you could put error bounds (strictly a credible interval) on this using percentiles of the beta distribution. The beta CDF is a not algebraically friendly, but R will calculate the credible interval like so:
c(qbeta(0.025, n11+1, n10+1), qbeta(0.975, n11+1, n10+1))
This also suggests that you could just as validly use the mean or median of the Beta distribution as your estimate, and in some situations that might be better.
Frequentist approach
The above is a little bit Bayesian, and so there is another approach.
The $n_{11}$ value is the number of time B=1 when A=1, while the $n_{10}$ is the number of time B=0 when A=1. Assuming independence, then the number of B=1 events, given A=1, should follow a binomial distribution with $n=n_{11}+n_{10}$ and $p=p_{1|1}$. We therefore need to estimate the $p$ parameter from the binomial distribution.
Using method of moments, we see that
$E[k] = np = (n_{11}+n_{10}) p_{1|1} $
$ n_{11} = (n_{11}+n_{10}) p_{1|1} $
$ p_{1|1} = \frac{n_{11}}{n_{11}+n_{10}} $
Recovering the same expression as before.
We could now construct a 95% confidence bound for $p_{1|1}$ by finding values of p. Since you have 10,000 rows, we can probably get away with the Normal approximation here, and so our symmetric approximate error bounds are
$\pm 1.96 \sqrt{\frac{p_{1|1}(1-p_{1|1})}{n_{01}+n_{11}}} = \pm 1.96 \sqrt{\frac{n_{11}n_{01}}{(n_{11}+n_{01})^3}} $