Well $40\% \times 1 g = 400 \space mg$ That's how much drug is in your body's fluid compartments.
If the drug's half-life is $12$ hrs, the amount of drug in your body (after $24$ hrs) = $\frac{1}{2} \times \frac{1}{2} \times 400 = 100 \space mg$.
If dose = $d$ and bioavailability = $b\%$ and half-life = $h$ hours ...
The amount of drug left in your body after $t$ hrs = $\left(\frac{1}{2}\right)^{\frac{t}{h}} \times b\% \times d$
EDIT 1 START
This fancy geometric/mixed (?) series might be of interest ...
$1 - \left(1 \times \left(\frac{1}{2}\right) + \frac{3}{2} \times \left(\frac{1}{2}\right)^2 + ... \right) = 0$ where $1$ = bioavailability.
EDIT 1 END