What you see there is a conditional expression, best replaced by vb's IIf()
It is an expression with an implicit If/Then/Else.
Let's translate:
b = (d & (0x01 << i))?0x0001:0x0000;

Code:
'As If Then Else:
If d And (1 * 2^i) Then b = 1 Else b = 0
'As IIf:
b = IIf(d And (1 * 2^i), 1, 0)
The (0x01 << i) cn be simplified to 2^i in the end. Same as 1 * 2^i

Reentrant means, that the function must be written so that it can call itself.