Extract BitRegister

Signed-off-by: Lennart Fridén <lennart@devl.se>