The number $A$ is irrational, since the characteristic function of the set of prime numbers is not eventually periodic.
It definitely should be transcendental as it is not a base $2$ normal number, ie the asymptotic frequency of digits is not the same (and algebraic numbers are conjectured to be normal). But this should be open (as also in the link mentioned by Theo Buhler, while I was composing this).
This conjecture would also answer the question on $b$, but Pietro Majer gave a direct argument already; it might however be good to keep this in mind for variations of the question.
Now, since the above is a bit terse some information around this. There is an interesting rather recent paper on more or less precisely this type of problem by Bailey, Borwein, Crandall, Pomerance
"On the binary expansions of algebraic numbers"
Among others they show that the binary distribution of a real algebraic number cannot be too extremely biased more precisely both digit have to occur (up to $N$) at least order of $N^{1/d}$ times where $d$ is the degree of the number. They also mention that thus the degree of
$$\sum_p \frac{1}{2^{p^k}}$$ is at least $k+1$ (with the convention that the degree of a transcendental is infinite).
There is more recent work on this by Adamczewski and Faverjon on this, too.
Finally, a good overview on this type of problem is given in this paper of Adamczewski and Bugeaud (see in particular Chapter 6 on lacunary numbers, that is precisley those of the form considered here, ie the digits are the characteristic function of some set).