An alternative to rejection sampling (as described in [FrankW's answer](http://cs.stackexchange.com/a/29205/9550)) is to use a scaling algorithm, that takes into account an answer of [7,8] as if it was another coin flipping. There is a very detailed explanation at [mathforum.org](http://mathforum.org/library/drmath/view/65653.html), including the algorithm (its `NextBit()` would be flipping your fair coin). The case for throwing a dice with a fair coin (sampling 2 → 6) is easier than the generic algorithm. You just take a failure (7 or 8) as another coin input and perform three more flips.